Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
        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);
        }