public MasterTargetListViewModel() { TargetProfiles = new ObservableCollection <PersonModel>(); AlohomoraServices.RegisterService("MasterTargetListViewModel", this); DeleteItemCommand = new ButtonCommand(CanDeleteItem, DeleteItemExecuted); TargetDetailsCommand = new ButtonCommand(CanDisplayTargetDetails, DisplayTargetDetails); GetPersonModels(); }
public TargetProfileViewModel(PersonModel targetModel) { if (targetModel == null) { throw new Exception("Target Profile cannot be null"); } else { TargetProfile = targetModel; OnPropertyChanged("TargetProfile"); } AddNoteCommand = new ButtonCommand(CanExecuteAddNoteText, AddNoteTextExecuted); DeleteNoteCommand = new ButtonCommand(CanExecuteDeleteNoteText, DeleteNoteTextExecuted); AlohomoraServices.RegisterService("TargetProfileViewModel", this); }