public PatientInfoViewModel(tPatient patientInfo) { _doctorListViewModel = new DoctorListViewModel(); _doctorListViewModel.DoctorSelectEvent += (selectedDoctor) => { if (selectedDoctor != null) { DoctorId = selectedDoctor.DoctorId; DoctorName = selectedDoctor.FirstName + " " + selectedDoctor.LastName; } }; CopyPatientProperties(patientInfo); CommandSavePatientDetail = new RelayCommand <object>((parameter) => SavePatientData(parameter), (parameter) => CanSave(parameter)); showDoctorCommand = new RelayCommand(ShowDoctor); }
public PatientInfoViewModel(tPatient patientInfo) { _doctorListViewModel = new DoctorListViewModel(); _doctorListViewModel.DoctorSelectEvent += (selectedDoctor) => { if (selectedDoctor != null) { DoctorId = selectedDoctor.DoctorId; DoctorName = selectedDoctor.FirstName + " " + selectedDoctor.LastName; } }; CopyPatientProperties(patientInfo); CommandSavePatientDetail = new RelayCommand<object>((parameter) => SavePatientData(parameter), (parameter)=> CanSave(parameter)); showDoctorCommand = new RelayCommand(ShowDoctor); }
private void LoadDoctorScreen(DoctorListViewModel doctorListViewModel) { var doctorView = new DoctorListView(); doctorListViewModel.CloseViewAction += () => { doctorView.Close(); }; doctorView.DataContext = doctorListViewModel; doctorView.ShowDialog(); }