示例#1
0
        private void dgvClientes_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            int         id     = (int)dgvClientes.CurrentRow.Cells[0].Value;
            DALCobranca objCOB = new DALCobranca();

            dgvPagamentos.DataSource = objCOB.carregarPagamentosPorCliente(id).ToList();
        }
示例#2
0
        private void btnCobranca_Click(object sender, EventArgs e)
        {
            int         idCliente = (int)dgvClientes.CurrentRow.Cells[0].Value;
            DALCobranca dalco     = new DALCobranca();
            bool        resultado = dalco.realizarCobranca(idCliente);

            if (resultado)
            {
                MessageBox.Show("Tudo certo ! Cobrança efetuada !");
            }
            else
            {
                MessageBox.Show("Algo deu errado ! Contate o desenvolvedor !");
            }
        }
示例#3
0
        private void frmPagamento_Load(object sender, EventArgs e)
        {
            cbCliente.DataSource    = ((new DALPessoa()).ListarClienteComConta());
            cbCliente.ValueMember   = "id";
            cbCliente.DisplayMember = "nome";

            DALCobranca dalCOB = new DALCobranca();
            Cliente     cli    = new Cliente();
            DALPessoa   dalpes = new DALPessoa();
            Pessoa      pes    = new Pessoa();

            cli = (dalpes.retornarCliente((int)cbCliente.SelectedValue));
            dgvVenda.DataSource = (new DALVenda().carregarVendasCliente(cli.id));
            pes = (dalpes.retornarPessoa(((int)cbCliente.SelectedValue)));

            txtCPF.Text = pes.CPF;

            dgvVenda.Columns[0].Visible = false;
            dgvVenda.Columns[1].Visible = false;
            dgvProdutos.DataSource      = null;

            dgvClientes.DataSource = dalCOB.carregarClientes().ToList();
        }