protected virtual void OnAfterSaved(AfterSavedEventArgs e) { if (AfterSaved != null) { AfterSaved(this, e); } }
private async void AfterDetailSaved(AfterSavedEventArgs args) { if (args.ViewModelName == nameof(FriendDetailViewModel)) { await _meetingRepository.ReloadFrienAsync(args.Id); _friends = await _meetingRepository.GetAllFriendsAsync(); SetupPickList(); } }
private void AfterDetailSaved(AfterSavedEventArgs SavedFriend) { switch (SavedFriend.ViewModelName) { case nameof(FriendDetailViewModel): AfterDetailSaved(Friends, SavedFriend); break; case nameof(MeetingDetailViewModel): AfterDetailSaved(Meetings, SavedFriend); break; } }
private void AfterDetailSaved(ObservableCollection <NavigationItemViewModel> items, AfterSavedEventArgs obj) { var lookup = items.SingleOrDefault(Friend => Friend.Id == obj.Id); if (lookup == null) { items.Add(new NavigationItemViewModel(obj.Id, obj.DisplayName, _eventAggregator, obj.ViewModelName)); } else { lookup.FirstName = obj.DisplayName; } }
private void AfterDetailSaved(ObservableCollection <NavigationItemViewModel> items, AfterSavedEventArgs args) { var lookupItem = items.SingleOrDefault(s => s.Id == args.Id); if (lookupItem == null) { items.Add(new NavigationItemViewModel( args.Id, args.DisplayMember, args.ViewModelName, _eventAggregator) ); } else { lookupItem.DisplayMember = args.DisplayMember; } }