public ActionResult GetActions(int secondid, int arid) { ShowResultModel srm = new ShowResultModel(); try { //判断多选框选中还是没有 需要得到角色当前功能的权重值 wgt IEnumerable <AdminAction> listAA = _adminActionService.GetMany(new DirectSpecification <AdminAction>(aa => aa.AMID == secondid)); srm.TipMsg = _adminRoleService.GetActionCheck(listAA, arid); if (srm.TipMsg.Length == 0) { srm.TipMsg = "无数据"; } srm.IsSuccess = true; } catch (InvalidOperationException ex) { srm.TipMsg = ex.Message; } catch (Exception ex) { srm.TipMsg = ex.Message; LoggerHelper.Log("【获取action(角色)】出错,系统操作管理员:" + _currentAdmin.AdminInfo.SAName + ",错误原因:" + (ex.InnerException == null ? ex.Message : ex.InnerException.ToString())); } return(Json(srm, JsonRequestBehavior.AllowGet)); }
public ActionResult Index(int id) { //此id为AMID IEnumerable <AdminAction> listaction = _adminActionService.GetMany(new DirectSpecification <AdminAction>(aa => aa.AMID == id)).OrderBy(aat => aat.SortFlag); ViewBag.Amid = id; return(View(listaction)); }