Reja: Kirish. Yurtimizda aktni rivojlntirishga qaratilayotgan e’tibor



Download 455,91 Kb.
bet7/8
Sana20.07.2022
Hajmi455,91 Kb.
#829598
1   2   3   4   5   6   7   8
Bog'liq
Abdumalikov Abdushukurning loyiha ishi. (wecompress.com)-1

Loyiha ishi. Mahalla kotibi avtomatlashtirilgan ishchi o’rni
Dastur kod qismi:
//---------------------------------------------------------------------------

#include


#pragma hdrstop

#include "kotib.h"


#include "Unit2.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{

}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
PageControl1->TabWidth = PageControl1->Width/2;

}
//---------------------------------------------------------------------------


void __fastcall TForm1::Button1Click(TObject *Sender)
{
if(PageControl1->ActivePageIndex == 0)
{
ADOQuery1->Insert();
Form2->ShowModal();
}
else{
ADOQuery2->Insert();
ADOQuery2->FieldByName("date")->AsString = Date();
Form3->ShowModal();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if(PageControl1->ActivePageIndex == 0)
{
ADOQuery1->Edit();
Form2->ShowModal();
}
else{
ADOQuery2->Edit();
Form3->ShowModal();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{
if (PageControl1->ActivePageIndex == 0) {
ADOQuery1->Delete();
}
else if(PageControl1->ActivePageIndex == 1)
{
ADOQuery2->Delete();
}

}
//---------------------------------------------------------------------------


void __fastcall TForm1::SearchBox1Change(TObject *Sender)
{
String ptr = SearchBox1->Text;
if (PageControl1->ActivePageIndex == 0) {
ADOQuery1->SQL->Text = "select * from people where firstname like '%"+ptr+"%' or lastname like '%"+ptr+"%'";
ADOQuery1->Open();
}
else{
ADOQuery2->SQL->Text = "select * from documents where doctype like '%"+ptr+"%' or comment like '%"+ptr+"%'";
ADOQuery2->Open();
}

}
//---------------------------------------------------------------------------


//---------------------------------------------------------------------------

#include


#pragma hdrstop

#include "Unit3.h"


#include "kotib.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm3 *Form3;
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button2Click(TObject *Sender)
{
Form1->ADOQuery2->Post();
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1->ADOQuery2->Cancel();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------

Download 455,91 Kb.

Do'stlaringiz bilan baham:
1   2   3   4   5   6   7   8




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish