Пример #1
0
        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"));
        }
Пример #2
0
        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." }));
            }
        }