EmployeeFrm.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:1k
- unit EmployeeFrm;
- interface
- uses
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, StdCtrls, ExtCtrls;
- type
- TEmployeeForm = class(TForm)
- Label1: TLabel;
- EDLoginName: TEdit;
- Label2: TLabel;
- EDTrueName: TEdit;
- Label3: TLabel;
- EDPassword: TEdit;
- Label4: TLabel;
- EDConfirmPassword: TEdit;
- Label5: TLabel;
- CBJob: TComboBox;
- Label6: TLabel;
- CBLevel: TComboBox;
- Bevel1: TBevel;
- BTOK: TButton;
- BTCancel: TButton;
- procedure EDLoginNameChange(Sender: TObject);
- procedure EDLoginNameKeyPress(Sender: TObject; var Key: Char);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
- var
- EmployeeForm: TEmployeeForm;
- implementation
- {$R *.dfm}
- procedure TEmployeeForm.EDLoginNameChange(Sender: TObject);
- begin
- BTOK.Enabled:=True;
- if Trim(EDLoginName.Text)='' then BTOK.Enabled:=False;
- if Trim(EDTrueName.Text)='' then BTOK.Enabled:=False;
- if Trim(EDPassword.Text)<>Trim(EDConfirmPassword.Text) then BTOK.Enabled:=False;
- if Trim(CBJob.Text)='' then BTOK.Enabled:=False;
- if Trim(CBLevel.Text)='' then BTOK.Enabled:=False;
- end;
- procedure TEmployeeForm.EDLoginNameKeyPress(Sender: TObject;
- var Key: Char);
- begin
- if Ord(Key)=Ord('''') then key:=#0;
- end;
- end.