|
楼主 |
发表于 2007-5-21 16:19:54
|
显示全部楼层
procedure TDLCT.btnLoginClick(Sender: TObject);(点击登录按钮时)
var
LegalUser : integer;
lDetailForm :Tform;
begin
LegalUser:=0;
with dsbZBYBSJJ do
begin
DataSet.Open;
DataSet.First;
while not DataSet.Eof do
begin
if (edtUserName.Text=DataSet.FieldByName('ZBYMC').AsString) and
(edtPassWord.Text=DataSet.FieldByName('ZBYMM').AsString) then
begin
jsDialogs.ShowMsg('合法用户','提示信息');
LegalUser:=1;
{调用另外的功能}
systemcore.TSystemCore.FuncManager.RunFunc(Context, '', 'Biz:\STUDYSPACE\HY\YXGLRZ3.Func', '', nil, false);
{关闭登录窗体,就是在这里报错}
systemcore.TSystemCore.FuncManager.TerminateFunc(fnbDLGN.Func,true);
break;
end;
DataSet.Next;
end;
end;
if LegalUser=0 then
jsDialogs.ShowWarning('用户名或者密码错误','错误信息');
end; |
|