Exemplo n.º 1
0
 private OperationResponse ChangePasswordInternal(int numberEmployee, string password)
 {
     using (TransactionScope scope = new TransactionScope())
     {
         OperationResponse operationResponseLocal  = repository.ChangePassword(numberEmployee, password);
         OperationResponse operationResponseRemoto = null;
         if (operationResponseLocal.CodeNumber == "106")
         {
             operationResponseRemoto = new AdministracionContraseniaBusiness(this.token).CambiarPassword(numberEmployee, password);
         }
         else
         {
             // No fue posible actualizar password
             return(operationResponseLocal);
         }
         if (operationResponseRemoto.CodeNumber == "")
         {
             scope.Complete();
             return(operationResponseLocal);
         }
         else
         {
             // Ocurrió un error al actualizar password remoto
             return(operationResponseRemoto);
         }
     }
 }