Пример #1
0
        /// <summary>
        /// constructeur
        /// </summary>
        public PatientBrowserViewModel(Page lkView)
        {
            _linkedView = lkView;

            _imageCommand = new RelayCommand(param => ImageAccess(param), param => true);

            _createObservationCommand = new RelayCommand(param => NavigateToCreateObservation(param), param => IsButtonAvailable());
            _addPatientCommand = new RelayCommand(param => ClickAddPatient(), param => true);
            _navigateToHomeCommand = new RelayCommand(param => NavigateToHome(), param => true);
            _deletePatientCommand = new RelayCommand(param => NavigateToDeletePatient(param), param => IsButtonAvailable());

            /// Definit si les bouton de creation/suppression est disponible ou non
            if (NavigationMessenger.GetInstance().IsRWAccount) {
                IsAvailableRW = Visibility.Visible;
            }
            else {
                IsAvailableRW = Visibility.Hidden;
            }

            _listPatient = new ObservableCollection<ServicePatient.Patient>();

            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
            {
                Debug.WriteLine("DEBUT");
                ServicePatient.ServicePatientClient patientService = new ServicePatient.ServicePatientClient();
                e.Result = patientService.GetListPatient();
            });

            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
            {
                Debug.WriteLine("FIN");
                if (e.Cancelled)
                {
                }
                if (e.Error != null)
                {
                }
                if (e.Result == null)
                {
                }
                else
                {
                    ServicePatient.Patient[] res = e.Result as ServicePatient.Patient[];
                    if (res != null)
                    {
                        foreach (ServicePatient.Patient item in res)
                        {
                            _listPatient.Add(item);
                        }
                    }
                    else {
                    }
                }
            });

            worker.RunWorkerAsync();
        }
Пример #2
0
        public void FillListPatient()
        {
            ServicePatient.ServicePatientClient service = new ServicePatient.ServicePatientClient();
            try
            {
                ServicePatient.Patient[] listPatient = service.GetListPatient();
                this._allPatient = new List <Model.Patient>();
                List <Model.Observation> listObs = new List <Model.Observation>();

                foreach (ServicePatient.Patient pat in listPatient)
                {
                    Model.Patient patient = new Model.Patient
                    {
                        Birth     = pat.Birthday,
                        Firstname = pat.Firstname,
                        Name      = pat.Name,
                        Id        = pat.Id
                    };

                    if (pat.Observations != null)
                    {
                        foreach (ServicePatient.Observation obs in pat.Observations)
                        {
                            Model.Observation observation = new Model.Observation
                            {
                                Comments      = obs.Comment,
                                Date          = obs.Date,
                                Pic           = obs.Pictures ?? new List <byte[]>().ToArray(),
                                Prescriptions = obs.Prescription.ToList() ?? new List <string>(),
                                Pressure      = obs.BloodPressure,
                                Weight        = obs.Weight
                            };
                            listObs.Add(observation);
                        }
                        patient.Obs = listObs;
                    }

                    patient.Name      = FirstUpper(patient.Name);
                    patient.Firstname = FirstUpper(patient.Firstname);
                    patient.Birthday  = pat.Birthday.ToString("dd/MM/yyyy");

                    this._allPatient.Add(patient);
                }
                ListPatient = new ObservableCollection <Model.Patient>(this._allPatient);
            }
            catch
            {
                MainWindow      main       = new MainWindow();
                View.MainWindow mainwindow = (View.MainWindow)Application.Current.MainWindow;

                View.Patients view             = new colle_tMedecine.View.Patients();
                ViewModel.PatientsViewModel vm = new colle_tMedecine.ViewModel.PatientsViewModel();
                view.DataContext = vm;

                main.navigate((UserControl)mainwindow.contentcontrol.Content, view);
            }
        }
Пример #3
0
 public bool AddPatient(ServicePatient.Patient user)
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             return(client.AddPatient(user));
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #4
0
 public List<ServicePatient.Patient> GetListPatient()
 {
     List<ServicePatient.Patient> serviceListPatient = new List<ServicePatient.Patient>();
     try
     {
         serviceListPatient = new ServicePatient.ServicePatientClient().GetListPatient().ToList();
     }
     catch (Exception ex)
     {
         //traitement exception ...
         Debug.WriteLine(ex.Message);
     }
     return serviceListPatient;
 }
Пример #5
0
 public bool DeletePatient(int id)
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             return(client.DeletePatient(id));
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #6
0
 public bool DeletePatient(int id)
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             return client.DeletePatient(id);
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #7
0
        public bool AddPatient(ServicePatient.Patient user)
        {
            try
            {

                using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
                {
                    return client.AddPatient(user);
                }
            }
            catch
            {
                throw new TimeoutException();
            }
        }
Пример #8
0
        /// <summary>
        /// constructeur
        /// </summary>
        public PatientDeleteViewModel(Page lkView, int idpatient)
        {
            _linkedView = lkView;

            _deleteCommand = new RelayCommand(param => Delete(), param => IsDeleting());

            _id = idpatient;

            ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();
            ServicePatient.Patient selectedpatient = servicePatient.GetPatient(_id);

            _name = selectedpatient.Name;
            _firstname = selectedpatient.Firstname;
            _birthday = selectedpatient.Birthday;
        }
Пример #9
0
        /// <summary>
        /// constructeur
        /// </summary>
        public PatientDeleteViewModel(Page lkView, int idpatient)
        {
            _linkedView = lkView;

            _deleteCommand = new RelayCommand(param => Delete(), param => IsDeleting());

            _id = idpatient;

            ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();
            ServicePatient.Patient selectedpatient             = servicePatient.GetPatient(_id);

            _name      = selectedpatient.Name;
            _firstname = selectedpatient.Firstname;
            _birthday  = selectedpatient.Birthday;
        }
Пример #10
0
        public void DeletePatient(object param)
        {
            Model.Patient patient = (Model.Patient)param;

            ServicePatient.ServicePatientClient service = new ServicePatient.ServicePatientClient();
            try
            {
                service.DeletePatient(patient.Id);
                this._allPatient.Remove(patient);
                ListPatient = new ObservableCollection <Model.Patient>(_allPatient);
            }
            catch
            {
                ListPatient = new ObservableCollection <Model.Patient>(_allPatient);
            }
        }
Пример #11
0
        public static void UpdatePatient(int id)
        {
            try
            {
                var spc = new ServicePatient.ServicePatientClient();
                Patient = spc.GetPatient(id);

                _basicInformation = StringHelper.FullName(Patient.Firstname, Patient.Name) + " - " +
                    String.Format("{0:dd/MM/yyyy}", Patient.Birthday);

                (App.ViewModels["PatientDetails"] as PatientDetailsViewModel).UpdateChart();
            }
            catch (Exception)
            {
            }
        }
Пример #12
0
 public ServicePatient.Patient[] GetListPatient()
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             ServicePatient.Patient[] listPatient = client.GetListPatient();
             if (listPatient == null || listPatient.Count() == 0)
                 throw new ArgumentNullException();
             else
                 return listPatient;
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #13
0
 public ServicePatient.Patient GetPatient(int id)
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             ServicePatient.Patient patient = client.GetPatient(id);
             if (patient == null)
                 throw new ArgumentNullException();
             else
                 return patient;
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #14
0
        public void RefreshPatientList()
        {
            try
            {
                var spc = new ServicePatient.ServicePatientClient();
                _patientList = spc.GetListPatient();

                this._items.Clear();
                foreach (ServicePatient.Patient p in _patientList)
                {
                    this._items.Add(new Link
                    {
                        DisplayName = p.Name,
                        Source = new Uri("Patient/" + p.Id, UriKind.Relative),
                    });
                }
            }
            catch (Exception)
            {
            }
        }
