예제 #1
0
 public ActionResult Login(AdminViewModel vmInfo)
 {
     if (ModelState.IsValid) //验证通过
     {
         Sys_UserManager bll  = new Sys_UserManager();
         var             info = bll.Login(vmInfo.LoginUID, vmInfo.LoginPWD);
         if (info == null)
         {
             //登录失败
             ModelState.AddModelError("error", "登录失败");
         }
         else
         {
             this.Session["MYUSER"] = info;
             return(Redirect("/LayUI/Index"));
         }
     }
     return(View());
 }