public ActionResult Edit(int id) { var jm = new JsonWithUIcallback(); try { var model = _bll.QueryToEnetity(p => p.Id == id); if (model == null) { jm.statusCode = 300; jm.message = "不存在此信息"; jm.closeCurrent = true; return(Json(jm)); } ViewBag.ShowNav = _bll.FindSortList(); ViewBag.ControllerAndAction = AdminsControllerPermission.GetAllControllerAndActionByAssembly(); return(View(model)); } catch (Exception ex) { ComToolsController.AddtxtLog(ex, "编辑", EnumHelper.Nlog.Error.ToString()); jm.statusCode = 300; jm.message = ex.ToString(); jm.closeCurrent = true; } return(Json(jm)); }
public ActionResult Create() { ViewBag.ShowNav = _bll.FindSortList(); ViewBag.ControllerAndAction = AdminsControllerPermission.GetAllControllerAndActionByAssembly(); //自定义内容 return(View()); }
public JsonResult GetAllControllerAndActionByAssembly() { var jm = new AdminUiCallBack(); var data = AdminsControllerPermission.GetAllControllerAndActionByAssembly(); jm.data = data.OrderBy(u => u.name).ToList(); jm.code = 0; jm.msg = "获取成功"; return(new JsonResult(jm)); }
public static List <ControllerPermission> GetControllerPermission() { return(AdminsControllerPermission.GetAllControllerAndActionByAssembly()); }