private void rbGeral_CheckedChanged(object sender, EventArgs e) { //ocultar paines pFornecedor.Visible = false; pData.Visible = false; //limpar os grids dgvDados.DataSource = null; dgvItens.DataSource = null; dgvParcelas.DataSource = null; if (rbGeral.Checked == true) { DALConexao cx = new DALConexao(DadosDaConexao.StringDeConexao); BLLCompra bllcompra = new BLLCompra(cx); dgvDados.DataSource = bllcompra.Localizar(); this.AtualizaCabecalhoCompra(); } if (rbDataCompra.Checked == true) { pData.Visible = true; } if (rbFornecedor.Checked == true) { pFornecedor.Visible = true; } if (rbParcelas.Checked == true) { DALConexao cx = new DALConexao(DadosDaConexao.StringDeConexao); BLLCompra bllcompra = new BLLCompra(cx); dgvDados.DataSource = bllcompra.LocalizarPorParcelaEmAberto(); this.AtualizaCabecalhoCompra(); } }