📄 u_xgmm.pas
字号:
unit U_xgmm;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, Buttons, ExtCtrls;
type
Tfrm_xgmm = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Label1: TLabel;
Edit1: TEdit;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
procedure BitBtn3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
frm_xgmm: Tfrm_xgmm;
implementation
uses U_data;
{$R *.dfm}
procedure Tfrm_xgmm.BitBtn3Click(Sender: TObject);
begin
with data1.ADOlogin do
begin
close;
sql.Clear;
sql.Add('select * from 操作员信息表 where 操作员名称=:a and 操作员密码=:b ');
parameters.ParamByName('a').Value:=trim(edit1.Text);
parameters.ParamByName('b').Value:=trim(edit2.Text);
open;
end;
if data1.ADOlogin.RecordCount>0 then
if edit3.Text = edit4.Text then
begin
with data1.ADOlogin do
begin
edit;
data1.ADOlogin.FieldByName('操作员密码').Value:=edit3.Text;
post;
end;
application.MessageBox('密码修改成功','提示',64);
close;
end
else
begin
application.MessageBox('两次密码输入不一至!','提示',64);
edit3.SetFocus;
end
else
begin
application.MessageBox('操作员名称或密码错误!','提示',64);
edit1.SetFocus;
end;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -