예제 #1
0
        private void CreateObsMethod()
        {
            if (Prescriptions == null || Prescriptions.Equals("") || BloodPressure.Equals("0") || Weight.Equals("0"))
            {
                MaterialMessageBox.ShowError("Remplir les champs obligatoire de l'observation (poids, pression sanguine, prescription");
                return;
            }
            Model.Observation obs = new Model.Observation()
            {
                bloodPressure = _bloodPressure,
                comment       = Comment,
                date          = Date,
                pictures      = Pictures.ToArray(),
                prescription  = Prescriptions.Split('\n'),
                weight        = _weight
            };
            int patientId = lastWindow.SelectedPatient.id;

            Observations.CreateObservation(patientId, obs);
            lastWindow.SelectedPatient.observations.Add(obs);
            lastWindow.SelectedObservation = obs;
            CloseWindow();
        }