示例#1
0
        private async void OnSaveExecute()
        {
            await _friendDataService.SaveAsync(Friend.Model);

            _eventAggregator.GetEvent <AfterFriendSavedEvent>().Publish(new AfterFriendSavedEventArgs {
                Id = Friend.Id, DisplayMember = $"{Friend.FirstName} {Friend.LastName}"
            });
        }
示例#2
0
 private void SaveObject()
 {
     result = MessageBox.Show("You sure you want to edit?",
                              "Confirmation",
                              MessageBoxButton.YesNo,
                              MessageBoxImage.Question);
     if (result == MessageBoxResult.Yes)
     {
         _friendDataService.SaveAsync(_selectedFriend);
         Load();
     }
 }