todaybook.cpp
来自「机器须安装SQL Server2000 程序安装完之后」· C++ 代码 · 共 56 行
CPP
56 行
//---------------------------------------------------------------------------
#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 + =
减小字号Ctrl + -
显示快捷键?