//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Timer1->Enabled=True;
Timer1->Interval=1000;
s=s+1;
if (s==4)
{
Timer1->Enabled=false;
Form2->Show();
Form1->Hide();
}
}
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit2.h"
#include "Unit3.h"
#include "Unit1.h"
#include "Unit4.h"
#include "Unit5.h"
#include "Unit6.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm2 *Form2;
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Edit1Change(TObject *Sender)
{
TLocateOptions Opts;
Opts.Clear();
Opts<ADOTable1->Locate("en", Edit1->Text, Opts);
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Qoshish1Click(TObject *Sender)
{
ADOTable1->Insert();
Form3->Show();
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid1DblClick(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid1CellClick(TColumn *Column)
{
Edit1->Text=ADOTable1->FieldByName("en")->AsString;
//ADOTable1->Filtered=False;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if (Key==13)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Ozgartirish1Click(TObject *Sender)
{
ADOTable1->Edit();
Form3->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Ochirish1Click(TObject *Sender)
{
ADOTable1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Chiqish1Click(TObject *Sender)
{
Form1->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid1KeyPress(TObject *Sender, char &Key)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Muallif1Click(TObject *Sender)
{
Form5->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Edit1KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key==VK_DOWN)
{
DBNavigator1->BtnClick(nbNext);
Edit1->Text=Form2->ADOTable1->FieldByName("en")->AsString;
}
if(Key==VK_UP)
{
DBNavigator1->BtnClick(nbPrior);
Edit1->Text=Form2->ADOTable1->FieldByName("en")->AsString;
}
if (Key==13)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Enguz1Click(TObject *Sender)
{
Panel1->Visible=True;
Panel2->Visible=False;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Uzeng1Click(TObject *Sender)
{
Panel1->Visible=False;
Panel2->Visible=True;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Edit2Change(TObject *Sender)
{
TLocateOptions Opts;
Opts.Clear();
Opts<Form2->ADOTable2->Locate("uz", Edit2->Text, Opts);
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Edit2KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if(Key==VK_DOWN)
{
DBNavigator2->BtnClick(nbNext);
Edit2->Text=Form2->ADOTable2->FieldByName("uz")->AsString;
}
if(Key==VK_UP)
{
DBNavigator2->BtnClick(nbPrior);
Edit2->Text=Form2->ADOTable2->FieldByName("uz")->AsString;
}
if (Key==13)
{
Form4->Memo1->Text=Form2->ADOTable2->FieldByName("uz")->AsString+" --- "+Form2->ADOTable2->FieldByName("en")->AsString;
Form4->Show();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid2DblClick(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable2->FieldByName("uz")->AsString+" --- "+Form2->ADOTable2->FieldByName("en")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid2CellClick(TColumn *Column)
{
Edit2->Text=ADOTable2->FieldByName("uz")->AsString;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid2KeyDown(TObject *Sender, WORD &Key,
TShiftState Shift)
{
if (Key==13)
{
Form4->Memo1->Text=Form2->ADOTable2->FieldByName("uz")->AsString+" --- "+Form2->ADOTable2->FieldByName("en")->AsString;
Form4->Show();
}
}
//---------------------------------------------------------------------------
void __fastcall TForm2::DBGrid2KeyPress(TObject *Sender, char &Key)
{
Form4->Memo1->Text=Form2->ADOTable2->FieldByName("uz")->AsString+" --- "+Form2->ADOTable2->FieldByName("en")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button6Click(TObject *Sender)
{
Form4->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button3Click(TObject *Sender)
{
Form3->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button4Click(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable2->FieldByName("uz")->AsString+" --- "+Form2->ADOTable2->FieldByName("en")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Qoshish2Click(TObject *Sender)
{
ADOTable1->Insert();
Form3->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Ozgartirish2Click(TObject *Sender)
{
ADOTable1->Edit();
Form3->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Ochirish2Click(TObject *Sender)
{
ADOTable1->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn4Click(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn6Click(TObject *Sender)
{
Form4->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn5Click(TObject *Sender)
{
Panel1->Visible=False;
Panel2->Visible=True;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn2Click(TObject *Sender)
{
Panel1->Visible=True;
Panel2->Visible=False;
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn1Click(TObject *Sender)
{
Form4->Memo1->Text=Form2->ADOTable1->FieldByName("en")->AsString+" --- "+Form2->ADOTable1->FieldByName("uz")->AsString;
Form4->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::BitBtn3Click(TObject *Sender)
{
Form4->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Dasturhaqida1Click(TObject *Sender)
{
Form6->Show();
}
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::BitBtn1Click(TObject *Sender)
{
if ((DBEdit1->Text!="")&&(DBEdit2->Text!=""))
{
Form2->ADOTable1->Post();
Form2->ADOTable1->Append();
}
else
{
ShowMessage("Malumot kiritilmadi");
}
}
//---------------------------------------------------------------------------
void __fastcall TForm3::BitBtn2Click(TObject *Sender)
{
Form2->ADOTable1->Cancel();
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Form3->Close();
}
//---------------------------------------------------------------------------
Do'stlaringiz bilan baham: |