public void SuccessCallBack() { Patient newPatient = new CSPatient().GetPatient(Id); if (newPatient != null) { this._patientToDisplay = newPatient; this.ObservationList = this._patientToDisplay.Observations == null ? new ObservableCollection <Observation>() : new ObservableCollection <Observation>(this._patientToDisplay.Observations); } }
/// <summary> /// Constructeur du ViewModel de connexion. /// </summary> public PatientManagementViewModel(MainWindowViewModel mainView) { base.DisplayName = "Udokotela - Gestion des patients"; this._patientService = new CSPatient(); this._mainView = mainView; GetPatientsInfo(); this.AddPatientCommand = new RelayCommand(param => AddPatient(), param => MainWindowViewModel.CheckUserRole()); this.DeleteSelectedPatientsCommand = new RelayCommand(param => DeleteSelectedPatient(), param => MainWindowViewModel.CheckUserRole() && this.PatientSelected != null); this.OnRowDoubleClic = new RelayCommand(param => ShowSelectedPatient(), param => this.PatientSelected != null); }
public AddPatientViewModel() { base.DisplayName = "Ajouter un patient"; this._patientService = new CSPatient(); this.Name = ""; this.FirstName = ""; this.Birthdate = DateTime.Now; this.SaveCommand = new RelayCommand(param => Save(), param => MainWindowViewModel.CheckUserRole()); this.CancelCommand = new RelayCommand(param => Cancel(), param => true); }