Пример #1
0
 protected void GetAccount()
 {
     if (Session["allClientsAccountModel"] != null)
     {
         _Account = Session["allClientsAccountModel"] as AllClientsAccountModel;    
   
     }
     if (_Account == null)
         Response.Redirect("~/Account/ClientLogon");
 }
Пример #2
0
 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 );
 }
Пример #3
0
 /*All Clients Logon*/
   public ActionResult ClientLogon() {
     var model = new AllClientsAccountModel();
     return View( model );
   }