Example #1
0
 public UpdatePhysicianViewModel(AdminShellViewModel containingVm, Physician physicianToUpdate)
 {
     updatePhysicianM  = new UpdatePhysicianModel();
     this.containingVm = containingVm;
     Physician         = physicianToUpdate;
     UpdateDbCommand   = new UpdateInDbCommand(this);
     IsNewPhysician    = false;
     BackCommand       = new BackCommand(this);
 }
Example #2
0
 public UpdatePatientViewModel(AdminShellViewModel containingVm, Patient patientToUpdate)
 {
     updatePatientM    = new UpdatePatientModel();
     this.containingVm = containingVm;
     Patient           = patientToUpdate;
     UpdateDbCommand   = new UpdateInDbCommand(this);
     IsNewPatient      = false;
     BackCommand       = new BackCommand(this);
 }
 public UpdateDrugViewModel(AdminShellViewModel containingVm, Drug drugToUpdate)
 {
     updateDrugM             = new UpdateDrugModel(drugToUpdate);
     this.containingVm       = containingVm;
     UpdateDbCommand         = new UpdateInDbCommand(this);
     IsNewDrug               = false;
     BackCommand             = new BackCommand(this);
     IngredientToAdd         = new ActiveIngredient();
     Ingredients             = new ObservableCollection <ActiveIngredient>(updateDrugM.Ingredients);
     AddIngredientCommand    = new AddIngredientToDrugCommand(this);
     DeleteIngredientCommand = new DeleteItemCommand(this);
     FileDialogCommand       = new OpenFileDialogCommand(this);
     ImageUrl = Drug.ImageUrl;
 }