unit24.~pas

来自「本软件的功能如下: 1.公司员工工资信息输入查找 2.工资计算 3.工资汇总 4」· ~PAS 代码 · 共 93 行

~PAS
93
字号
unit Unit24;

interface

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

type
  TForm24 = class(TForm)
    Label1: TLabel;
    Label2: TLabel;
    Label3: TLabel;
    Edit1: TEdit;
    Edit2: TEdit;
    Button1: TButton;
    Button2: TButton;
    Table1: TTable;
    DataSource1: TDataSource;
    procedure Button1Click(Sender: TObject);
    procedure Button2Click(Sender: TObject);
    procedure FormActivate(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form24: TForm24;

implementation

{$R *.dfm}

procedure TForm24.Button1Click(Sender: TObject);
begin
if edit1.Text<>'' then
begin

     if edit1.Text=table1.FieldByName('YHM').AsString then
     begin

          if edit2.Text<>'' then
          begin
               table1.Edit;
               table1.FieldByName('YHM').AsString:=edit2.Text;
               table1.Post;
               FORM24.Close;
          end
          else
          begin
               showmessage('密码不能为空');
               edit1.Text:='';
               edit1.SetFocus;
          end;
     end
     else
     begin
          showmessage('你输入的密码不对');
          edit1.Text:='';
          edit2.Text:='';
          edit1.SetFocus;


     end;
end
else
begin
     showmessage('旧密码不能为空');
     edit1.Text:='';
     edit2.Text:='';
     edit1.SetFocus;

end;


end;

procedure TForm24.Button2Click(Sender: TObject);
begin
FORM24.Close;
end;

procedure TForm24.FormActivate(Sender: TObject);
begin
EDIT1.SetFocus;
end;



end.

⌨️ 快捷键说明

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