public void donateCantidadLoteSal() { if (SelectedLotePT.Existencia < PlaceHolder.EmptyCantidad) { MessageBox.Show("La cantidad a donar no puede ser mayor a la cantidad existente"); } else { NewLotePTDetalles = new ObservableCollection <LotePTDetalle>(ProductQueries.getDetallesFromPTLote(SelectedLotePT.CodigoCorrelativo)); InventoryQueries.CreateDonacionRegistro(PlaceHolder.EmptyWord, SelectedLotePT, PlaceHolder.EmptyCantidad); ProductQueries.updateProductoTermnadoRemoveAmount(SelectedLotePT.CodigoCorrelativo, PlaceHolder.EmptyCantidad); ProductQueries.InventarioPTSellAmount(SelectedLotePT.CodigoPT, PlaceHolder.EmptyCantidad); MessageBox.Show("Cantidad Donada"); SelectedLotePT.Existencia -= PlaceHolder.EmptyCantidad; donateModal.Close(); } }