コード例 #1
0
ファイル: AccountController.cs プロジェクト: Laetar/Epam
 public ActionResult Registration(UserLogViewModel userAndPassword)
 {
     if (myUserDAL.RegistrationUser(userAndPassword.User, userAndPassword.Password))
     {
         FormsAuthentication.SetAuthCookie(userAndPassword.User, false);
         return RedirectToAction("Index", "Home");
     }
     else return View(userAndPassword);
 }
コード例 #2
0
ファイル: AccountController.cs プロジェクト: Laetar/Epam
        public ActionResult LogIn(UserLogViewModel userAndPassword, string returnUrl)
        {
            if (myUserDAL.CheckUser(userAndPassword.User,userAndPassword.Password))
            {
                FormsAuthentication.SetAuthCookie(userAndPassword.User,false);

                return RedirectToAction("Index", "Home");
            }

            return View(userAndPassword);
        }