Esempio n. 1
0
        /// <summary>
        /// 删除角色
        /// </summary>
        /// <param name="args"></param>
        /// <returns></returns>
        public CommandResult <int> DeleteRole(DeleteRoleArgs args)
        {
            ArgumentHelper.Require(args.SchoolId, "SchoolId", Arguments.Positive);
            ArgumentHelper.Require(args.RoleId, "RoleId", Arguments.Positive);
            ArgumentHelper.Require(args.ModifyBy, "ModifyBy", Arguments.Positive);

            return(ContainerFactory <IRoleRepository> .Instance.DeleteRole(args));
        }
Esempio n. 2
0
        public CommandResult <int> DeleteRole(DeleteRoleArgs args)
        {
            try
            {
                var result = ContainerFactory <ISqlExcuteContext> .Instance.ExcuteProceDure(0, "delete_role", args);

                return(result);
            }
            catch (Exception e)
            {
                LogHelper.Error(this.GetType(), "角色模块-删除角色失败,RoleId:" + args.RoleId, e);
                return(CommandResult.Failure <int>(e.ToString()));
            }
        }