Muhammad al-Xorazmiy nomidagi Toshkent Axborot texnalogiyal


Download 0.72 Mb.
Sana16.01.2022
Hajmi0.72 Mb.
#358386
Bog'liq
shalon
Bor mavzular, To’plam haqida tushuncha. To’plamlar ustida amallar. To'plam haq, билимлар биллашуви баҳолаш мезони, Indonesia, 1- ma'ruza, Tarix, NO`MONOV SARDORJON, davlat va huquq nazariyasi, elektron dars ishlanmalar tayyorlash , 8-семинар материалли, Ўрнатилган операцион тизимга кириш, 11 mavzu, 6-sinf 1-2 mavzu, 4-mavzuga qo'shimcha ma'lumot, Soʻlak bezlari va tishlar

Muhammad al-Xorazmiy nomidagi Toshkent Axborot texnalogiyalari unversiteti Farg’ona filali Telekomunikatsiya va kasbiy ta`lim fakulteti 630-20 guruh talabasi Mannopov Hoshimjonning dasturlash 2 fanidan tayyorlagan

loyiha ishi

Qabul qiluvchi: Ahror Qayumov

Topshiruvchi: Mannopov Hoshimjon

13. Kаfеdrа o’kituvchilаri mа’lumоtlаr bаzаsi

Dastur kodi:

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

#include

#pragma hdrstop

#include "Unit1.h"

#include "Unit2.h"

#include "Unit3.h"

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

#pragma package(smart_init)

#pragma link "frxClass"

#pragma link "frxDBSet"

#pragma link "frxExportCSV"

#pragma link "frxExportImage"

#pragma link "frxExportPDF"

#pragma link "frxExportRTF"

#pragma resource "*.dfm"

TForm1 *Form1;

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

__fastcall TForm1::TForm1(TComponent* Owner)

: TForm(Owner)

{

}

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



void __fastcall TForm1::Action1Execute(TObject *Sender)

{

Form2->Caption = "Qo'shish";



Form2->ComboBox1->Items->Clear();

for (int i = 0; i < ComboBox1->Items->Count; i++)

{

Form2->ComboBox1->Items->Add(ComboBox1->Items->Strings[i]);



}

Form2->ShowModal();

}

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



void __fastcall TForm1::Action2Execute(TObject *Sender)

{

if (ADOQueryoila->RecordCount!=0)



{

Form2->ComboBox1->Items->Clear();

for (int i = 0; i < ComboBox1->Items->Count; i++)

{

Form2->ComboBox1->Items->Add(ComboBox1->Items->Strings[i]);



}

Form2->Caption = "O'zgartirish";

Form2->LabeledEdit1->Text = ADOQueryoila->FieldByName("familiya")->AsString;

Form2->LabeledEdit2->Text = ADOQueryoila->FieldByName("ism")->AsString;

Form2->DateTimePicker1->Date = ADOQueryoila->FieldByName("tugilgansana")->AsDateTime;

Form2->LabeledEdit3->Text = ADOQueryoila->FieldByName("mutahasislik")->AsString;

Form2->LabeledEdit4->Text = ADOQueryoila->FieldByName("telefon")->AsString;

Form2->LabeledEdit5->Text = ADOQueryoila->FieldByName("manzili")->AsString;

Form2->ComboBox1->Text = ADOQueryoila->FieldByName("kafedra")->AsString;

Form2->ShowModal();

}

}

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



void __fastcall TForm1::Action3Execute(TObject *Sender)

{

if (ADOQueryoila->RecordCount!=0)



{

String id = Form1->ADOQueryoila->FieldByName("id")->AsString;

String ism = ADOQueryoila->FieldByName("ism")->AsString;

switch (MessageDlg(ism + "ni o'chirasizmi", mtConfirmation,mbYesNo,0))

{

case mrYes :



Form1->ADOQueryoila->Close();

Form1->ADOQueryoila->SQL->Text

= " delete from oila where id = "+id+" ";

Form1->ADOQueryoila->ExecSQL();

Form1->ADOQueryoila->SQL->Text

= " select * from oila order by id asc ";

Form1->ADOQueryoila->Open(); break;

}

}



}

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

void __fastcall TForm1::Action4Execute(TObject *Sender)

{

frxReport1->ShowReport();



}

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

void __fastcall TForm1::Edit1Change(TObject *Sender)

{

ADOQueryoila->SQL->Text



= "select * from oila where familiya like '%"+Edit1->Text.Trim()+"%' or ism like '%"+Edit1->Text.Trim()+"%' or telefon like '%"+Edit1->Text.Trim()+"%' or manzili like '%"+Edit1->Text.Trim()+"%' ";

ADOQueryoila->Open();

}

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



void __fastcall TForm1::ComboBox1Change(TObject *Sender)

{

if (ComboBox1->ItemIndex>-1)



{

ADOQueryoila->SQL->Text = "select * from oila where kafedra='"+ComboBox1->Text+"'";

ADOQueryoila->Open();

}

else



{

ADOQueryoila->SQL->Text = "select * from oila ";

ADOQueryoila->Open();

}

}



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

void __fastcall TForm1::FormActivate(TObject *Sender)

{

ADOQuery1->SQL->Text="select * from kafedra";



ADOQuery1->Open();

ADOQuery1->First();

for (int i = 0; i < ADOQuery1->RecordCount; i++)

{

ComboBox1->Items->Add(ADOQuery1->FieldByName("nomi")->AsString);



ADOQuery1->Next();

}

}



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

void __fastcall TForm1::Action5Execute(TObject *Sender)

{

Form3->ShowModal();



}

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



Dastur natijalari:


Download 0.72 Mb.

Do'stlaringiz bilan baham:




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2022
ma'muriyatiga murojaat qiling