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

📄 unit3.~pas

📁 一个比较好的网上考试系统
💻 ~PAS
字号:
unit Unit3;

interface

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

type
  TForm3 = class(TForm)
    GroupBox1: TGroupBox;
    Edit1: TEdit;
    Label1: TLabel;
    Edit2: TEdit;
    Label2: TLabel;
    Edit3: TEdit;
    Label3: TLabel;
    SpeedButton1: TSpeedButton;
    SpeedButton2: TSpeedButton;
    q2: TADOQuery;
    procedure SpeedButton1Click(Sender: TObject);
    procedure SpeedButton2Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form3: TForm3;

implementation
 uses denglu,quanju;
{$R *.dfm}

procedure TForm3.SpeedButton1Click(Sender: TObject);
begin
  if edit1.Text='' then
      begin
        MessageBox(handle, '输入原口令!', '提示',  mb_IconInformation + mb_Ok);
        exit;
      end;
  if edit2.Text='' then
      begin
        MessageBox(handle, '输入新口令!', '提示',  mb_IconInformation + mb_Ok);
        exit;
       end;
  if  edit2.Text<>edit3.Text then
        begin
        MessageBox(handle, '两次输入口令不一致!', '提示',  mb_IconInformation + mb_Ok);
        exit;
       end;
  if edit1.Text=quanju.password   then
      begin
        q2.Close;
        q2.SQL.Clear;
        q2.SQL.Add('select * from account where admin='+chr(39)+quanju.admin +chr(39));
        q2.Open;
        q2.edit;
        q2.Fields[1].AsString:=edit3.Text;
        if messagedlg('真的要修改么?',mtconfirmation,[mbyes,mbno],0)=mryes  then
             begin
             q2.Post;
             edit1.Clear;
              edit2.Clear;
              edit3.Clear;
             end
         else
             begin
              edit1.Clear;
              edit2.Clear;
              edit3.Clear;
              exit;

             end;


      end;     //---------------------用户名及密码的修改------------------------------
end;

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

end.

⌨️ 快捷键说明

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