Пример #1
0
        public ActionResult AddDepartment(Department dp)
        {
            Employee e1 = (Employee)Session["Employee"];

            if (Session["EmpID"] != null && e1.isAdmin == true)
            {
                dp.AddDeparment();
                return(RedirectToAction("Department"));
            }
            else
            {
                return(RedirectToAction("Index", "LogIn"));
            }
        }