zhuanyefind.pas

来自「气象信息服务(delphi) 气象信息服务(delphi)」· PAS 代码 · 共 66 行

PAS
66
字号
unit zhuanyefind;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DB, ADODB, StdCtrls, Grids, DBGrids;

type
  TzyfufindForm = class(TForm)
    ADOQuery1: TADOQuery;
    GroupBox1: TGroupBox;
    Label1: TLabel;
    Edit1: TEdit;
    Label2: TLabel;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    CheckBox1: TCheckBox;
    DBGrid1: TDBGrid;
    DataSource1: TDataSource;
    procedure Button2Click(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  zyfufindForm: TzyfufindForm;
  con,con1,con2:string;
implementation

{$R *.dfm}

procedure TzyfufindForm.Button2Click(Sender: TObject);
begin
close();
end;

procedure TzyfufindForm.Button1Click(Sender: TObject);
begin
con1:=edit1.Text;
con2:=edit2.Text;



  if checkbox1.checked then
  con1:='%'+con1+'%';
  con2:='%'+con2+'%';

begin
  adoquery1.Close;
  adoquery1.SQL.Clear;
  adoquery1.SQL.Text:='select * from zyfw where rq like:rq and fwdw like:fwdw ';

  adoquery1.Parameters.ParamByName('rq').Value:=con1;

  adoquery1.Parameters.ParamByName('fwdw').Value:=con2;
  adoquery1.Open;
  end;
end;

end.

⌨️ 快捷键说明

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