コード例 #1
0
 public ActionResult Entry(Entry Model)
 {
     if (ModelState.IsValid)
     {
         if (!Identity.Authentication(Model.Login, cryptMD5.GetHash(Model.Password)))
         {
             ModelState.AddModelError("Password", "Пароль не верный");
         }
     }
     return(Redirect("/Account/Entry"));
 }
コード例 #2
0
 public ActionResult Entry(UserDTO Model)
 {
     if (Identity.Authentication(Model.Login, Model.Password))
     {
         return(Redirect("/Home"));
     }
     else
     {
         ModelState.AddModelError("Password", "Пароль не верный");
     }
     return(Redirect("/Account/Account"));
 }