Ejemplo n.º 1
0
        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));
        }