public ActionResult Index(FormCollection T) { LoginCredentials login = new LoginCredentials(T); if (login.IsDesignationNullOrEmpty()) { System.Threading.Thread.Sleep(3000); return(View()); } if (login.IsManager()) { return(RedirectToAction("Index", "MyTeam")); } else { return(RedirectToAction("HRRequest", "DisplayHRRequests")); } }
// // GET: /Login/ public ActionResult LoginError(FormCollection T) { //System.Threading.Thread.Sleep(3000); LoginCredentials login = new LoginCredentials(T); if (login.IsDesignationNullOrEmpty()) { return(PartialView("LoginError", login)); } if (login.IsManager()) { return(Json(new { url = Url.Action("Index", "MyTeam") })); //return RedirectToAction("Index", "MyTeam"); } else { return(Json(new { url = Url.Action("HRRequest", "DisplayHRRequests") })); //return RedirectToAction("HRRequest", "DisplayHRRequests"); } }