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); }
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); }