public ActionResult CheckPoint() { var model = new AuthViewModel(); if (model.IsInitialized()) return RedirectToAction("login"); return View(model); }
public ActionResult Login(AuthViewModel model) { if (model.UserExists()) { Sessao.SignIn(model.login); return RedirectToAction("index", "dashboard"); } return View(model); }
public ActionResult Login() { var model = new AuthViewModel(); if (!model.IsInitialized()) return RedirectToAction("checkpoint"); if (Request.IsAuthenticated) return RedirectToAction("index", "dashboard"); return View(); }
public ActionResult CheckPoint(AuthViewModel model) { if (ModelState.IsValid && model.InsertFirst()) { Sessao.SignIn(model.login); return RedirectToAction("index", "dashboard"); } return View(model); }