Пример #1
0
 private void cb_CarBrand_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         dataGridView1.AutoGenerateColumns = false;
         dataGridView1.DataSource          = model.SelectAllByBrand(int.Parse(cb_CarBrand.SelectedValue.ToString()));
     }
     catch { }
 }
Пример #2
0
 private void cb_CarBrand_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         cb_model.DataSource    = model.SelectAllByBrand(int.Parse(cb_CarBrand.SelectedValue.ToString()));
         cb_model.DisplayMember = "CarModel";
         cb_model.ValueMember   = "ID";
         cb_model.SelectedIndex = -1;
     }catch { }
 }