public IActionResult ActualizarPesado([FromBody] RegistrarActualizarPesadoNotaIngresoPlantaRequestDTO request) { Guid guid = Guid.NewGuid(); _log.RegistrarEvento($"{guid.ToString()}{Environment.NewLine}{Newtonsoft.Json.JsonConvert.SerializeObject(request)}"); RegistrarActualizarPesadoNotaIngresoPlantaResponseDTO response = new RegistrarActualizarPesadoNotaIngresoPlantaResponseDTO(); try { response.Result.Data = _NotaIngresoPlantaService.ActualizarPesadoNotaIngresoPlanta(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)); }
public int RegistrarPesadoNotaIngresoPlanta(RegistrarActualizarPesadoNotaIngresoPlantaRequestDTO request) { NotaIngresoPlanta NotaIngresoPlanta = _Mapper.Map <NotaIngresoPlanta>(request); NotaIngresoPlanta.Numero = _ICorrelativoRepository.Obtener(request.EmpresaId, Documentos.NotaIngresoPlanta); NotaIngresoPlanta.FechaPesado = DateTime.Now; NotaIngresoPlanta.EstadoId = NotaIngresoPlantaEstados.Pesado; NotaIngresoPlanta.FechaRegistro = DateTime.Now; NotaIngresoPlanta.UsuarioRegistro = request.UsuarioPesado; int affected = _INotaIngresoPlantaRepository.InsertarPesado(NotaIngresoPlanta); return(affected); }
public int ActualizarPesadoNotaIngresoPlanta(RegistrarActualizarPesadoNotaIngresoPlantaRequestDTO request) { NotaIngresoPlanta NotaIngresoPlanta = _Mapper.Map <NotaIngresoPlanta>(request); NotaIngresoPlanta.FechaPesado = DateTime.Now; NotaIngresoPlanta.UsuarioPesado = request.UsuarioPesado; NotaIngresoPlanta.EstadoId = NotaIngresoPlantaEstados.Pesado; NotaIngresoPlanta.FechaUltimaActualizacion = DateTime.Now; NotaIngresoPlanta.UsuarioUltimaActualizacion = request.UsuarioPesado; int affected = _INotaIngresoPlantaRepository.ActualizarPesado(NotaIngresoPlanta); return(affected); }