findsdyhfrm.pas

来自「本人编写的有关军队营房工作的管理系统」· PAS 代码 · 共 51 行

PAS
51
字号
unit findsdyhfrm;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ExtCtrls, Buttons,db;

type
  Tfindsdyh = class(TForm)
    Panel1: TPanel;
    Panel2: TPanel;
    Label1: TLabel;
    Edit1: TEdit;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    procedure SpeedButton2Click(Sender: TObject);
    procedure SpeedButton1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  findsdyh: Tfindsdyh;

implementation

uses datafrm,sdyhfrm;
{$R *.dfm}

procedure Tfindsdyh.SpeedButton2Click(Sender: TObject);
begin
close;
end;

procedure Tfindsdyh.SpeedButton1Click(Sender: TObject);
begin
if findsdyh.Edit1.Text<>'' then
  begin
    if not yfgldata.sdyh.Locate('姓名',findsdyh.Edit1.Text,[loCaseInsensitive]) then
    messagebox(findsdyh.handle,'系统不存在此用户。','营房工作管理系统',16);
    close;
  end
else
  messagebox(findsdyh.handle,'姓名不能为空值。','营房工作管理系统',16);
end;

end.

⌨️ 快捷键说明

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