📄 diancai.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "DianCai.h"
#include "DataModule.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TDainCaiForm *DainCaiForm;
//---------------------------------------------------------------------------
__fastcall TDainCaiForm::TDainCaiForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton1Click(TObject *Sender)
{
AnsiString Str=DataMod->DianCaiQuery->FieldValues["菜名"];
ListBox1->Items->Add(Str);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton2Click(TObject *Sender)
{
if(ListBox1->ItemIndex<0)
return;
ListBox1->Items->Delete(ListBox1->ItemIndex);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton3Click(TObject *Sender)
{
AnsiString Str=DataMod->JiuShuiQuery->FieldValues["酒水名称"];
ListBox2->Items->Add(Str);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton4Click(TObject *Sender)
{
if(ListBox2->ItemIndex<0)
return;
ListBox2->Items->Delete(ListBox2->ItemIndex);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton6Click(TObject *Sender)
{
if(ListBox3->ItemIndex<0)
return;
ListBox3->Items->Delete(ListBox3->ItemIndex);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::SpeedButton5Click(TObject *Sender)
{
AnsiString Str=DataMod->CanJiQuery->FieldValues["餐具名称"];
ListBox3->Items->Add(Str);
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::BitBtn3Click(TObject *Sender)
{
ListBox1->Items->Clear();
ListBox2->Items->Clear();
ListBox3->Items->Clear();
Close();
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::FormShow(TObject *Sender)
{
SpeedButton1->Enabled=false;
SpeedButton2->Enabled=false;
SpeedButton3->Enabled=false;
SpeedButton4->Enabled=false;
SpeedButton5->Enabled=false;
SpeedButton6->Enabled=false;
}
//---------------------------------------------------------------------------
void __fastcall TDainCaiForm::BitBtn1Click(TObject *Sender)
{
SpeedButton1->Enabled=true;
SpeedButton2->Enabled=true;
SpeedButton3->Enabled=true;
SpeedButton4->Enabled=true;
SpeedButton5->Enabled=true;
SpeedButton6->Enabled=true;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -