?? 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 + -