Exemplo n.º 1
0
 protected virtual void OnAfterSaved(AfterSavedEventArgs e)
 {
     if (AfterSaved != null)
     {
         AfterSaved(this, e);
     }
 }
Exemplo n.º 2
0
        private async void AfterDetailSaved(AfterSavedEventArgs args)
        {
            if (args.ViewModelName == nameof(FriendDetailViewModel))
            {
                await _meetingRepository.ReloadFrienAsync(args.Id);

                _friends = await _meetingRepository.GetAllFriendsAsync();

                SetupPickList();
            }
        }
Exemplo n.º 3
0
        private void AfterDetailSaved(AfterSavedEventArgs SavedFriend)
        {
            switch (SavedFriend.ViewModelName)
            {
            case nameof(FriendDetailViewModel):
                AfterDetailSaved(Friends, SavedFriend);
                break;

            case nameof(MeetingDetailViewModel):
                AfterDetailSaved(Meetings, SavedFriend);
                break;
            }
        }
Exemplo n.º 4
0
        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;
            }
        }
Exemplo n.º 5
0
        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;
            }
        }