?? changekey.pas
字號:
unit ChangeKey;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ModalForm, StdCtrls, Menus, MoveImageButton, LabelButton,
ComCtrls, ToolWin, ExtCtrls, ADODB;
type
TChangeKeyForm = class(TMyModalForm)
Label2: TLabel;
edtOldKey: TEdit;
Label1: TLabel;
edtNewKey: TEdit;
Label3: TLabel;
edtNewKey1: TEdit;
ADOCommand1: TADOCommand;
procedure MIBtnOKClick(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
ChangeKeyForm: TChangeKeyForm;
implementation
uses data;
{$R *.dfm}
procedure TChangeKeyForm.MIBtnOKClick(Sender: TObject);
begin
inherited;
if GetPassword(edtOldKey.Text)<>DM.curAdmin.FPassword then
begin
ShowMessage('原密碼不正確!');
exit;
end
else begin
if edtNewKey.Text <>edtNewKey1.Text then
begin
ShowMessage('兩次輸入的密碼不一致,請重新輸入!');
exit;
end
else begin
DM.curAdmin.FPassword :=GetPassword(edtNewKey.Text);
ADOCommand1.Parameters.ParamByName('@adPassword').Value :=DM.curAdmin.FPassword;
ADOCommand1.Parameters.ParamByName('@adLoginName').Value :=DM.curAdmin.FLoginName;
ADOCommand1.Execute;
if DM.ADOTAdminList.Active then
DM.ADOTAdminList.Refresh;
ModalResult:=mrOK;
end;
end;
end;
end.
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -