Beispiel #1
0
        private void btn_salvar_Click(object sender, EventArgs e)
        {
            Lancamento lancamento = new Lancamento();

            financeiroDAO.AtualizaConta(conta);
            financeiroDAO.AtualizaLancamento(lancamento);
        }
Beispiel #2
0
        private void CarregaConta()
        {
            btn_editar.Enabled     = true;
            groupBox_Dados.Enabled = false;
            FavorecidoDAO favorecidoDAO = new FavorecidoDAO();

            favorecido = favorecidoDAO.BuscaFavorecidoById(conta.Id_favorecido);
            devedor    = favorecidoDAO.BuscaDevedorById(conta.Id_devedor);

            banco = bancoDAO.BuscaBanco(favorecido.Id_banco);

            Lancamento lancamento = financeiroDAO.BuscaLancamento(conta.Cod);

            if (lancamento == null)
            {
                btn_lancar.Enabled = true;
            }
            else
            {
                masked_data_pagamento.Text = lancamento.Data_lancamento;
            }

            combo_banco.Text = banco.Nome + " - " + banco.Cod;
            combo_forma_pagamento.SelectedItem = conta.Forma_pagamento;
            txt_favorecido.Text = favorecido.Nome;
            txt_agencia.Text    = favorecido.Agencia;
            txt_conta.Text      = favorecido.Conta;
            lbl_cpf_cnpj.Text   = favorecido.Cpf_cpnj;
            lbl_cpf_cnpj.Text   = favorecido.Classificacao;
            lbl_status.Text     = conta.Status;
            txt_devedor.Text    = devedor.Nome;


            combo_tipo_pagamento.SelectedItem = conta.Tipo;
            combo_subtipo.SelectedItem        = conta.Sub_tipo;
            combo_tipo_debito.SelectedItem    = conta.Tipo_debito;
            lbl_date_time.Text = conta.Data_criacao + " " + conta.Hora_criacao;

            maskedTxt_Data.Text = conta.Data_vencimento;
            txt_valor.Text      = conta.Valor.ToString("0,00");
            txt_descricao.Text  = conta.Descricao;
        }