private void bindCountiesToComboBox() { using (CountyView _context = new CountyView(context)) { this.countyComboBox.DataSource = _context.GetAllCounties(); this.countyComboBox.ValueMember = "ID"; this.countyComboBox.DisplayMember = "Name"; } }
private void bindCountiesToComboBox(ComboBox cb) { using (CountyView _context = new CountyView(context)) { cb.DataSource = _context.GetAllCounties(); cb.ValueMember = "ID"; cb.DisplayMember = "Name"; } }