printcustapply.~pas

来自「用delphi编写的超市进销系统。功能挺全的额」· ~PAS 代码 · 共 90 行

~PAS
90
字号
unit Printcustapply;

interface

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

type
  TPrintcustapplyfrm = class(TForm)
    GroupBox1: TGroupBox;
    GroupBox2: TGroupBox;
    Label1: TLabel;
    Label2: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    Label3: TLabel;
    Edit3: TEdit;
    Button3: TButton;
    CheckBox1: TCheckBox;
    Edit4: TEdit;
    Button4: TButton;
    Button5: TButton;
    procedure Button5Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure Button3Click(Sender: TObject);
    procedure Button4Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Printcustapplyfrm: TPrintcustapplyfrm;

implementation

uses MSDM, custapplyrpt, PickCustomer, PickDate;

{$R *.DFM}

procedure TPrintcustapplyfrm.Button5Click(Sender: TObject);
begin
close;
end;

procedure TPrintcustapplyfrm.Button1Click(Sender: TObject);
begin
if pickdatefrm.ShowModal=mrok then
   edit1.Text:=datetostr(pickdatefrm.date);

end;

procedure TPrintcustapplyfrm.Button2Click(Sender: TObject);
begin
if pickdatefrm.ShowModal=mrok then
   edit2.Text:=datetostr(pickdatefrm.date);

end;

procedure TPrintcustapplyfrm.Button3Click(Sender: TObject);
begin
if pickcustomerfrm.ShowModal=mrok then
begin
   edit3.Text:=msdm.ModernSolidDM.CustCustno.Value;
   edit4.Text:=msdm.ModernSolidDM.CustCustname.Value;
end;   
end;

procedure TPrintcustapplyfrm.Button4Click(Sender: TObject);
begin
     msdm.ModernSolidDM.CustCustApplyQry.close;
     msdm.ModernSolidDM.CustCustApplyQry.SQL.Clear;
     msdm.ModernSolidDM.CustCustApplyQry.sql.Add('select * from custapplyh,custapplyb');
     msdm.ModernSolidDM.CustCustApplyQry.sql.add(' where custapplyh.applydate>= ');
     msdm.ModernSolidDM.CustCustApplyQry.sql.add( '#'+edit1.Text+'#');
     msdm.ModernSolidDM.CustCustApplyQry.sql.Add('and applydate<= ');
     msdm.ModernSolidDM.CustCustApplyQry.sql.Add('#'+edit2.text+'#');
     if not (printcustapplyfrm.CheckBox1.Checked) then msdm.ModernSolidDM.CustCustApplyQry.sql.Add('and custapplyh.custno='+ '''' +edit3.Text+'''');
     msdm.ModernSolidDM.CustCustApplyQry.sql.Add('order by custapplyh.applyno');
     msdm.ModernSolidDM.CustCustApplyQry.open;
     custapplyrptfrm.QuickRep1.Preview;
end;

end.

⌨️ 快捷键说明

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