Tekshirdi: Toshkent 2016
Download 1.97 Mb.
|
Xisobot
- Bu sahifa navigatsiya:
- 4. Foydalanilgan adabiyotlar
- V Ilova Malumotlar bazasi
- Mashina_rusumi Summa
- Dastur kodi: Form1 oynasi
24-rasm Bunda bozorda sotilgan mashinalar ro’yxati mavjud bo’lib xaridor tomonidan sotib olingan mashina 1-bazadan chiqib 2-bazaga yoziladi. Ammo bu oynada administrator hech qanday vakolatga ega emas. 3. XULOSA Men bu kurs ishini C++ Builder6 muhiti va Microsoft Accsessdan foydalangan holda tayyorladim. Bu dasturim Avtomobil bozorini xaridorlarni o’zlariga kerakli bo’lgan ma’lumotlarini bilib olishda foydali bo’lishiga ishonaman va sotuvchilar uchun ham foydali bo’lishiga aminman. Men bu kurs ishini bajarish davomida C++ builder 6 dasturida ko’plab yangi narsalarni o’rgandim. Dastur kamchiliklardan holi emas lekin navbatdagi dasturlarni kamchiliklarsiz yaratishga xarakat qilaman. Dastur barcha kompyuterlarda birday ishlashi ta’minlangan va uning ishlashi uchun C++builder 6 muxiti o’rnatilishi shart emas. 4. Foydalanilgan adabiyotlar S. G’ulomov. “Axborot texnalogiyalari.” Maraximov A. va Raxmonova S. “Internet va undan foydalanish asoslari”. Б.С.ПоспедBorlandC++ Builder 6. Разработка приложений баз данных СПб.: ООО ≪ДиаСофтЮП≫, 2003 – 320 с Никита Культин C++ Builder в задачах и примерах СПб.: БХВ-Петербург 2005 — 336 с Вячеслав Ермолаев, Тарас Сорока C++ Builder: Книга рецептов М.: КУДИЦ-ОБРАЗ, 2006. - 208 с. Teach Yourself Borland C++ Builder in 21 Days http: www.tuit.uz V Ilova Malumotlar bazasi
Dastur kodi: Form1 oynasi #include #pragma hdrstop #include "Unit1.h" #include "Mashinalar.h" #include "bolim.h" #include "Admin.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma link "sSkinManager" #pragma resource "*.dfm" TForm1 *Form1; //--------------------------------------------------------------------------- __fastcall TForm1::TForm1(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm1::Button3Click(TObject *Sender) { Hide();
Form4->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button1Click(TObject *Sender) { Hide(); Form2->Button4->Visible = false; Form2->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button2Click(TObject *Sender) { Hide(); Form3->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm1::Button4Click(TObject *Sender) { Close(); } Form2 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Mashinalar.h" #include "Unit1.h" #include "sotuvchilarr.h" #include "Sotilgan_mashinala.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm2 *Form2; //--------------------------------------------------------------------------- __fastcall TForm2::TForm2(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm2::Button3Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Button2Click(TObject *Sender) { Close(); Form1->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Edit1Change(TObject *Sender) { AnsiString k; k = Edit1->Text; ADOQuery1 -> Close(); ADOQuery1 -> SQL -> Clear(); ADOQuery1 -> SQL -> Add("select *"); ADOQuery1 -> SQL -> Add(" from baza "); ADOQuery1 -> SQL -> Add("where "+ComboBox1->Text+" LIKE '" + k +"%'"); ADOQuery1 -> Open(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Button1Click(TObject *Sender) { AnsiString k; k = Edit1->Text; ADOQuery1 -> Close(); ADOQuery1 -> SQL -> Clear(); ADOQuery1 -> SQL -> Add("select *"); ADOQuery1 -> SQL -> Add(" from baza"); ADOQuery1 -> SQL -> Add("where "+ComboBox1->Text+" LIKE '" + k +"%'"); ADOQuery1 -> Open(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Button8Click(TObject *Sender) { ComboBox1->ItemIndex = -1; Edit1->Text = ""; Button1->Click(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Button6Click(TObject *Sender) { TLocateOptions qidiruv; qidiruv< if(Form8->ADOTable1->Locate("login",Edit2->Text,qidiruv)) {if(Form8->ADOTable1->Locate("parol",Edit3->Text,qidiruv)) { if(DBEdit1->Text == Edit2->Text) { if(Edit6->Text!="" && Edit4->Text!="" && Edit5->Text!="") { Form9->ADOQuery1->Open(); Form9->ADOQuery1->Insert(); Form9->ADOQuery1->FieldByName("Sotuvchi_ismi")->AsString = DBEdit2->Text; Form9->ADOQuery1->FieldByName("Sotuvchi_familiyasi")->AsString = DBEdit3->Text; Form9->ADOQuery1->FieldByName("Oluvchining_ismi")->AsString = Edit4->Text; Form9->ADOQuery1->FieldByName("Oluvchining_familiyasi")->AsString = Edit5->Text; Form9->ADOQuery1->FieldByName("Summa")->AsString = Edit6->Text; Form9->ADOQuery1->FieldByName("Mashina_rusumi")->AsString = DBEdit4->Text; Form9->ADOQuery1->Post(); Edit4->Text=""; Edit5->Text="" ; Edit6->Text=""; ShowMessage("Tabriklaymiz siz mashina sotib oldingiz!"); Panel1->Visible = false; ADOQuery1->Delete(); } else
ShowMessage("BARCHA MAYDON TO'LDIRILISHI SHART..."); //ADOQuery1->Delete(); } }
ShowMessage("login yoki parol xato"); } else ShowMessage("login yoki parol xato"); Edit2->Clear(); Edit3->Clear(); } //--------------------------------------------------------------------------- void __fastcall TForm2::Button5Click(TObject *Sender) { Panel1->Visible = false; } //--------------------------------------------------------------------------- void __fastcall TForm2::Button4Click(TObject *Sender) { Panel1->Visible = true; } Form3 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "bolim.h" #include "Unit1.h" #include "Parol.h" #include "Mashinalar.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm3 *Form3; //--------------------------------------------------------------------------- __fastcall TForm3::TForm3(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm3::Button4Click(TObject *Sender) { Close();
Form1->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm3::Button1Click(TObject *Sender) { Close(); Form5->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm3::Button2Click(TObject *Sender) { Hide(); Form2->Button4->Visible = true; Form2->Show(); } //--------------------------------------------------------------------------- Form4 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Admin.h" #include "Unit1.h" #include "Sotuvchila.h" #include "sotuvchilarr.h" #include "Mashinalar.h" #include "Sotilgan_mashinala.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm4 *Form4; //--------------------------------------------------------------------------- __fastcall TForm4::TForm4(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm4::Button3Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- void __fastcall TForm4::Button2Click(TObject *Sender) { Button5->Visible = false; Button4->Visible = false; Button1->Visible = false; Label3->Visible = false; Panel1->Visible = true; Close(); Form1->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm4::Button6Click(TObject *Sender) { if(Edit1->Text =="shohista" && Edit2->Text == "1234") { Edit1->Text = ""; Edit2->Text = ""; Button5->Visible = true; Button4->Visible = true; Button1->Visible = true; Label3->Visible = true; Panel1->Visible = false; } else ShowMessage("Parol yoki login xato!"); } //--------------------------------------------------------------------------- void __fastcall TForm4::Button1Click(TObject *Sender) { Hide(); Form8->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm4::Button4Click(TObject *Sender) { Hide(); Form9->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm4::Button5Click(TObject *Sender) { Edit1->Text = ""; Edit2->Text = ""; Button5->Visible = false; Button4->Visible = false; Button1->Visible = false; Label3->Visible = false; Panel1->Visible = true; Hide(); Form2->Show(); } Form5 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Parol.h" #include "Sotuvchila.h" #include "regestratsiya.h" #include "Mashinalar.h" #include "sotuvchilarr.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm5 *Form5; //--------------------------------------------------------------------------- __fastcall TForm5::TForm5(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm5::Button1Click(TObject *Sender) { TLocateOptions qidiruv; qidiruv< if(Form8->ADOTable1->Locate("login",Edit1->Text,qidiruv)) {if(Form8->ADOTable1->Locate("parol",Edit2->Text,qidiruv)) { Hide(); Form6->Edit1->Text = Edit1->Text; Form6->Edit2->Text = Edit2->Text; Form6->Show(); } else ShowMessage("login yoki parol xato");} else
ShowMessage("login yoki parol xato"); Edit1->Clear(); Edit2->Clear(); } //--------------------------------------------------------------------------- void __fastcall TForm5::Label3MouseMove(TObject *Sender, TShiftState Shift, int X, int Y) { Label3->Font ->Color = clRed; } //--------------------------------------------------------------------------- void __fastcall TForm5::Label3MouseLeave(TObject *Sender) { Label3->Font->Color = clBlack; } //--------------------------------------------------------------------------- void __fastcall TForm5::Label3Click(TObject *Sender) { Hide(); Form7->Show(); } //--------------------------------------------------------------------------- Form6 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Sotuvchila.h" #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm6 *Form6; //--------------------------------------------------------------------------- __fastcall TForm6::TForm6(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm6::Button1Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- void __fastcall TForm6::Timer1Timer(TObject *Sender) { AnsiString j; j = Edit2->Text; ADOQuery1 -> Close(); ADOQuery1 -> SQL -> Clear(); ADOQuery1 -> SQL -> Add("select *"); ADOQuery1 -> SQL -> Add(" from baza"); ADOQuery1 -> SQL -> Add("where parol LIKE '" + j +"%'"); ADOQuery1 -> Open(); if(DBEdit1->Text == Edit2->Text){ j = Edit2->Text; ADOQuery1 -> Close(); ADOQuery1 -> SQL -> Clear(); ADOQuery1 -> SQL -> Add("select *"); ADOQuery1 -> SQL -> Add(" from baza"); ADOQuery1 -> SQL -> Add("where parol LIKE '" + j +"%'"); ADOQuery1 -> Open(); Timer1->Enabled=false; } }
void __fastcall TForm6::Button2Click(TObject *Sender) { Close(); Form1->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm6::Button3Click(TObject *Sender) {DBGrid1->Visible = false; Button3->Visible = false; Button4->Visible = false; GroupBox1 -> Visible = true; } //--------------------------------------------------------------------------- void __fastcall TForm6::BitBtn1Click(TObject *Sender) { if(Edit7->Text!="" && Edit8->Text!="" && Edit3->Text!="" && Edit4->Text!="" && Edit5->Text!="" && Edit6->Text!=""&& Edit9->Text != "") { ADOQuery1->Open(); ADOQuery1->Insert(); ADOQuery1->FieldByName("Ismi")->AsString = Edit10->Text; ADOQuery1->FieldByName("parol")->AsString = Edit2->Text; ADOQuery1->FieldByName("nom")->AsString = Edit3->Text; ADOQuery1->FieldByName("narx")->AsString = Edit4->Text; ADOQuery1->FieldByName("uzunlik")->AsString = Edit5->Text; ADOQuery1->FieldByName("massa")->AsString = Edit6->Text; ADOQuery1->FieldByName("tezlik")->AsString = Edit7->Text; ADOQuery1->FieldByName("ot_kuchi")->AsString = Edit8->Text; ADOQuery1->FieldByName("bak_sigimi")->AsString = Edit9->Text; ADOQuery1->FieldByName("Id")->AsString =IntToStr(StrToInt(DBEdit1->Text)%12); ADOQuery1->FieldByName("Familiyasi")->AsString = Edit11->Text; ADOQuery1->Post(); ShowMessage(" Ma`lumot kiritildi! "); Edit8->Text=""; Edit7->Text=""; Edit3->Text=""; Edit4->Text="" ; Edit5->Text=""; Edit6->Text="" ; Edit9->Text = ""; Button3->Visible = true; Button4->Visible = true; DBGrid1->Visible = true; Timer1->Enabled = true; GroupBox1 -> Visible = false; } else
ShowMessage("BARCHA MAYDON TO'LDIRILISHI SHART..."); } //--------------------------------------------------------------------------- void __fastcall TForm6::Button4Click(TObject *Sender) { ADOQuery1->Delete(); } Form7 oynasi //----------- ---------------------------------------------------------------- //--------------------------------------------------------------------------- #include #pragma hdrstop #include "regestratsiya.h" #include "Unit1.h" #include "sotuvchilarr.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm7 *Form7; //--------------------------------------------------------------------------- __fastcall TForm7::TForm7(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm7::Button1Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- void __fastcall TForm7::Button2Click(TObject *Sender) { Close(); Form1->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm7::Button3Click(TObject *Sender) { if(Edit1->Text!="" && Edit2->Text!="" && Edit3->Text!="" && Edit4->Text!="" && Edit5->Text!="") { Form8->ADOTable1->Open(); Form8->ADOTable1->Insert(); Form8->ADOTable1->FieldByName("ism")->AsString = Edit1->Text; Form8->ADOTable1->FieldByName("familiya")->AsString = Edit2->Text; Form8->ADOTable1->FieldByName("manzil")->AsString = Edit3->Text; Form8->ADOTable1->FieldByName("login")->AsString = Edit4->Text; Form8->ADOTable1->FieldByName("parol")->AsString = Edit5->Text; Form8->ADOTable1->Post(); ShowMessage(" Ma`lumot kiritildi! "); Edit3->Text=""; Edit4->Text="" ; Edit5->Text=""; Edit1->Text=""; Edit2->Text="" ; } else ShowMessage("BARCHA MAYDON TO'LDIRILISHI SHART..."); } //--------------------------------------------------------------------------- void __fastcall TForm7::CheckBox1Click(TObject *Sender) { if(CheckBox1->Checked == true) { CheckBox1->Visible = false; Label1->Visible = true; Label2->Visible = true; Label3->Visible = true; Label4->Visible = true; Label5->Visible = true; Label6->Visible = true; Edit1->Visible = true; Edit2->Visible = true; Edit3->Visible = true; Edit4->Visible = true; Edit5->Visible = true; Button3->Visible = true; } }
-------------------------------------------------------------- Form8 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "sotuvchilarr.h" #include "Unit1.h" #include "Admin.h" #include "Mashinalar.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm8 *Form8; //--------------------------------------------------------------------------- __fastcall TForm8::TForm8(TComponent* Owner) : TForm(Owner) { }
void __fastcall TForm8::Button1Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- void __fastcall TForm8::Button4Click(TObject *Sender) { Close(); Form4->Show(); } //--------------------------------------------------------------------------- void __fastcall TForm8::Button2Click(TObject *Sender) { ADOTable1->Delete(); Form2->ComboBox1->Text = "Ismi"; Form2->Edit1->Text = DBEdit1->Text; Form2-> ADOQuery1->Delete(); } //--------------------------------------------------------------------------- Form 9 oynasi //--------------------------------------------------------------------------- #include #pragma hdrstop #include "Sotilgan_mashinala.h" #include "Unit1.h" //--------------------------------------------------------------------------- #pragma package(smart_init) #pragma resource "*.dfm" TForm9 *Form9; //--------------------------------------------------------------------------- __fastcall TForm9::TForm9(TComponent* Owner) : TForm(Owner) { } //--------------------------------------------------------------------------- void __fastcall TForm9::Button1Click(TObject *Sender) { Form1->Close(); } //--------------------------------------------------------------------------- Download 1.97 Mb. Do'stlaringiz bilan baham: |
ma'muriyatiga murojaat qiling