コード例 #1
0
        private void Finalizar_Click(object sender, RoutedEventArgs e)
        {
            TarefaModelo item = (TarefaModelo)dgTarefas.SelectedItem;

            pallets = paletes.Perguntar(item.totalPaletes.ToString());

            if (pallets[1] > 0)
            {
                if (pallets[0] == 0)
                {
                    lgc.AlterarTodosPaletesCte(item.documentoTarefa, 0);
                    Finalizar(item);
                }
                else if (abd.CtesNoManifesto(item.documentoTarefa).Count == 1)
                {
                    lgc.AlterarTodosPaletesCte(item.documentoTarefa, pallets[0]);
                    Finalizar(item);
                }
                else
                {
                    if (PaletesCte.Exibir(item.documentoTarefa, pallets[0]))
                    {
                        Finalizar(item);
                    }
                    else
                    {
                        MessageBox.Show("Preencha os paletes de cada Cte para finalizar o carregamento.", "Carregamento não finalizado - Produsis", MessageBoxButton.OK, MessageBoxImage.Information);
                    }
                }
            }
            Documento.Focus();
        }
コード例 #2
0
        public static bool Exibir(int numManifesto, int total)
        {
            PaletesCte tela = new PaletesCte(numManifesto);

            tela.totalPaletes = total;

            tela.ShowDialog();

            return((bool)tela.DialogResult);
        }