Пример #15
0
 public ServicePatient.Patient[] GetListPatient()
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             ServicePatient.Patient[] listPatient = client.GetListPatient();
             if (listPatient == null || listPatient.Count() == 0)
             {
                 throw new ArgumentNullException();
             }
             else
             {
                 return(listPatient);
             }
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #16
0
 public ServicePatient.Patient GetPatient(int id)
 {
     try
     {
         using (ServicePatient.ServicePatientClient client = new ServicePatient.ServicePatientClient())
         {
             ServicePatient.Patient patient = client.GetPatient(id);
             if (patient == null)
             {
                 throw new ArgumentNullException();
             }
             else
             {
                 return(patient);
             }
         }
     }
     catch
     {
         throw new TimeoutException();
     }
 }
Пример #17
0
        private void CreatePatient()
        {
            BackgroundWorker worker = new BackgroundWorker();

            ServicePatient.Patient newPatient = new ServicePatient.Patient();

            newPatient.Name = _name;
            newPatient.Firstname = _firstname;
            int d = 0;
            int m = 0;
            int y = 0;
            if (int.TryParse(_birthday, out d) && int.TryParse(_birthmonth, out m) && int.TryParse(_birthyear, out y))
            {

                newPatient.Birthday = new DateTime(y, m, d);

                worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
                {
                    ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();

                    Debug.WriteLine("DEBUT");
                    _iscreatingpatient = true;

                    BackgroundWorker bg = s as BackgroundWorker;
                    e.Result = servicePatient.AddPatient(newPatient);
                });

                // TODO penser a mettre un comportement en fonction des differents cas notamment en cas de fail
                worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
                {
                    Debug.WriteLine("FIN");
                    _iscreatingpatient = false;
                    WaitingMessage = "";

                    if (e.Cancelled)
                    {
                        Debug.WriteLine("CANCELLED");
                        WaitingMessage = "L'opération a été annulée.";
                    }
                    if (e.Error != null)
                    {
                        Debug.WriteLine("ERROR");
                        WaitingMessage = "Erreur lors de la création : " + e.Error.Message;
                    }
                    bool? res = e.Result as bool?;

                    if (res == null)
                    {
                        Debug.WriteLine("ERREUR COTE SERVEUR");
                        WaitingMessage = "Erreur côté serveur lors de la création. Veuillez recommencer";
                    }
                    if (res == true)
                    {
                        WaitingMessage = "Création réussie";

                        View.PatientBrowserView window = new View.PatientBrowserView();
                        ViewModel.PatientBrowserViewModel vm = new PatientBrowserViewModel(window);
                        window.DataContext = vm;

                        _ns = NavigationService.GetNavigationService(_linkedView);
                        _ns.Navigate(window);
                        WaitingMessage = "";
                    }
                    else
                    {
                        Debug.WriteLine("ECHEC DE LA CREATION");
                        WaitingMessage = "La création a échoué. Veuillez recommencer.";
                    }
                });

                worker.RunWorkerAsync();
                WaitingMessage = "Création du patient";
            }
            WaitingMessage = "Veuillez indiquer des dates valides (ex : 26 07 1989)";
        }
