private void supprimerButton_Click(object sender, EventArgs e) { DepartementViewModel toRemove = (DepartementViewModel)listeDepartements.SelectedItem; lu.Remove(toRemove); listeDepartements.Items.Refresh(); DepartementORM.supprimerDepartement(selectedDepartementId); }
private void supprimerButton_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e) { DepartementViewModel toRemove = (DepartementViewModel)listeDepartements.SelectedItem; lp3.Remove(toRemove); DepartementORM.supprimerDepartement(selectedDepartementsId); MessageBox.Show("Departement supprimé avec succes ! "); }