示例#1
0
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="modifyInfo">修改信息</param>
        /// <returns></returns>
        public Result ModifyPassword(ModifyPasswordCmdDto modifyInfo)
        {
            using (var businessWork = WorkFactory.Create())
            {
                #region 参数判断

                if (modifyInfo == null)
                {
                    return(Result.FailedResult("没有指定任何修改信息"));
                }

                #endregion

                var modifyResult = userService.ModifyPassword(modifyInfo.MapTo <ModifyUserPassword>());
                if (!modifyResult.Success)
                {
                    return(modifyResult);
                }
                var commitResult = businessWork.Commit();
                return(commitResult.EmptyResultOrSuccess ? Result.SuccessResult("修改成功") : Result.FailedResult("修改失败"));
            }
        }
示例#2
0
        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="modifyInfo">修改信息</param>
        /// <returns></returns>
        public Result ModifyPassword(ModifyPasswordCmdDto modifyInfo)
        {
            using (var businessWork = UnitOfWork.Create())
            {
                #region 参数判断

                if (modifyInfo == null)
                {
                    return(Result.FailedResult("没有指定任何修改信息"));
                }

                #endregion

                var modifyResult = UserService.ModifyPassword(modifyInfo.MapTo <ModifyUserPassword>());
                if (!modifyResult.Success)
                {
                    return(modifyResult);
                }
                var execValue = businessWork.Commit();
                return(execValue.ExecutedSuccess ? Result.SuccessResult("修改成功") : Result.FailedResult("修改失败"));
            }
        }
示例#3
0
 /// <summary>
 /// 修改密码
 /// </summary>
 /// <param name="modifyInfo">修改信息</param>
 /// <returns></returns>
 public Result ModifyPassword(ModifyPasswordCmdDto modifyInfo)
 {
     return(userBusiness.ModifyPassword(modifyInfo));
 }