Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 3
0
 public AddPhysicianViewModel(AdminShellViewModel containingShellVm)
 {
     addPhysicianM     = new AddPhysicianModel();
     this.containingVm = containingShellVm;
     UpdateDbCommand   = new AddToDbCommand(this);
     IsNewPhysician    = true;
     BackCommand       = new BackCommand(this);
     Physician         = new Physician();
 }
 public AddPatientViewModel(AdminShellViewModel containingVm)
 {
     addPatientM       = new AddPatientModel();
     this.containingVm = containingVm;
     UpdateDbCommand   = new AddToDbCommand(this);
     TodayDate         = DateTime.Today;
     IsNewPatient      = true;
     BackCommand       = new BackCommand(this);
     Patient           = new Patient();
 }
 public PhysiciansManagementViewModel(AdminShellViewModel shellViewModel)
 {
     physiciansManagementM = new PhysiciansManagementModel();
     Items = new ObservableCollection <Physician>(physiciansManagementM.Physicians);
     Items.CollectionChanged += PhysiciansChanged;
     this.containingShellVm   = shellViewModel;
     EditCommand              = new EditingItemCommand(this);
     DeleteCommand            = new DeleteItemCommand(this);
     SearchCommand            = new SearchItemCommand(this);
     ScreenReplacementCommand = new ScreenReplacementCommand(this);
 }
Ejemplo n.º 6
0
 public DrugsManagementViewModel(AdminShellViewModel shellViewModel)
 {
     drugsManagementM         = new DrugsManagementModel();
     Items                    = new ObservableCollection <Drug>(drugsManagementM.Drugs);
     Items.CollectionChanged += DrugsChanged;
     this.containingShellVm   = shellViewModel;
     EditCommand              = new EditingItemCommand(this);
     DeleteCommand            = new DeleteItemCommand(this);
     SearchCommand            = new SearchItemCommand(this);
     ScreenReplacementCommand = new ScreenReplacementCommand(this);
 }
 public AddDrugViewModel(AdminShellViewModel containingVm)
 {
     addDrugM                = new AddDrugModel();
     this.containingVm       = containingVm;
     UpdateDbCommand         = new AddToDbCommand(this);
     IsNewDrug               = true;
     BackCommand             = new BackCommand(this);
     IngredientToAdd         = new ActiveIngredient();
     Ingredients             = new ObservableCollection <ActiveIngredient>();
     AddIngredientCommand    = new AddIngredientToDrugCommand(this);
     DeleteIngredientCommand = new DeleteItemCommand(this);
     FileDialogCommand       = new OpenFileDialogCommand(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;
 }
 public void InitAdminSell(IUser user)
 {
     adminShellVM = new AdminShellViewModel(this, (Admin)user);
     CurrentVm    = adminShellVM;
 }