MUAMMONI YECHISHDA MAVJUD USULLAR VA ULARNING KAMCHILIK VA YUTUQLARINI TAHLIL QILISH
səhifə 2/2 tarix 20.12.2022 ölçüsü 0,57 Mb. #76619
texnika savdo
2.2 MUAMMONI YECHISHDA MAVJUD USULLAR VA ULARNING KAMCHILIK VA YUTUQLARINI TAHLIL QILISH
Ob’ektlar
1
noutbuklar
2
telefonlar
3
Televizorlar
MYSQL
JADVAL
‘‘noutbuk”
“telefonlar”
“televizor”
“xarid”
DASTUR YARATISH MUHITI (EMBARCADERO RAD SRUIDIO XE2)
Dastur yaratish umumlashgan muhiti Redaktor form – Shakllar muharriri, Inspektor ob’ektov – Ob’ektlar inspektori, Palitra komponentov – Komponentlar palitrasi, Administrator proekta – Proekt administratori va to’la umumlashgan Redaktor koda – Kodlar muharriri hamda kodlar va resurslar ustidan to’liq nazoratni ta’minlaydigan , dastur ilovalarini tezkor yaratadigan Otladchik - instrumentov - Sozlash- instrumentlari kabilarni birlashtiradi.
3.DASTURIY QISM
DASTURDA ISHLATILAGAN KODLAR :
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.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::Button1Click(TObject *Sender)
{
Form2->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{
if (Edit1->Text=="Tursunov") {
Form2->ADOTable1->Insert();
Form2->ADOTable2->Insert();
Form2->ADOTable3->Insert();
Form3->ShowModal();
}
}
//---------------------------------------------------------------------------
__fastcall TForm2::TForm2(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button1Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button2Click(TObject *Sender)
{
Form4->ADOTable1->Insert();
//
Form4->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button3Click(TObject *Sender)
{
Form4->ADOTable1->Insert();
//
Form4->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm2::Button4Click(TObject *Sender)
{
Form4->ADOTable1->Insert();
//
Form4->ShowModal();
}
//---------------------------------------------------------------------------
__fastcall TForm4::TForm4(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button1Click(TObject *Sender)
{
Form4->ADOTable1->Post();
DBGrid1->Visible=true;
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button4Click(TObject *Sender)
{
Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm4::Button3Click(TObject *Sender)
{
Label3->Visible=true;
DBEdit4->Visible=true;
if (DBEdit3->Text=="Noutbuk"){
DBEdit4->Text="3.5 MILLION";
}
if (DBEdit3->Text=="Telefon") {
DBEdit4->Text="2 MILLION";
}
if (DBEdit3->Text=="Televizor") {
DBEdit4->Text="4 MILLION";
}
}
//---------------------------------------------------------------------------
__fastcall TForm3::TForm3(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm3::Button1Click(TObject *Sender)
{
Form2->ADOTable1->Post();
Form2->ADOTable2->Post();
Form2->ADOTable3->Post();
DBEdit1->Clear();
DBEdit2->Clear();
DBEdit3->Clear();
DBEdit4->Clear();
DBEdit5->Clear();
DBEdit6->Clear();
DBEdit7->Clear();
DBEdit8->Clear();
DBEdit9->Clear();
DBEdit10->Clear();
DBEdit11->Clear();
DBEdit12->Clear();
DBEdit13->Clear();
ShowMessage("Mahsulotlar muvaffaqiyatli joylandi");
}
//---------------------------------------------------------------------------Dostları ilə paylaş: