📄 todaybook.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TodayBook.h"
#include "DataMoudle.h"
#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TTodayBookPritForm *TodayBookPritForm;
//---------------------------------------------------------------------------
__fastcall TTodayBookPritForm::TTodayBookPritForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TTodayBookPritForm::FormShow(TObject *Sender)
{
QRLabel9->Caption=MainForm->TheCompany+" 当天定房报表";
AnsiString SQL;
DateTimePicker1->DateTime=Now();
SQL="select a.name ,a.sex ,a.passtype,a.passnumber,b.special,b.starttime,b.endtime,b.bookedtime ,c.roomno from custom a ,orders b,roomorder c where(b.bookedtime<"+QuotedStr(DateTimePicker1->DateTime)+"and b.bookedTime >"+QuotedStr(DateTimePicker1->DateTime.DateString())+"and a.customID=b.customID and b.orderno=c.orderno and b.booked=1 and b.used=0)";
ADOQuery1->Active=false;
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add(SQL);
ADOQuery1->Active=true;
// QuickRep1->Preview();
/* if(ADOQuery1->RecordCount!=0)
{
QuickRep1->Preview();
}
else
{
ShowMessage("今天没人定房");
Close();
}
*/
}
//---------------------------------------------------------------------------
void __fastcall TTodayBookPritForm::FormClose(TObject *Sender,
TCloseAction &Action)
{
MainForm->todayBookPrit=0;
Action=caFree;
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -