with dm.User do
begin
Close ;
sql.Clear;
sql2:='select A.*,B.部门编码,B.部门名称 from 用户权限 A,部门 B where A.用户名称= "';
sql2:=sql2+ edtAliasName.TEXT+'"'+' and A.密码= "'+ edtPassword.Text +'"';
sql2:=sql2+ ' and A.部门=B.部门编码';
sql.Add(sql2);
open;
if RecordCount> 0 then vLogined:=true
else vLogined:=false;
end;
if vLogined=false then
begin
Application.MessageBox('用户名和密码不正确,请重新输入', '提示信息', mb_iconInformation + mb_defbutton1);
exit;
end
else
begin
BM_OFFICEF.StatusBar1.Panels[0].TEXT :='系统提示:' ;
BM_OFFICEF.StatusBar1.Panels[1].TEXT := '北明公司: '+dm.User.Fields[6].AsString+' 操作员: ' +dm.User.Fields[4].AsString ;
BM_OFFICEF.StatusBar1.Panels[2].TEXT := '登陆时间: '+FormatDateTime('YYYY"年" MMMM DD"日" TT',now);
end;
Logined := true;
Close;
end;
procedure TBM_LOGINF.edtAliasNameKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
edtPassword.setfocus;
end;
procedure TBM_LOGINF.edtPasswordKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
if key = 13 then
btnOK.click;
end;
procedure TBM_LOGINF.btnCancelClick(Sender: TObject);
begin
if Application.MessageBox('请确认是否退出本系统', '提示信息', mb_iconinformation + mb_YesNo) = id_yes then
application.Terminate ;end;
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] ... 下一页 >>