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

📄 cw_fwhshz.pas

📁 结于初学者来说这对数据库是一个很好的例子
💻 PAS
字号:
unit cw_fwhshz;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ComCtrls, StdCtrls, Buttons;

type
  TForm42 = class(TForm)
    Label1: TLabel;
    SpeedButton1: TSpeedButton;
    GroupBox1: TGroupBox;
    Label2: TLabel;
    Label3: TLabel;
    Button1: TButton;
    rqq: TDateTimePicker;
    rqh: TDateTimePicker;
    Button2: TButton;
    procedure SpeedButton1Click(Sender: TObject);
    procedure FormShow(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form42: TForm42;

implementation

uses cw_fwhsdy, cw_main, cw_fwhsdy1;

{$R *.dfm}

procedure TForm42.SpeedButton1Click(Sender: TObject);
begin
 close;
end;

procedure TForm42.FormShow(Sender: TObject);
begin
 rqq.Date:=date-1;
 rqh.Date:=date;

end;

procedure TForm42.Button1Click(Sender: TObject);
  var aaa,bbb:string;
begin
  aaa:=DateTimeToStr(rqq.DateTime);
  bbb:=DateTimeToStr(rqh.DateTime);
  form43.rq.Caption:='从'''+aaa+'''至'''+bbb+'''';
  form43.Q_spxf.SQL.Clear;
  form43.Q_spxf.SQL.Add('select waiter,MenuName,sum(Quantity) as sl,sum(SalePrice*Quantity) as je from h_Dinlist where  (endtime is not null) and cstr(EndTime) between '''+aaa+''' and '''+bbb+''' group by waiter,MenuName');
  form43.Q_spxf.Open;
  form43.bbr.Caption:=form1.operator.Caption;
  form43.QuickRep1.Preview;
end;

procedure TForm42.Button2Click(Sender: TObject);
  var aaa,bbb:string;
begin
  aaa:=DateTimeToStr(rqq.DateTime);
  bbb:=DateTimeToStr(rqh.DateTime);
  form44.rq.Caption:='从'''+aaa+'''至'''+bbb+'''';
  form44.Q_spxf.SQL.Clear;
  form44.Q_spxf.SQL.Add('select waiter,MenuName,sum(Quantity) as sl,sum(SalePrice*Quantity) as je from h_sn_Dinlist where menutype=3 and (endtime is not null) and  cstr(EndTime) between '''+aaa+''' and '''+bbb+''' group by waiter,MenuName');
  form44.Q_spxf.Open;
  form44.bbr.Caption:=form1.operator.Caption;
  form44.QuickRep1.Preview;
end;

end.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -