private void btn_Creation_Click(object sender, RoutedEventArgs e) { try { UcGererTournees u = new UcGererTournees(lstSite, lesCentre, ListeTournee, false); u.Closed += new EventHandler(galatee_OkclikcCreation); u.Show(); } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }
private void btn_modification_Click(object sender, RoutedEventArgs e) { try { if (dataGrid1.SelectedItem == null) { return; } UcGererTournees u = new UcGererTournees(lstSite, lesCentre, ListeTournee, (CsTournee )dataGrid1.SelectedItem, true); u.Closed += new EventHandler(galatee_OkclikcModification); u.Show(); } catch (Exception ex) { Message.ShowError(ex, "Erreur"); } }