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

📄 selectproout.pas

📁 一个门诊系统程序代码一个门诊系统程序代码一个门诊系统程序代码一个门诊系统程序代码一个门诊系统程序代码
💻 PAS
字号:
unit selectproout;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, baseform, StdCtrls, Buttons, dxExEdtr, dxEdLib, dxCntner,
  dxEditor, dxDBELib, dxdbtrel, DB, ADODB;

type
  Tcg = class(Tfbaseform)
    GroupBox1: TGroupBox;
    btn1: TBitBtn;
    lbl1: TLabel;
    lbl2: TLabel;
    lbl3: TLabel;
    lbl5: TLabel;
    lbl6: TLabel;
    lbl7: TLabel;
    lbl8: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    ComboBox2: TComboBox;
    Edit4: TEdit;
    ADOQuery1: TADOQuery;
    DataSource1: TDataSource;
    dxLookupTreeView1: TdxLookupTreeView;
    dxDateEdit1: TdxDateEdit;
    dxDateEdit2: TdxDateEdit;
    lbl4: TLabel;
    edt1: TEdit;
    procedure FormCreate(Sender: TObject);
    procedure btn1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  cg: Tcg;

implementation

uses dataform, cg_inwhs, cg_outwhs;

{$R *.dfm}

procedure Tcg.FormCreate(Sender: TObject);
begin
  inherited;
dxDateEdit1.Text:=FormatDateTime('YYYY-MM-DD',Date());
dxDateEdit2.Text:=FormatDateTime('YYYY-MM-DD',Date());
end;

procedure Tcg.btn1Click(Sender: TObject);

begin
  inherited;
fcg_inwhs.Qbaseinfo.Close;
fcg_inwhs.Qbaseinfo.SQL.Clear;
fcg_inwhs.Qbaseinfo.SQL.Add('select * from cg_master where (fdate between :f1 and :f2) ');
fcg_inwhs.Qbaseinfo.Parameters.ParamByName('f1').value:=dxDateEdit1.Text;
fcg_inwhs.Qbaseinfo.Parameters.ParamByName('f2').value:=dxDateEdit2.Text;
if edit4.Text<>'' then
  fcg_inwhs.Qbaseinfo.SQL.Add(' and (Ma_pcode like '+''''+'%'+Trim(edit4.Text)+'%'+''''+')');
if edit1.Text<>'' then
  fcg_inwhs.Qbaseinfo.SQL.Add(' and (Ma_pname like '+''''+'%'+Trim(Edit1.Text)+'%'+''''+')');
case combobox2.ItemIndex of
    1:begin
       fcg_inwhs.Qbaseinfo.SQL.Add(' and (fout=1)');
      end;
    2:begin
       fcg_inwhs.Qbaseinfo.SQL.Add(' and (fout=0)');
      end;
end;
if edt1.Text<>'' then
  fcg_inwhs.Qbaseinfo.SQL.Add(' and (Ma_ph like '+''''+'%'+Trim(Edt1.Text)+'%'+''''+')');
if Edit2.Text<>'' then
  fcg_inwhs.Qbaseinfo.SQL.Add(' and (Ma_factory like '+''''+'%'+Trim(Edit2.Text)+'%'+''''+')');
fcg_inwhs.Qbaseinfo.Open;
end;

end.

⌨️ 快捷键说明

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