Пример #18
0
        /// <summary>
        /// constructeur
        /// </summary>
        public PatientBrowserViewModel(Page lkView)
        {
            _linkedView = lkView;

            _imageCommand = new RelayCommand(param => ImageAccess(param), param => true);

            _createObservationCommand = new RelayCommand(param => NavigateToCreateObservation(param), param => IsButtonAvailable());
            _addPatientCommand        = new RelayCommand(param => ClickAddPatient(), param => true);
            _navigateToHomeCommand    = new RelayCommand(param => NavigateToHome(), param => true);
            _deletePatientCommand     = new RelayCommand(param => NavigateToDeletePatient(param), param => IsButtonAvailable());

            /// Definit si les bouton de creation/suppression est disponible ou non
            if (NavigationMessenger.GetInstance().IsRWAccount)
            {
                IsAvailableRW = Visibility.Visible;
            }
            else
            {
                IsAvailableRW = Visibility.Hidden;
            }


            _listPatient = new ObservableCollection <ServicePatient.Patient>();

            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
            {
                Debug.WriteLine("DEBUT");
                ServicePatient.ServicePatientClient patientService = new ServicePatient.ServicePatientClient();
                e.Result = patientService.GetListPatient();
            });

            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
            {
                Debug.WriteLine("FIN");
                if (e.Cancelled)
                {
                }
                if (e.Error != null)
                {
                }
                if (e.Result == null)
                {
                }
                else
                {
                    ServicePatient.Patient[] res = e.Result as ServicePatient.Patient[];
                    if (res != null)
                    {
                        foreach (ServicePatient.Patient item in res)
                        {
                            _listPatient.Add(item);
                        }
                    }
                    else
                    {
                    }
                }
            });

            worker.RunWorkerAsync();
        }
Пример #19
0
        /// <summary>
        /// action permettant de supprimer un patient
        /// </summary>
        private void DeletePatient()
        {
            try
            {
                var spc = new ServicePatient.ServicePatientClient();

                spc.DeletePatient(PatientViewModel.Patient.Id);

                Sb.Begin();

                // Refresh patient list
                (App.ViewModels["PatientList"] as PatientListViewModel).RefreshPatientList();

            }
            catch (Exception)
            {
            }
        }
Пример #20
0
        /// <summary>
        /// Le clic sur le bouton permet de supprimer le patient
        /// </summary>
        private void Delete()
        {
            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
            {
                ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();

                Debug.WriteLine("DEBUT");
                _isdeleting = true;

                BackgroundWorker bg = s as BackgroundWorker;
                e.Result = servicePatient.DeletePatient(_id);
            });

            // TODO penser a mettre un comportement en fonction des differents cas notamment en cas de fail
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
            {
                Debug.WriteLine("FIN");
                _isdeleting = false;
                WaitingMessage = "";

                if (e.Cancelled)
                {
                    Debug.WriteLine("CANCELLED");
                    WaitingMessage = "L'opération a été annulée.";
                }
                if (e.Error != null)
                {
                    Debug.WriteLine("ERROR");
                    WaitingMessage = "Erreur lors de la suppression : " + e.Error.Message;
                }
                bool? res = e.Result as bool?;

                if (res == null)
                {
                    Debug.WriteLine("ERREUR COTE SERVEUR");
                    WaitingMessage = "Erreur côté serveur lors de la suppression. Veuillez recommencer";
                }
                if (res == true)
                {
                    WaitingMessage = "Suppression réussie";

                    View.PatientBrowserView window = new View.PatientBrowserView();
                    ViewModel.PatientBrowserViewModel vm = new PatientBrowserViewModel(window);
                    window.DataContext = vm;

                    _ns = NavigationService.GetNavigationService(_linkedView);
                    _ns.Navigate(window);
                    WaitingMessage = "";
                }
                else
                {
                    Debug.WriteLine("ECHEC DE LA SUPPRESSION");
                    WaitingMessage = "La suppression a échoué. Veuillez recommencer.";
                }
            });

            worker.RunWorkerAsync();
            WaitingMessage = "Suppression du patient";
        }
