private void ComboBoxTypeConge_Initialized(object sender, EventArgs e) { List <TypeConges> typeConges = TypeCongeController.RechercheTousLesConges(); var combo = sender as ComboBox; combo.ItemsSource = typeConges; }
public void ComboBoxTypesConges_Initialized(object sender, EventArgs e) { List <TypeConges> typeConges = TypeCongeController.RechercheTousLesConges(); if (typeConges != null && typeConges.Count > 0) { var combo = sender as ComboBox; combo.ItemsSource = typeConges; } }
private void UpdateComboboxes() { ComboBoxTypeConge.ItemsSource = TypeCongeController.RechercheTousLesConges(); ComboBoxListeTypeConges.ItemsSource = TypeCongeController.RechercheTousLesConges(); }