⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 count.pas

📁 1. 纯粹的合同管理,不涉及其它业务,独立成系统2. 简单明了,流程清析3. 合同条款可预定制4. 丰富强大的打印预览系统5. 实用的导入导出功能,可与excel交互使用6. 时刻追踪合同执行情况,包
💻 PAS
字号:
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -