public static bool AddObservation(int idPatient, Observation obs) { ServiceObservationClient serviceObs = new ServiceObservationClient(); try { return serviceObs.AddObservation(idPatient, obs); } catch (Exception) { return false; } }
public static bool CreateObservation(int idPatient, Model.Observation observation) { ServiceObservationClient serviceObservation = new ServiceObservationClient(); bool result = false; try { ServiceObservation.Observation obs = new Observation() { BloodPressure = observation.bloodPressure, Comment = observation.comment, Date = observation.date, Pictures = observation.pictures, Prescription = observation.prescription, Weight = observation.weight }; System.Console.WriteLine("on se met mal avant"); result = serviceObservation.AddObservation(idPatient, obs); System.Console.WriteLine("on se met mal après"); } catch (Exception e) { Console.WriteLine("Exception : " + e.Message); } finally { serviceObservation.Close(); } return(result); }
public ServiceObservationManager() { this._client = new ServiceObservationClient(); }