private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.Text == "Canceladas")
     {
         DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();
         dataGridView1.DataSource = facturas.devuelvefacturascanceladas();
     }
     else
     {
         actualizagrid();
     }
 }
 public void actualizagrid()
 {
     DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();
     if (comboBox1.Text == "Canceladas")
     {
         dataGridView1.DataSource = facturas.devuelvefacturascanceladas();
     }
     else
     {
         dataGridView1.DataSource = facturas.devuelvefacturas();
     }
     this.dataGridView1.Sort(dataGridView1.Columns[0], ListSortDirection.Descending);
 }
Beispiel #3
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex == 4)
     {
         DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();
         dataGridView1.DataSource = facturas.devuelvenotascanceladas280616();
     }
     if (comboBox1.SelectedIndex == 3)
     {
         DAO.FacturasDAO facturas = new EquimarFac.DAO.FacturasDAO();
         dataGridView1.DataSource = facturas.devuelvefacturascanceladas();
     }
     if ((comboBox1.SelectedIndex != 4) && (comboBox1.SelectedIndex != 3))
     {
         actualizagrid();
     }
 }