public HttpResponseMessage transferirMonto(DtoTranferencia dto)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _movimientoService.RealizarTransferencia(dto)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage obtenerCuentasByClienteId(DtoClienteCB dto)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _cuentaService.ObtenerCuentasByCedula(dto.Cedula)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage crearCargoController(DtoCargo DtoCargo)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _cargoService.CrearCargo(DtoCargo)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _utilitarios.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage actualizarUsuarioCargoController(DtoUsuarioCargo DtoCargo)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _usuarioCargoService.ActualizarUsuarioCargo(DtoCargo)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _util.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage SVELgOut(DtoGenerico dto)
 {
     try
     {
         dto.Dt20 = Request.Headers.Authorization?.Parameter;
         return(Request.CreateResponse(HttpStatusCode.OK, _sesionService.CerrarSesion(dto.Dt1, dto.Dt20)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
     }
 }
Exemple #6
0
 public HttpResponseMessage crearUsuarioController(DtoUsuario dtoUsuario)
 {
     try
     {
         var token = Request.Headers.Authorization.Parameter;
         _tokenValidator.ValidarToken(token);
         return(Request.CreateResponse(HttpStatusCode.OK, _usuarioService.CrearUsuario(dtoUsuario, token)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _util.crearDtoErrorExceptionMessage(ex)));
     }
 }
        public HttpResponseMessage crearpersonaController(DtoPersona dtopersona)
        {
            try
            {
                var token = Request.Headers.Authorization.Parameter;
                _tokenValidator.ValidarToken(token);

                return(Request.CreateResponse(HttpStatusCode.OK, _personaService.CrearPersona(dtopersona, token)));
            }
            catch (Exception ex)
            {
                return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
            }
        }
Exemple #8
0
 public HttpResponseMessage crearClienteController(DtoClienteCB dto)
 {
     try
     {
         return(Request.CreateResponse(HttpStatusCode.OK, _clienteCbService.CrearClienteCB(dto)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage validarRutaMedianteRol(DtoPermiso dtoPermiso)
 {
     try
     {
         var token = Request.Headers.Authorization.Parameter;
         //_tokenValidator.ValidarToken(token);
         return(Request.CreateResponse(HttpStatusCode.OK, _permisoService.ValidarRutaMedianteRol(dtoPermiso, token)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _util.crearDtoErrorExceptionMessage(ex)));
     }
 }
 public HttpResponseMessage VEslMnUsr()
 {
     try
     {
         var token = Request.Headers.Authorization.Parameter;
         _tokenValidator.ValidarToken(token);
         return(Request.CreateResponse(HttpStatusCode.OK, _recursoService.ObtenerMenuUsuarioPorToken(token)));
     }
     catch (Exception ex)
     {
         return(Request.CreateResponse(HttpStatusCode.BadRequest, _apiResponseMessage.crearDtoErrorExceptionMessage(ex)));
     }
 }
Exemple #11
0
        public DtoApiResponseMessage ObtenerCuentasByCedula(string cedula)
        {
            try
            {
                var listaCuentas = _cuentasRespository.Get <CB02_Cuenta>(cuenta => cuenta.Cliente.Cedula.Equals(cedula));

                return(_apiResponseMessage.CrearDtoApiResponseMessage(MapearCuentasEntidadADto(listaCuentas), "MSG001"));
            }
            catch (Exception ex)
            {
                return(_apiResponseMessage.crearDtoErrorExceptionMessage(ex));
            }
        }