// GET: SystemMaint/Role/Details/5 public ActionResult GetDetail(int id) { BL.RoleInfo empBL = new BL.RoleInfo(); if (empBL.GetItemByIdForDelete(id) != null) { return(Redirect(Url.Action("HttpError", "Error", new { area = "" }))); } var model = empBL.GetItemById(id); return(PartialView("_Detail", model)); }
public ActionResult Delete(int id) { // TODO: Add delete logic here BL.RoleInfo empBL = new BL.RoleInfo(); if (empBL.GetItemByIdForDelete(id) != null) { return(Redirect(Url.Action("HttpError", "Error", new { area = "" }))); } if (empBL.ValidateDelete(id)) { //return Content("失败"); return(Json("exist", JsonRequestBehavior.AllowGet)); } else { var model = empBL.Delete(id, UserHelper.GetCurrentUser().LogonName); //CacheDependencyHelper.Change(new string[] { BasicParam.RolePermissionCacheKey }); //return Content("success"); return(Json(model, JsonRequestBehavior.AllowGet)); } }