예제 #1
0
 private void rdbtodos_CheckedChanged(object sender, EventArgs e)
 {
     lblPesquisa.Visible = false;
     txtPesquisa.Visible = false;
     btnbuscar.Visible   = false;
     Camadas.BLL.Contaspagar bllContaspagar = new Camadas.BLL.Contaspagar();
     dgvcontas.DataSource = "";
     dgvcontas.DataSource = bllContaspagar.Select();
 }
예제 #2
0
 private void rdbnome_CheckedChanged(object sender, EventArgs e)
 {
     Camadas.BLL.Contaspagar bllContaspagar = new Camadas.BLL.Contaspagar();
     dgvcontas.DataSource = "";
     dgvcontas.DataSource = bllContaspagar.Select();
     lblPesquisa.Text     = "Informe o Nome";
     lblPesquisa.Visible  = true;
     txtPesquisa.Text     = "";
     txtPesquisa.Visible  = true;
     btnbuscar.Visible    = true;
     txtPesquisa.Focus();
 }
예제 #3
0
        private void btnbuscar_Click(object sender, EventArgs e)
        {
            Camadas.BLL.Contaspagar          bllCont        = new Camadas.BLL.Contaspagar();
            List <Camadas.Model.Contaspagar> lstContaspagar = new List <Camadas.Model.Contaspagar>();

            if (rdbcod.Checked)
            {
                lstContaspagar = bllCont.SelectById(Convert.ToInt32(txtPesquisa.Text));
            }
            else if (rdbnome.Checked)
            {
                lstContaspagar = bllCont.SelectByDesc(txtPesquisa.Text);
            }

            dgvcontas.DataSource = "";
            dgvcontas.DataSource = lstContaspagar;
            txtPesquisa.Text     = "";
        }