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 PatientViewModel(int patientId) { LoadPatient(patientId); PatientInfo.PatentInsertedAction += (id) => { PatientAddressInfo.PatientId = id; }; closePatientCommand = new RelayCommand(ClosePatient); }
public LoginViewModel() { loginCommand = new RelayCommand(Login, () => !string.IsNullOrWhiteSpace(UserName)); cancelLoginCommand = new RelayCommand(CancelLogin); }
public PatientAddressViewModel(tAddress address) { CopyAddressProperties(address); CommandSavePatientAddress = new RelayCommand<object>((parameter) => SavePatientAddressData(parameter),(parameter)=>CanSave(parameter)); }