Beispiel #1
0
 public static ServicePatient.Patient GetPatient(int idPatient)
 {
     try
     {
         ServicePatientManager s = new ServicePatientManager();
         return s.GetPatient(idPatient);
     }
     catch (EndpointNotFoundException e)
     {
         MessageBox.Show("Le serveur ne répond pas.", "Erreur");
         throw e;
     }
 }
Beispiel #2
0
 public async static Task<ServicePatient.Patient[]> GetListPatientAsync()
 {
     try
     {
         ServicePatientManager s = new ServicePatientManager();
         return await s.GetListPatientAsync();
     }
     catch (EndpointNotFoundException e)
     {
         MessageBox.Show("Le serveur ne répond pas.", "Erreur");
         throw e;
     }
 }
Beispiel #3
0
        public static bool AddPatient(string firstname, string name, DateTime birthday)
        {
            try
            {
                ServicePatientManager s = new ServicePatientManager();

                ServicePatient.Patient p = new ServicePatient.Patient();
                p.Firstname = firstname;
                p.Name = name;
                p.Birthday = birthday;
                p.Observations = new ServicePatient.Observation[0];
                return s.AddPatient(p);
            }
            catch (EndpointNotFoundException e)
            {
                MessageBox.Show("Le serveur ne répond pas.", "Erreur");
                throw e;
            }
        }