private void IngresarMateriales() { if ((IngresoMaterial.Material != null || IngresoMaterial.MaterialId != 0) && IngresoMaterial.Cantidad != 0) { eventAggregator.GetEvent <PubSubEvent <IngresoMaterialDto> >().Publish(IngresoMaterial); IngresoMaterial = new IngresoMaterialDto(); } }
public async Task Insertar(IngresoMaterialDto dto) { using (var context = new DataContext()) { var ingresoMaterial = _mapper.Map <Dominio.Entidades.IngresoMaterial>(dto); await _ingresoMaterialRepositorio.Create(ingresoMaterial); } }
private void GetAbrirMaterialPopUp(PopUp obj) { MostrarPopMaterial = obj.ShowPopUp; BotonMaterial = obj.ButtonTitle; BloquearControlesMaterial = obj.ControlersEnable; if (BotonMaterial == "Crear") { IngresoMaterial = new IngresoMaterialDto(); } }
public async Task Modificar(IngresoMaterialDto dto) { using (var context = new DataContext()) { var ingresoMaterial = context.IngresoMateriales.FirstOrDefault(x => x.Id == dto.Id); ingresoMaterial.Cantidad = dto.Cantidad; ingresoMaterial.CantidadDevuelta = dto.CantidadDevuelta; ingresoMaterial.FechaIngreso = dto.FechaIngreso; ingresoMaterial.MaterialId = dto.MaterialId; ingresoMaterial.ObraId = dto.ObraId; ingresoMaterial.EncargadoId = dto.EncargadoId; await _ingresoMaterialRepositorio.Update(ingresoMaterial); } }
private void MostrarDialog() { MostrarPopMaterial = !MostrarPopMaterial; IngresoMaterial = new IngresoMaterialDto(); }
private void PasandoMaterial(IngresoMaterialDto obj) { IngresoMaterial = obj; }