Exemple #1
0
        private void rbTodas_CheckedChanged(object sender, EventArgs e)
        {
            //ocultar paineis
            pFornecedor.Visible = false;
            pData.Visible       = false;

            //limpar os grids
            dgvDados.DataSource    = null;
            dgvItens.DataSource    = null;
            dgvParcelas.DataSource = null;

            if (rbTodas.Checked == true)
            {
                DAOConexao cx        = new DAOConexao(DAOBanco.StringDeConexao);
                BLLCompra  bllCompra = new BLLCompra(cx);
                dgvDados.DataSource = bllCompra.LocalizarTodas();
                this.AtualizaCabecalhoDGCompra();
            }

            if (rbFornecedor.Checked == true)
            {
                pFornecedor.Visible = true;
            }

            if (rbData.Checked == true)
            {
                pData.Visible = true;
            }

            if (rbParcelas.Checked == true)
            {
                DAOConexao cx        = new DAOConexao(DAOBanco.StringDeConexao);
                BLLCompra  bllCompra = new BLLCompra(cx);
                dgvDados.DataSource = bllCompra.LocalizarParcelasAberto();
                this.AtualizaCabecalhoDGCompra();
            }
        }