View source code: 0000.zip_cw_sntj.~pas - VerySource

cw_sntj.~pas

Upload User: xgks2007
Upload Date: 2015-04-22
Package Size: 6496k
Code Size: 2k
Category: MiddleWare
Development Platform: C++ Builder
  1. unit cw_sntj;
  2. interface
  3. uses
  4.   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  5.   Dialogs, StdCtrls, Buttons, ComCtrls, DB, DBTables;
  6. type
  7.   TForm32 = class(TForm)
  8.     Label1: TLabel;
  9.     SpeedButton1: TSpeedButton;
  10.     GroupBox1: TGroupBox;
  11.     Label2: TLabel;
  12.     Label3: TLabel;
  13.     Button2: TButton;
  14.     Button3: TButton;
  15.     rqq: TDateTimePicker;
  16.     rqh: TDateTimePicker;
  17.     Q_ckxf: TQuery;
  18.     procedure SpeedButton1Click(Sender: TObject);
  19.     procedure Button3Click(Sender: TObject);
  20.     procedure Button2Click(Sender: TObject);
  21.     procedure FormShow(Sender: TObject);
  22.   private
  23.     { Private declarations }
  24.   public
  25.     { Public declarations }
  26.   end;
  27. var
  28.   Form32: TForm32;
  29. implementation
  30. uses cw_sntjdin, cw_main, cw_sndyacc;
  31. {$R *.dfm}
  32. procedure TForm32.SpeedButton1Click(Sender: TObject);
  33. begin
  34. close;
  35. end;
  36. procedure TForm32.Button3Click(Sender: TObject);
  37.   var
  38.      aaa,bbb:string;
  39.      ckxf:integer;
  40. begin
  41.   aaa:=DateTimeToStr(rqq.DateTime);
  42.   bbb:=DateTimeToStr(rqh.DateTime);
  43.   Q_ckxf.Active:=false;
  44.   Q_ckxf.Params.ParamValues['aa']:=aaa;
  45.   Q_ckxf.Params.ParamValues['bb']:=bbb;
  46.   Q_ckxf.Active:=true;
  47.   ckxf:=Q_ckxf.RecordCount;
  48.   form35.ckxf.Caption:=inttostr(ckxf);
  49.   form35.bbr.Caption:=form1.operator.Caption;
  50.   form35.QR_date.Caption:='从'''+aaa+'''至'''+bbb+'''';
  51.   form35.Q_accountprn.Active:=False;
  52.   form35.Q_accountprn.SQL.Clear;
  53.   form35.Q_accountprn.SQL.Add('select * from H_Sn_Account where (endtime is not null) and cstr(EndTime) between '''+aaa+''' and '''+bbb+''' order by accountno');
  54.   form35.Q_accountprn.Active:=True;
  55.   form35.QuickRep1.Preview;
  56. end;
  57. procedure TForm32.Button2Click(Sender: TObject);
  58.  var ccc,ddd:string;
  59. begin
  60.   ccc:=DateTimeToStr(rqq.DateTime);
  61.   ddd:=DateTimeToStr(rqh.DateTime);
  62.   form33.bbr.Caption:=form1.operator.Caption;
  63.   form33.QR_date.Caption:='从'''+ccc+'''至'''+ddd+'''';
  64.   form33.Q_h_sn_DinList.Active:=False;
  65.   form33.Q_h_sn_DinList.SQL.Clear;
  66.   form33.Q_h_sn_DinList.SQL.Add('select * from H_Sn_DinList where (endtime is not null) and cstr(EndTime) between '''+ccc+''' and '''+ddd+''' order by accountno');
  67.   form33.Q_h_sn_DinList.Active:=True;
  68.   form33.QuickRep1.Preview;
  69. end;
  70. procedure TForm32.FormShow(Sender: TObject);
  71. begin
  72.   rqq.Date:=date-1;
  73.   rqh.Date:=date;
  74. end;
  75. end.