count.pas
来自「1. 纯粹的合同管理,不涉及其它业务,独立成系统2. 简单明了,流程清析3. 合」· PAS 代码 · 共 96 行
PAS
96 行
unit count;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, TEMPLETFORM, MaskImageButton, ComCtrls, StdCtrls, ExtCtrls,
Menus, ToolWin, HemisphereButton;
type
TCountForm = class(TMyForm)
rgCountType: TRadioGroup;
GroupBox1: TGroupBox;
dtpStartTime: TDateTimePicker;
dtpEndTime: TDateTimePicker;
Label1: TLabel;
Label2: TLabel;
HemiBtn_Count: THemiBtn;
Label3: TLabel;
procedure FormCreate(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure HemiBtn_CountClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
CountForm: TCountForm;
implementation
uses CountResult, data;
{$R *.dfm}
procedure TCountForm.FormCreate(Sender: TObject);
begin
inherited;
rgCountType.ItemIndex :=0;
dtpStartTime.DateTime :=now;
dtpEndTime.DateTime :=now;
end;
procedure TCountForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
inherited;
Action:=caFree;
end;
procedure TCountForm.HemiBtn_CountClick(Sender: TObject);
begin
inherited;
{ CountResultForm:=TCountResultForm.Create(Application);
CountResultForm.CountType :=rgCountType.ItemIndex;
case rgCountType.ItemIndex of
0: begin
//上机统计
with DM.ADOQOnlineCount do
begin
Active :=false;
Parameters.ParamByName('@startDate').Value :=DateToStr(dtpStartTime.Date);
Parameters.ParamByName('@endDate').Value :=DateToStr(dtpEndTime.Date);
Active :=true;
end;
CountResultForm.DBGrid1.DataSource :=DM.DSOnlineCount;
end;
1: begin
//充值统计
with DM.ADOQFillCount do
begin
Active :=false;
Parameters.ParamByName('@startDate').Value :=DateToStr(dtpStartTime.Date);
Parameters.ParamByName('@endDate').Value :=DateToStr(dtpEndTime.Date);
Active :=true;
end;
CountResultForm.DBGrid1.DataSource :=DM.DSFillCount;
end;
2: begin
//会员统计
with DM.ADOQMemberCount do
begin
Active :=false;
Parameters.ParamByName('@startDate').Value :=DateToStr(dtpStartTime.Date);
Parameters.ParamByName('@endDate').Value :=DateToStr(dtpEndTime.Date);
Active :=true;
end;
CountResultForm.DBGrid1.DataSource :=DM.DSMemberCount;
end;
end;
CountResultForm.ShowModal; }
end;
end.
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?