INIT:
import pgm.comm.comm.class;
dcl comm comm = _new_ comm();
dcl num rc;
return;
txt_user:
cursor txt_pwd;
return;
txt_pwd:
link btn_ok;
return;
*确定按钮;
btn_ok:
if txt_user.text="" then do;
comm.warn({'请输入用户名'});return;
end;
if txt_pwd.text="" then do;
comm.warn({'请输入密码'});return;
end;
rc=user.chkUserInfo(user);
if rc^=0 then do;
if rc=-1 then comm.warn({'该用户名不存在'});
else if rc =-2 then do;
comm.warn({'密码输入错误'});
txt_pwd.text="";
end;
else comm.warn({'系统错误'});
pass=0;
end;else do; *用户及密码合法;
rc=user.getUserInfo(user.uname,user);
if rc^=0 then do;
pass=0;
comm.warn({'系统错误-获取用户信息'});
call execcmd('end');
return;
end;