protected void GetAccount() { if (Session["allClientsAccountModel"] != null) { _Account = Session["allClientsAccountModel"] as AllClientsAccountModel; } if (_Account == null) Response.Redirect("~/Account/ClientLogon"); }
public ActionResult ClientLogon(AllClientsAccountModel model) { if( ModelState.IsValid ) { var clientAuth = new ClientFormsAuthenticationService(); var authenticated = clientAuth.SignIn( model ); if( authenticated ) return RedirectToAction( "Index", "Import" ); else ModelState.AddModelError( "", "The user name or password provided is incorrect." ); } // If we got this far, something failed, redisplay form return View( model ); }
/*All Clients Logon*/ public ActionResult ClientLogon() { var model = new AllClientsAccountModel(); return View( model ); }