public IActionResult ConsultarPorId([FromBody] ConsultaNotaIngresoPlantaDocumentoAdjuntoPorIdRequestDTO request)
        {
            Guid guid = Guid.NewGuid();

            _log.RegistrarEvento($"{guid.ToString()}{Environment.NewLine}{Newtonsoft.Json.JsonConvert.SerializeObject(request)}");

            ConsultaNotaIngresoPlantaDocumentoAdjuntoPorIdResponseDTO response = new ConsultaNotaIngresoPlantaDocumentoAdjuntoPorIdResponseDTO();

            try
            {
                response.Result.Data = _NotaIngresoPlantaDocumentoAdjuntoService.ConsultarNotaIngresoPlantaDocumentoAdjuntoPorId(request);

                response.Result.Success = true;
            }
            catch (ResultException ex)
            {
                response.Result = new Result()
                {
                    Success = true, ErrCode = ex.Result.ErrCode, Message = ex.Result.Message
                };
            }
            catch (Exception ex)
            {
                response.Result = new Result()
                {
                    Success = false, Message = "Ocurrio un problema en el servicio, intentelo nuevamente."
                };
                _log.RegistrarEvento(ex, guid.ToString());
            }

            _log.RegistrarEvento($"{guid.ToString()}{Environment.NewLine}{Newtonsoft.Json.JsonConvert.SerializeObject(response)}");

            return(Ok(response));
        }
Ejemplo n.º 2
0
 public ConsultaNotaIngresoPlantaDocumentoAdjuntoPorId ConsultarNotaIngresoPlantaDocumentoAdjuntoPorId(ConsultaNotaIngresoPlantaDocumentoAdjuntoPorIdRequestDTO request)
 {
     return(_INotaIngresoPlantaDocumentoAdjuntoRepository.ConsultarNotaIngresoPlantaDocumentoAdjuntoPorId(request.NotaIngresoPlantaDocumentoAdjuntoId));
 }