void View_OnLogin(object sender, Views.LoginArgs e) { DataTable result = Model.GetUserByNOAndPassword(e.UserNO, e.Password); if (result != null && result.Rows.Count > 0) { DataTable dataTime = Model.GetSystemDateTime(); View.ExeLogin(result, dataTime); } else { View.ShowMessage("登录失败,工号或密码错误"); View.TxtUserNOFocus(); } }
void view_OnLogin(object sender, Views.LoginArgs e) { DataTable dtUser = Model.QueryUser(e.UserNo, e.UserPassword); if (dtUser != null && dtUser.Rows.Count > 0) { LoginSuccessBind(dtUser); View.CloseWindow(); } else { View.ShowMessage("用户名或密码错误!"); View.TxtUserNOFocus(); } }