Exemple #1
0
 private void btnSave_Click(object sender, EventArgs e)
 {
     try {
         Patient    patient = new Patient("", DateTime.Now, this.GetNom(), this.GetGender(), this.GetAge());
         PatientDAO ptdao   = new PatientDAO(connection);
         ptdao.Insert(patient);
         List <Config> cfs   = this.GetConfigs(patient);
         ConfigDAO     cfdao = new ConfigDAO(connection);
         cfdao.InsertAll(cfs);
         this.AddRowTabPatients(patient);
     } catch (Exception ex) {
         MessageBox.Show(ex.Message);
     }
 }