Пример #1
0
 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);
 }
Пример #2
0
 public PatientViewModel(int patientId)
 {
     LoadPatient(patientId);
     PatientInfo.PatentInsertedAction += (id) => { PatientAddressInfo.PatientId = id; };
     closePatientCommand = new RelayCommand(ClosePatient);
 }
Пример #3
0
 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));
 }