Example #1
0
        private void cmdPesquisar_Click(object sender, EventArgs e)
        {
            string nomeFuncao = "geraBoletos.Boletos.cmdPesquisar_Click";

            try
            {
                inicializaObjetos();

                isBoletoCarregado = false;

                statusBotoes(false);

                if (txtPedido.Text.Length < 5)
                {
                    MessageBox.Show("Pedido inválido!!");
                    return;
                }

                //if (boletos == null)
                //{
                //    boletos = new CarSystem.Boletos.Boleto(CarSystem.Tipos.nomeBanco.Santander, dados);
                //    this.boletos.boletosCarregados += new CarSystem.Boletos.Boleto.carregamentoBoleto(this.boletosCarregados);
                //}

                boletosCarregados(true);
                carregaParcelas(CarSystem.Tipos.statusDebito.todos);
                carregaCliente(txtPedido.Text);
                dtInicioVencimento.Value = cliente.getVencimento(DateTime.Today);

                debitos.limpar();

                //System.Threading.Thread threadBoleto = new System.Threading.Thread(new System.Threading.ThreadStart(boletos.g .getBoletos));
                //threadBoleto.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show("(" + nomeFuncao + ")" + ex.Message);
            }
        }