public void OpenLoteCreationModal() { ListadoMP = new ObservableCollection <formulaProduct>(ProductQueries.GetAllContainerMPFromAmount(int.Parse(NewLotePT.CantidadOriginal))); createPTFromLoteCommand = new CreatePTFromLoteCommand(this); CanExecuteAgregar = false; if (ListadoMP.Count == 0) { MessageBox.Show("No hay suficientes empaques para esta cantidad."); } else { agregarDetalleEmpaque = new AgregarDetalleEmpaque(this); NewLotePTDetalles = new ObservableCollection <LotePTDetalle>(); MpListEnabled = true; LoteListEnabled = false; loteModal = new CreatePTLoteModal(this); // EmptyMPLote = null; EmptyProduct = ListadoMP[0]; PTList = new ObservableCollection <ProductoTeminadoParaLista>(ProductQueries.GetPTSimp()); loteModal.ShowDialog(); } }
public FacturasVM() { Facturas = new ObservableCollection<Factura>(FacturaQueries.GetFacturaList()); testFactura = FacturaQueries.GetFacturaList(); Productos = new ObservableCollection<ProductoTeminadoParaLista>(ProductQueries.GetPTSimp()); Clientes = new ObservableCollection<IdName>(PersonaQueries.getClientes()); Vendedores = new List<string>(FacturaQueries.getVendedores()); Zonas = new ObservableCollection<string> { "Norte", "Sur", "Este", "Oeste" }; editModal = new EditFacturaModal(this); ProductPairs = new List<IdName>(); NewFacturaCommand = new CreateFacturaCommand(this); NewFacturaGenerarLotes = new CreateFacturaGenerarLotes(this); NewFacturaAddDetalle = new CreateFacturaAddDetalle(this); UpdateBalanceCommand = new UpdateFacturaBalanceCommand(this); //FacturaEditModal = new OpenEditModal(this); IsProductEnabled = true; }