public ActionResult EmpLogin(UserLogin user) { var login = new LoginAccess(); int userId = login.CheckEmployeeLogin(user.userName, user.password); if (userId > 0) { Session["employeeId"] = userId; return(RedirectToAction("SignUp", "SetupSignUp")); } TempData["lbl"] = "Incorrect Username & Password combination. Please confirm entry and resubmit."; return(RedirectToAction("EmpLogin", "Login")); }
public ActionResult EmployeeLogin(UserLogin user) { var login = new LoginAccess(); int userId = login.CheckEmployeeLogin(user.userName, user.password); if (userId > 0) { Session["employeeId"] = userId; return(RedirectToAction("EmployeeDetail", "EmployeeDashBoard")); } else { return(RedirectToAction("EmployeeLogin", "Login", new { lbl = "Incorrect Username & Password combination. Please confirm entry and resubmit." })); } }