public ActionResult DeleteDesignation(Designation ds) { Employee e1 = (Employee)Session["Employee"]; if (Session["EmpID"] != null && e1.isAdmin == true) { ds.DeleteDesignation(); return(RedirectToAction("Designation")); } else { return(RedirectToAction("Index", "LogIn")); } }