public object GetLoginUser(LoginUserModel users) { IApplicationUserBusiness applicationUserService = new ApplicationUserBusiness(); return(applicationUserService.GetLoginUser(users)); //_response = new Response(); //try //{ // IApplicationUserBusiness applicationUserService = new ApplicationUserBusiness(); // _response.responseData = applicationUserService.GetLoginUser(users); // //_response.message = _response.Message; // //_response.success = _response.IsSucess; //} //catch (Exception ex) //{ // _response.success = false; // _response.message = ex.Message.ToString(); //} //finally //{ // applicationUserService = null; //} //return _response; }
public void ProcessRequest(HttpContext context) { string json = ""; String action = context.Request.QueryString["action"]; string roleid = "", userid = "", fullname = ""; ApplicationUserBusiness applicationuserclass = new ApplicationUserBusiness(); ApplicationUserData applicationuserdata = new ApplicationUserData(); switch (action) { case "logon": string username = context.Request.Params["userName"]; string password = context.Request.Params["passWord"]; json = applicationuserclass.CheckUserlogon(username, password, ref roleid, ref userid, ref fullname); this.SessionUserId = userid; this.SessionRoleId = roleid; this.SessionUserName = username; this.SessionFullname = fullname; break; case "indexgetsession": json = applicationuserclass.GetAppParameters(context, this.SessionUserName, this.SessionFullname); break; default: break; } context.Response.ContentType = "text/json"; context.Response.Write(json); }
public void ProcessRequest(HttpContext context) { #region HttpRequest requestobject = context.Request; String action = requestobject.QueryString["action"]; String json = ""; //同业务层开始交互 ApplicationUserBusiness applicationuserclass = new ApplicationUserBusiness(); ApplicationUserData applicationuserdata = new ApplicationUserData(); switch (action) { case "update": string userid = context.Request.Params["userid"]; string clientip = context.Request.Params["clientip"]; string oldPwd = context.Request.Params["oldpwd"]; string newpwd = context.Request.Params["newpwd"]; json = applicationuserclass.UpdateSysUserPwd(userid, oldPwd, newpwd); break; default: break; } context.Response.ContentType = "text/json"; context.Response.Write(json); #endregion }
public Response SaveApplicationUser(ApplicationUserModel applicationUserModel) { _response = new Response(); try { IApplicationUserBusiness applicationUserService = new ApplicationUserBusiness(); _response.responseData = applicationUserService.SaveApplicationUser(applicationUserModel); //_response.message = "User Save successfully !!"; //_response.success = true; } catch (Exception ex) { _response.success = false; _response.message = ex.Message.ToString(); } finally { applicationUserService = null; } return(_response); }
public AccountAPIController(ApplicationUserBusiness _applicationUserService) { this.applicationUserService = _applicationUserService; }
public Task SignIn(ApplicationUserBusiness user) { var userData = user.Adapt <ApplicationUserData>(); return(userServices.SignIn(userData)); }
public async Task <IdentityResult> Register(ApplicationUserBusiness user, string pass) { var userData = user.Adapt <ApplicationUserData>(); return(await userServices.Register(userData, pass)); }