Пример #21
0
        /// <summary>
        /// action permettant de créer un patient
        /// </summary>
        private void CreatePatient()
        {
            try
            {
                Error = "";
                Success = "";

                // We check that all fields are filled
                CheckFields();

                // Check that patient didn't already exist
                foreach(var patient in (App.ViewModels["PatientList"] as PatientListViewModel).PatientList)
                {
                    if (patient.Firstname.Equals(_patient.Firstname) &&
                        patient.Name.Equals(_patient.Name) &&
                        patient.Birthday.Equals(_patient.Birthday))
                    {
                        throw new Exception("Ce patient existe déjà !");
                    }
                }

                _patient.Observations = new List<Observation>().ToArray();

                var spc = new ServicePatient.ServicePatientClient();
                spc.AddPatient(_patient);

                Success = "Le patient \"" + StringHelper.FullName(_patient.Firstname, _patient.Name) + "\" a été bien été ajouté !";

                // Reset fields
                ResetFields();

                // Refresh patient list
                (App.ViewModels["PatientList"] as PatientListViewModel).RefreshPatientList();
            }
            catch (Exception ex)
            {
                Error = ex.Message;
            }
        }
Пример #22
0
        private void CreatePatient()
        {
            BackgroundWorker worker = new BackgroundWorker();

            ServicePatient.Patient newPatient = new ServicePatient.Patient();

            newPatient.Name      = _name;
            newPatient.Firstname = _firstname;
            int d = 0;
            int m = 0;
            int y = 0;

            if (int.TryParse(_birthday, out d) && int.TryParse(_birthmonth, out m) && int.TryParse(_birthyear, out y))
            {
                newPatient.Birthday = new DateTime(y, m, d);

                worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
                {
                    ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();

                    Debug.WriteLine("DEBUT");
                    _iscreatingpatient = true;

                    BackgroundWorker bg = s as BackgroundWorker;
                    e.Result            = servicePatient.AddPatient(newPatient);
                });

                // TODO penser a mettre un comportement en fonction des differents cas notamment en cas de fail
                worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
                {
                    Debug.WriteLine("FIN");
                    _iscreatingpatient = false;
                    WaitingMessage     = "";

                    if (e.Cancelled)
                    {
                        Debug.WriteLine("CANCELLED");
                        WaitingMessage = "L'opération a été annulée.";
                    }
                    if (e.Error != null)
                    {
                        Debug.WriteLine("ERROR");
                        WaitingMessage = "Erreur lors de la création : " + e.Error.Message;
                    }
                    bool?res = e.Result as bool?;

                    if (res == null)
                    {
                        Debug.WriteLine("ERREUR COTE SERVEUR");
                        WaitingMessage = "Erreur côté serveur lors de la création. Veuillez recommencer";
                    }
                    if (res == true)
                    {
                        WaitingMessage = "Création réussie";

                        View.PatientBrowserView window       = new View.PatientBrowserView();
                        ViewModel.PatientBrowserViewModel vm = new PatientBrowserViewModel(window);
                        window.DataContext = vm;

                        _ns = NavigationService.GetNavigationService(_linkedView);
                        _ns.Navigate(window);
                        WaitingMessage = "";
                    }
                    else
                    {
                        Debug.WriteLine("ECHEC DE LA CREATION");
                        WaitingMessage = "La création a échoué. Veuillez recommencer.";
                    }
                });

                worker.RunWorkerAsync();
                WaitingMessage = "Création du patient";
            }
            WaitingMessage = "Veuillez indiquer des dates valides (ex : 26 07 1989)";
        }
