public JsonResult GetDepartmentInfo() { deptBll = new deptBLL(); List <Department> listDept = deptBll.GetDepartmentInfo(); return(Json(new { data = listDept }, JsonRequestBehavior.AllowGet)); }
public JsonResult GetMaxDepartmentId() { deptBll = new deptBLL(); var deptId = deptBll.GetMaxDepartmentId(); return(Json(new { deptId }, JsonRequestBehavior.AllowGet)); }
public ActionResult DeleteDepartment(Department objDept) { bool status = false; string message = "failed"; deptBll = new deptBLL(); var result = deptBll.DeleteDepartment(objDept); if (result > 0) { status = true; message = "successfully deleted"; } return(new JsonResult { Data = new { status = status, message = message } }); }