Beispiel #1
0
        public ActionResult EmployeesLogin(EmployeeModel employee)
        {
            var emp = HTTPHelpers.LoginMethod <EmployeeModel>("http://localhost:37796/", "Login/EmployeeLogin", RestSharp.Method.POST, employee);

            if (emp != null)
            {
                Session["Login"]    = emp;
                Session["UserType"] = "Employee";
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(RedirectToAction("LoginHata"));
            }
        }
Beispiel #2
0
        // GET: Logins
        public ActionResult CustomersLogin(CustomersModel customer)
        {
            var cust = HTTPHelpers.LoginMethod <CustomersModel>("http://localhost:37796/", "Login/CustomersLogin", RestSharp.Method.POST, customer);

            if (cust != null)
            {
                Session["Login"]    = cust;
                Session["UserType"] = "Customer";
                return(RedirectToAction("Index", "Home"));
            }
            else
            {
                return(RedirectToAction("LoginHata"));
            }
        }