Курсовая работа: База данных "Магазин по продаже дисков"
ComboBox1->Clear();
Edit2->Clear();
Edit3->Clear();
Edit4->Clear();}
//---------------------------------------------------------------------------
void __fastcall TForm1::TabSheet1Show(TObject *Sender)
{DataSource1->DataSet = ADOQuery1;
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add("SELECT * FROM Tab1;");
ADOQuery1->ExecSQL();
ADOQuery1->Open();}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button2Click(TObject *Sender)
{ADOQuery1->SQL->Clear();
if(RadioButton1->Checked)
{ADOQuery1->SQL->Add("SELECT * FROM Tab1 ORDER BY +["+ComboBox2->Text+"] DESC;");
ADOQuery1->ExecSQL();
DataSource1->DataSet = ADOQuery1;
ADOQuery1->Open();}
else
{if(RadioButton2->Checked)
{ADOQuery1->SQL->Add("SELECT * FROM Tab1 ORDER BY +["+ComboBox2->Text+"] ASC;");
ADOQuery1->ExecSQL();
DataSource1->DataSet = ADOQuery1;
ADOQuery1->Open();}}}
//---------------------------------------------------------------------------
void __fastcall TForm1::Button3Click(TObject *Sender)
{if(RadioButton3->Checked)
{ADOQuery1->SQL->Clear();