Example #1
0
        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();
            }
        }