private void Valider_Click(object sender, RoutedEventArgs e) { Consult consultation = new Consult(); try { this.ordonnance = ordo.GenererOrdonnance(Globals.NomMedecin, Globals.PrenomMedecin, Globals.NomPatient, Globals.PrenomPatient, traitment, label, Globals.specialite, Globals.codeMedecin, Globals.Age, Globals.numMobile, Globals.num, Globals.fax, Globals.MailMedecin); consultation.AddConsult(Globals.NomPatient, Globals.PrenomPatient, Globals.NomMedecin, Globals.PrenomMedecin, diagnostic, description, certificat, Lettre, scanner, bilan, ordonnance, radio, traitment, label, Globals.Age); Dialog.IsOpen = true; } catch (Exception) { MessageBox.Show("Une erreur s'est produite, la consultation n'a pas été ajoutée"); } }