Разработка базы дискографии музыкальных коллективов, страница 7

//ShowMessage(AnsiString(E.ClassName()) + " " + E.Message + " " );

}

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(ComboBox1->Text!=""){

Button1->Enabled=true;

}

}

}

}

if(ComboBox1->Text==""){

Button1->Enabled=false;

}

}

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

void __fastcall TForm4::DBEdit1Change(TObject *Sender)

{

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(ComboBox1->Text!=""){

Button1->Enabled=true;

}

}

}

}

if(DBEdit1->Text==""){

Button1->Enabled=false;

}

}

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

void __fastcall TForm4::DBEdit2Change(TObject *Sender)

{

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(ComboBox1->Text!=""){

Button1->Enabled=true;

}

}

}

}

if(DBEdit2->Text==""){

Button1->Enabled=false;

}

}

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

void __fastcall TForm4::DBEdit3Change(TObject *Sender)

{

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(ComboBox1->Text!=""){

Button1->Enabled=true;

}

}

}

}

if(DBEdit3->Text=="**.**.**"){

Button1->Enabled=false;

}

}

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

void __fastcall TForm4::Button1Click(TObject *Sender)

{

for(int i=0;i<100;i++){

ProgressBar1->StepBy(1);

Cursor=crHourGlass;

}

if(ProgressBar1->Position==100){

DBNavigator1->BtnClick(nbPost);

DBNavigator1->BtnClick(nbRefresh);

DBNavigator1->BtnClick(nbInsert);

ProgressBar1->Position=0;

Cursor=crDefault;

}

ComboBox1->Text="";

DBEdit1->Text="";

DBEdit2->Text="";

Cursor=crDefault;

}

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

void __fastcall TForm4::DateTimePicker1Change(TObject *Sender)

{

DBEdit3->Text=DateTimePicker1->DateTime;

}

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

void __fastcall TForm4::Button2Click(TObject *Sender)

{

Form2->Show();

Form4->Close();

}

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

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

#include <vcl.h>

#include <ccalendr.h>

#pragma hdrstop

#include "Unit6.h"

#include "Unit1.h"

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

#pragma package(smart_init)

#pragma resource "*.dfm"

TForm6 *Form6;

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

__fastcall TForm6::TForm6(TComponent* Owner)

        : TForm(Owner)

{

}

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

void __fastcall TForm6::N1Click(TObject *Sender)

{

Form6->Close();

}

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

void __fastcall TForm6::DateTimePicker1Change(TObject *Sender)

{

DBEdit3->Text=DateTimePicker1->DateTime;

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(DBEdit4->Text!=""){

if(DBEdit5->Text!=""){

if(DBEdit6->Text!=""){

if(DBEdit7->Text!=""){

if(DBEdit8->Text!=""){

if(DBEdit10->Text!=""){

Button2->Enabled=true;

}}}}}}}}}

if(DBEdit3->Text==""){

Button2->Enabled=false;

}

}

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

void __fastcall TForm6::DateTimePicker2Change(TObject *Sender)

{

DBEdit4->Text=DateTimePicker2->DateTime;

if(DBEdit1->Text!=""){

if(DBEdit2->Text!=""){

if(DBEdit3->Text!=""){

if(DBEdit4->Text!=""){

if(DBEdit5->Text!=""){

if(DBEdit6->Text!=""){

if(DBEdit7->Text!=""){

if(DBEdit8->Text!=""){

if(DBEdit10->Text!=""){

Button2->Enabled=true;

}}}}}}}}}

if(DBEdit4->Text==""){

Button2->Enabled=false;

}

}

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

void __fastcall TForm6::FormCreate(TObject *Sender)

{

ADOQuery1->Open();

ADOQuery2->Open();

}

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

void __fastcall TForm6::Button1Click(TObject *Sender)

{

Panel2->Visible=false;

Panel2->Align=alNone;

Button1->Visible=false;

DBNavigator1->BtnClick(nbInsert);

DBNavigator2->BtnClick(nbInsert);

DBEdit4->Text=DateTimePicker2->DateTime;

}

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

void __fastcall TForm6::Button2Click(TObject *Sender)

{

if(Edit1->Text!=""){

if(Edit1->Text!=DBEdit10->Text){

MessageBox(Handle,"ПАРОЛИ НЕ СОВПОДАЮТ","Осторожно",48);

}

if(Edit1->Text==DBEdit10->Text){

for(int i=0;i<100;i++){

ProgressBar1->StepBy(1);

}

if(ProgressBar1->Position==100){

ProgressBar1->Position=0;

}

Form1->Caption=DBEdit1->Text;

DBNavigator2->BtnClick(nbPost);

DBNavigator1->BtnClick(nbPost);

Form6->Close();

}

}

}

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

void __fastcall TForm6::DBEdit8Change(TObject *Sender)

{

int Result;