Пример #1
0
        /// <summary>
        /// 删除工作分组
        /// </summary>
        /// <param name="deleteInfo">删除信息</param>
        /// <returns>执行结果</returns>
        public Result DeleteJobGroup(DeleteJobGroupCmdDto deleteInfo)
        {
            using (var businessWork = WorkFactory.Create())
            {
                #region 参数判断

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

                #endregion

                //删除逻辑
                JobGroupDomainService.DeleteJobGroup(deleteInfo.JobGroupIds);
                var commitResult = businessWork.Commit();
                return(commitResult.ExecutedSuccess ? Result.SuccessResult("删除成功") : Result.FailedResult("删除失败"));
            }
        }
Пример #2
0
 /// <summary>
 /// 删除工作分组
 /// </summary>
 /// <param name="deleteInfo">删除信息</param>
 /// <returns>执行结果</returns>
 public Result DeleteJobGroup(DeleteJobGroupCmdDto deleteInfo)
 {
     return(jobGroupBusiness.DeleteJobGroup(deleteInfo));
 }