Пример #23
0
        public void FillListPatient()
        {
            ServicePatient.ServicePatientClient service = new ServicePatient.ServicePatientClient();
            try
            {
                ServicePatient.Patient[] listPatient = service.GetListPatient();
                this._allPatient = new List<Model.Patient>();
                List<Model.Observation> listObs = new List<Model.Observation>();

                foreach (ServicePatient.Patient pat in listPatient)
                {
                    Model.Patient patient = new Model.Patient
                    {
                        Birth = pat.Birthday,
                        Firstname = pat.Firstname,
                        Name = pat.Name,
                        Id = pat.Id
                    };

                    if (pat.Observations != null)
                    {
                        foreach (ServicePatient.Observation obs in pat.Observations)
                        {
                            Model.Observation observation = new Model.Observation
                            {
                                Comments = obs.Comment,
                                Date = obs.Date,
                                Pic = obs.Pictures ?? new List<byte[]>().ToArray(),
                                Prescriptions = obs.Prescription.ToList() ?? new List<string>(),
                                Pressure = obs.BloodPressure,
                                Weight = obs.Weight
                            };
                            listObs.Add(observation);
                        }
                        patient.Obs = listObs;
                    }

                    patient.Name = FirstUpper(patient.Name);
                    patient.Firstname = FirstUpper(patient.Firstname);
                    patient.Birthday = pat.Birthday.ToString("dd/MM/yyyy");

                    this._allPatient.Add(patient);
                }
                ListPatient = new ObservableCollection<Model.Patient>(this._allPatient);
            }
            catch
            {
                MainWindow main = new MainWindow();
                View.MainWindow mainwindow = (View.MainWindow)Application.Current.MainWindow;

                View.Patients view = new colle_tMedecine.View.Patients();
                ViewModel.PatientsViewModel vm = new colle_tMedecine.ViewModel.PatientsViewModel();
                view.DataContext = vm;

                main.navigate((UserControl)mainwindow.contentcontrol.Content, view);
            }
        }
Пример #24
0
        /// <summary>
        /// Le clic sur le bouton permet de supprimer le patient
        /// </summary>
        private void Delete()
        {
            BackgroundWorker worker = new BackgroundWorker();

            worker.DoWork += new DoWorkEventHandler((object s, DoWorkEventArgs e) =>
            {
                ServicePatient.ServicePatientClient servicePatient = new ServicePatient.ServicePatientClient();

                Debug.WriteLine("DEBUT");
                _isdeleting = true;

                BackgroundWorker bg = s as BackgroundWorker;
                e.Result            = servicePatient.DeletePatient(_id);
            });

            // TODO penser a mettre un comportement en fonction des differents cas notamment en cas de fail
            worker.RunWorkerCompleted += new RunWorkerCompletedEventHandler((object s, RunWorkerCompletedEventArgs e) =>
            {
                Debug.WriteLine("FIN");
                _isdeleting    = false;
                WaitingMessage = "";

                if (e.Cancelled)
                {
                    Debug.WriteLine("CANCELLED");
                    WaitingMessage = "L'opération a été annulée.";
                }
                if (e.Error != null)
                {
                    Debug.WriteLine("ERROR");
                    WaitingMessage = "Erreur lors de la suppression : " + e.Error.Message;
                }
                bool?res = e.Result as bool?;

                if (res == null)
                {
                    Debug.WriteLine("ERREUR COTE SERVEUR");
                    WaitingMessage = "Erreur côté serveur lors de la suppression. Veuillez recommencer";
                }
                if (res == true)
                {
                    WaitingMessage = "Suppression réussie";

                    View.PatientBrowserView window       = new View.PatientBrowserView();
                    ViewModel.PatientBrowserViewModel vm = new PatientBrowserViewModel(window);
                    window.DataContext = vm;

                    _ns = NavigationService.GetNavigationService(_linkedView);
                    _ns.Navigate(window);
                    WaitingMessage = "";
                }
                else
                {
                    Debug.WriteLine("ECHEC DE LA SUPPRESSION");
                    WaitingMessage = "La suppression a échoué. Veuillez recommencer.";
                }
            });

            worker.RunWorkerAsync();
            WaitingMessage = "Suppression du patient";
        }
Пример #25
0
        public void DeletePatient(object param)
        {
            Model.Patient patient = (Model.Patient)param;

            ServicePatient.ServicePatientClient service = new ServicePatient.ServicePatientClient();
            try
            {
                service.DeletePatient(patient.Id);
                this._allPatient.Remove(patient);
                ListPatient = new ObservableCollection<Model.Patient>(_allPatient);
            }
            catch
            {
                ListPatient = new ObservableCollection<Model.Patient>(_allPatient);
            }
        }