Exemplo n.º 1
0
        private void rbGeral_CheckedChanged(object sender, EventArgs e)
        {
            //ocultar paines
            pCliente.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);
                BLLVenda   bllvenda = new BLLVenda(cx);
                dgvDados.DataSource = bllvenda.Localizar();
                this.AtualizaCabecalhoVenda();
            }
            if (rbDataVenda.Checked == true)
            {
                pData.Visible = true;
            }
            if (rbCliente.Checked == true)
            {
                pCliente.Visible = true;
            }
            if (rbParcelas.Checked == true)
            {
                DALConexao cx       = new DALConexao(DadosDaConexao.StringDeConexao);
                BLLVenda   bllvenda = new BLLVenda(cx);
                dgvDados.DataSource = bllvenda.LocalizarPorParcelaEmAberto();
                this.AtualizaCabecalhoVenda();
            }
        }