714-21 Talabasi Ubaydullayev Sardorbek
Dasturlash2 fanidan Tayorlagan
Malumotlar Bazasi Access dasturi va
RAD Studio XE3 dasturi orqali
tayorlangan dasturi
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn1Click(TObject *Sender)
{
Form2->Show();
ADOTable1->Insert();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1->ADOTable1->Cancel();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn2Click(TObject *Sender)
{
ADOTable1->Edit();
Form2->Show();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::BitBtn3Click(TObject *Sender)
{
ADOTable1->Delete();
}
//---------------------------------------------------------------------------
Unit 2
//---------------------------------------------------------------------------
#ifndef Unit2H
#define Unit2H
//---------------------------------------------------------------------------
#include
#include
#include
#include
#include
#include
#include
//---------------------------------------------------------------------------
class TForm2 : public TForm
{
__published: // IDE-managed Components
TLabel *Label1;
TLabel *Label2;
TLabel *Label3;
TLabel *Label4;
TLabel *Label5;
TLabel *Label6;
TBitBtn *BitBtn1;
TBitBtn *BitBtn2;
TDBEdit *DBEdit1;
TDBEdit *DBEdit2;
TDBEdit *DBEdit3;
TDBEdit *DBEdit4;
TDBEdit *DBEdit5;
TDBEdit *DBEdit6;
void __fastcall BitBtn1Click(TObject *Sender);
void __fastcall BitBtn2Click(TObject *Sender);
private: // User declarations
public:
// User declarations
__fastcall TForm2(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TForm2 *Form2;
//---------------------------------------------------------------------------
#endif
Dostları ilə paylaş: |