⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 changekey.pas

📁 1. 纯粹的合同管理,不涉及其它业务,独立成系统2. 简单明了,流程清析3. 合同条款可预定制4. 丰富强大的打印预览系统5. 实用的导入导出功能,可与excel交互使用6. 时刻追踪合同执行情况,包
💻 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 + -