📄 thenightdecideprint.cpp
字号:
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "TheNightDecidePrint.h"
#include "DataMoudle.h"
#include "Main.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TTheNightDecidePrintForm *TheNightDecidePrintForm;
//---------------------------------------------------------------------------
__fastcall TTheNightDecidePrintForm::TTheNightDecidePrintForm(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TTheNightDecidePrintForm::FormShow(TObject *Sender)
{
QRLabel5->Caption=MainForm->TheCompany+" 夜审表";
AnsiString SQL;
SQL=" select a.orderno ,sum(a.needkmoney)as 'needroompany' ,b.needCost ,b.pandycost ,b.pandycost-sum(a.needkmoney)-b.needcost as 'rest',c.name,c.sex ,d.passno,d.passtype,d.roomno into #xuchaofei from roomorder a,orders b ,custom c,peoplewith d where a.orderno=b.orderno and a.orderno=d.orderno and c.customid=b.customid and c.name=d.name and b.used=1 and b.checked=0 group by a.orderno ,b.needCost,b.pandycost ,c.name,c.sex ,d.passno,d.passtype,d.roomno";
////////
ADOQueryPrint->Active=false;
ADOQueryPrint->SQL->Clear();
ADOQueryPrint->SQL->Add(SQL);
ADOQueryPrint->ExecSQL();
SQL="";
SQL="select * from #xuchaofei where rest<0";
ADOQueryPrint->Active=false;
ADOQueryPrint->SQL->Clear();
ADOQueryPrint->SQL->Add(SQL);
ADOQueryPrint->Active=true;
}
//---------------------------------------------------------------------------
void __fastcall TTheNightDecidePrintForm::FormClose(TObject *Sender,
TCloseAction &Action)
{
Action=caFree;
}
//---------------------------------------------------------------------------
void __fastcall TTheNightDecidePrintForm::FormDestroy(TObject *Sender)
{
AnsiString SQL;
SQL="";
SQL="drop table #xuchaofei";
ADOQuery1->Active=false;
ADOQuery1->SQL->Clear();
ADOQuery1->SQL->Add(SQL);
ADOQuery1->ExecSQL();
}
//---------------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -