Esempio n. 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}"
            });
        }
Esempio n. 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();
     }
 }