Ejemplo n.º 1
0
        public Result <MultiLineTextDto> Update(MultiLineTextDto dtoToUpdate)
        {
            Result <MultiLineTextDto> retResult = Result <MultiLineTextDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();

                var updatedDto = UpdateImpl(dtoToUpdate);
                retResult = Result <MultiLineTextDto> .Success(updatedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.UpdateFailedException(ex);
                retResult = Result <MultiLineTextDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Ejemplo n.º 2
0
        public Result <UserDto> Update(UserDto dto)
        {
            Result <UserDto> retResult = Result <UserDto> .Undefined(null);

            try
            {
                Common.CommonHelper.CheckAuthentication();
                DalHelper.CheckAuthorizationToAddUser();
                DalHelper.CheckAuthorizationToDeleteUser();

                var updatedDto = UpdateImpl(dto);
                retResult = Result <UserDto> .Success(updatedDto);
            }
            catch (Exception ex)
            {
                var wrappedEx = new Exceptions.UpdateFailedException(ex);
                retResult = Result <UserDto> .FailureWithInfo(null, wrappedEx);
            }
            return(retResult);
        }
Ejemplo n.º 3
0
        public Result<PhraseDto> Update(PhraseDto dtoToUpdate)
        {
            Result<PhraseDto> retResult = Result<PhraseDto>.Undefined(null);
              try
              {
            Common.CommonHelper.CheckAuthentication();

            var updatedDto = UpdateImpl(dtoToUpdate);
            retResult = Result<PhraseDto>.Success(updatedDto);
              }
              catch (Exception ex)
              {
            var wrappedEx = new Exceptions.UpdateFailedException(ex);
            retResult = Result<PhraseDto>.FailureWithInfo(null, wrappedEx);
              }
              return retResult;
        }
Ejemplo n.º 4
0
    public Result<UserDto> Update(UserDto dto)
    {
      Result<UserDto> retResult = Result<UserDto>.Undefined(null);
      try
      {
        Common.CommonHelper.CheckAuthentication();
        DalHelper.CheckAuthorizationToAddUser();
        DalHelper.CheckAuthorizationToDeleteUser();

        var updatedDto = UpdateImpl(dto);
        retResult = Result<UserDto>.Success(updatedDto);
      }
      catch (Exception ex)
      {
        var wrappedEx = new Exceptions.UpdateFailedException(ex);
        retResult = Result<UserDto>.FailureWithInfo(null, wrappedEx);
      }
      return retResult;
    }