public ActionResult GetAllDepartment() { if (Session["UserRoleId"] == null) { return(RedirectToAction("Login", "Login")); } List <Department> departments = _sectionManager.GetAllDepartments(); return(Json(departments)); }