Exemplo n.º 1
0
        /// <summary>
        /// 删除权限分组
        /// </summary>
        /// <param name="deleteInfo">删除信息</param>
        /// <returns>执行结果</returns>
        public Result DeleteAuthorityGroup(DeleteAuthorityGroupCmdDto deleteInfo)
        {
            using (var businessWork = WorkFactory.Create())
            {
                #region 参数判断

                if (deleteInfo == null || deleteInfo.AuthorityGroupIds.IsNullOrEmpty())
                {
                    return(Result.FailedResult("没有指定要删除的权限分组"));
                }

                #endregion

                var result = authorityGroupService.RemoveAuthorityGroup(deleteInfo.AuthorityGroupIds);
                if (!result.Success)
                {
                    return(result);
                }
                var exectVal = businessWork.Commit();
                return(exectVal.ExecutedSuccess ? Result.SuccessResult("删除成功") : Result.FailedResult("删除失败"));
            }
        }
Exemplo n.º 2
0
 /// <summary>
 /// 删除权限分组
 /// </summary>
 /// <param name="deleteInfo">删除信息</param>
 /// <returns>执行结果</returns>
 public Result DeleteAuthorityGroup(DeleteAuthorityGroupCmdDto deleteInfo)
 {
     return(authBusiness.DeleteAuthorityGroup(deleteInfo));
 }