Exemplo n.º 1
0
        /// <summary>
        /// Se charge de naviguer vers la page de suppression
        /// </summary>
        /// <param name="obj">l'id du patient</param>
        private void NavigateToDeletePatient(object obj)
        {
            int?idSelectedPatient = obj as int?;

            if (idSelectedPatient.HasValue)
            {
                View.PatientDeleteView           window = new View.PatientDeleteView();
                ViewModel.PatientDeleteViewModel vm     = new PatientDeleteViewModel(window, idSelectedPatient.Value);
                window.DataContext = vm;

                _ns = NavigationService.GetNavigationService(_linkedView);
                _ns.Navigate(window);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Se charge de naviguer vers la page de suppression
        /// </summary>
        /// <param name="obj">l'id du patient</param>
        private void NavigateToDeletePatient(object obj)
        {
            int? idSelectedPatient = obj as int?;
            if (idSelectedPatient.HasValue)
            {
                View.PatientDeleteView window = new View.PatientDeleteView();
                ViewModel.PatientDeleteViewModel vm = new PatientDeleteViewModel(window, idSelectedPatient.Value);
                window.DataContext = vm;

                _ns = NavigationService.GetNavigationService(_linkedView);
                _ns.Navigate(window);
            }
        }