📄 buybook.~pas
字号:
unit BuyBook;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, dxBar, dxBarExtItems, StdCtrls, ComCtrls, dxExEdtr, dxCntner,
dxTL, dxDBCtrl, dxDBGrid, DB, ADODB, dxDBTLCl, dxGrClms, ExtCtrls,
FR_PTabl, Grids, DBGrids;
type
TfrmBuyBook = class(TForm)
dxBarManager1: TdxBarManager;
dxBarLargeButton1: TdxBarLargeButton;
dxBarLargeButton2: TdxBarLargeButton;
dxBarLargeButton3: TdxBarLargeButton;
dxBarLargeButton5: TdxBarLargeButton;
dxBarLargeButton6: TdxBarLargeButton;
dxBarLargeButton4: TdxBarLargeButton;
qryBuyBook: TADOQuery;
dsBuyBook: TDataSource;
Panel1: TPanel;
DBGrid1: TDBGrid;
frPrintGrid1: TfrPrintGrid;
qryBuyBookBookId: TWideStringField;
qryBuyBookBookName: TWideStringField;
qryBuyBookExpr1002: TFloatField;
qryBuyBookExpr1003: TBCDField;
procedure dxBarLargeButton1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure dxBarLargeButton6Click(Sender: TObject);
procedure dxBarLargeButton4Click(Sender: TObject);
procedure qryBuyBookExpr1003GetText(Sender: TField; var Text: String;
DisplayText: Boolean);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frmBuyBook: TfrmBuyBook;
implementation
uses Data;
{$R *.dfm}
procedure TfrmBuyBook.dxBarLargeButton1Click(Sender: TObject);
begin
with qryBuyBook do
begin
Close;
SQL.Text :='Select BookId,BookName,Sum(BookCount),Sum(TotalMoney) From tbBookingSubs group by BookId,BookName ';
Open;
end;
end;
procedure TfrmBuyBook.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Action :=caFree;
frmBuyBook :=nil;
end;
procedure TfrmBuyBook.dxBarLargeButton6Click(Sender: TObject);
begin
//dxDBGrid1.p
frPrintGrid1.ShowReport;
end;
procedure TfrmBuyBook.dxBarLargeButton4Click(Sender: TObject);
begin
Close;
end;
procedure TfrmBuyBook.qryBuyBookExpr1003GetText(Sender: TField;
var Text: String; DisplayText: Boolean);
begin
if Sender.AsString<>'' then
begin
Text :=FormatFloat('0.00',Sender.AsFloat);
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -