示例#1
0
        /// <summary>
        /// 添加角色权限
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public CommandResult <object> CreateOrUpdateRoleMenu(CreateOrUpdateRoleMenuArgs args)
        {
            ArgumentHelper.Require(args.RoleId, "RoleId", Arguments.Positive);
            ArgumentHelper.Require(args.SchoolId, "SchoolId", Arguments.Positive);
            ArgumentHelper.Require(args.MenuId, "MenuId", Arguments.Positive);
            ArgumentHelper.Require(args.CreateBy, "CreateBy", Arguments.Positive);
            ArgumentHelper.Require(args.ModifyBy, "ModifyBy", Arguments.Positive);

            return(ContainerFactory <IRoleMenuRepository> .Instance.CreateOrUpdateRoleMenu(args));
        }
示例#2
0
        public CommandResult <object> CreateOrUpdateRoleMenu(CreateOrUpdateRoleMenuArgs args)
        {
            try
            {
                var result = ContainerFactory <ISqlExcuteContext> .Instance.ExcuteScalarProceDure(0, "create_or_update_role_menu",
                                                                                                  args);

                return(result);
            }
            catch (Exception e)
            {
                LogHelper.Error(this.GetType(), "角色菜单模块-新增角色权限信息失败", e);
                return(CommandResult.Failure <object>(e.ToString()));
            }
        }