?? printfactapply.~pas
字號:
unit Printfactapply;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;
type
TPrintFactapplyfrm = class(TForm)
GroupBox1: TGroupBox;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Button1: TButton;
Button2: TButton;
GroupBox2: TGroupBox;
Label3: TLabel;
Edit3: TEdit;
Button3: TButton;
CheckBox1: TCheckBox;
Edit4: TEdit;
Button4: TButton;
Button5: TButton;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
PrintFactapplyfrm: TPrintFactapplyfrm;
implementation
uses MSDM, factapplyrpt, PickDate, PickFactory;
{$R *.DFM}
procedure TPrintFactapplyfrm.Button1Click(Sender: TObject);
begin
if pickdatefrm.ShowModal=mrok then
edit1.Text:=datetostr(pickdatefrm.date);
end;
procedure TPrintFactapplyfrm.Button2Click(Sender: TObject);
begin
if pickdatefrm.ShowModal=mrok then
edit2.Text:=datetostr(pickdatefrm.date);
end;
procedure TPrintFactapplyfrm.Button3Click(Sender: TObject);
begin
if pickfactoryfrm.ShowModal=mrok then
begin
edit3.Text:=msdm.ModernSolidDM.Factfactno.Value;
edit4.Text:=msdm.ModernSolidDM.Factfactname.Value;
end;
end;
procedure TPrintFactapplyfrm.Button4Click(Sender: TObject);
begin
msdm.ModernSolidDM.FactFactApplyQry.close;
msdm.ModernSolidDM.FactFactApplyQry.SQL.Clear;
msdm.ModernSolidDM.FactFactApplyQry.sql.Add('select * from factoryapplyh,factoryapplyb');
msdm.ModernSolidDM.FactFactApplyQry.sql.add(' where factoryapplyh.applydate>= ');
msdm.ModernSolidDM.FactFactApplyQry.sql.add( '#'+edit1.Text+'#');
msdm.ModernSolidDM.FactFactApplyQry.sql.Add('and applydate<= ');
msdm.ModernSolidDM.FactFactApplyQry.sql.Add('#'+edit2.text+'#');
if not (CheckBox1.Checked) then msdm.ModernSolidDM.FactFactApplyQry.sql.Add('and factoryapplyh.factno='+ '''' +edit3.Text+'''');
msdm.ModernSolidDM.FactFactApplyQry.sql.Add('order by factoryapplyh.applyno');
msdm.ModernSolidDM.FactFactApplyQry.open;
FactApplyrptfrm.QuickRep1.Preview;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -