procedure Tfrmchangepwd.cxButton1Click(Sender: TObject);
begin
if edt1.Text <> edt2.Text then
begin
ShowMessage('两次输入的密码不匹配,请重新输入。');
edt1.SetFocus;
exit;
end;
with Dm1.tblLoginUser do
begin
if not Active then
open;
First;
while not eof do
begin
if Trim(FieldByName('mc').AsString) = frmMain.LoginUserName then
begin
Edit;
FieldByName('pwd').AsString := edt1.Text;
post;
Break;
end;
next;
end;
close;
MessageBox(0, '密码修改成功。', '提示', MB_OK + MB_ICONWARNING);
end;
close;
end;
procedure Tfrmchangepwd.cxButton2Click(Sender: TObject);
begin
close;
end;