protected async override void ActivateSelected() { string action = SelectedContact.Status == EntityStatus.Active ? "deactivate" : "activate"; if (MessageBox.Show("Are you sure you want to " + action + " this Contact?", "Agrimanagr: " + action + " Contact", MessageBoxButton.YesNo) == MessageBoxResult.No) return; using (var c = NestedContainer) { ResponseBool response = new ResponseBool() { Success = false }; if (SelectedContact == null) return; _proxy = Using<IDistributorServiceProxy>(c); if (action == "activate") { response = await _proxy.ContactActivateAsync(SelectedContact.Id); } else if (action == "deactivate") { response = await _proxy.ContactDeactivateAsync(SelectedContact.Id); } MessageBox.Show(response.ErrorInfo, "Agrimangr: Manage Contact", MessageBoxButton.OK, MessageBoxImage.Information); if (MessageBox.Show("Contact has been "+action+"d", "Agrimangr: "+action+" Contact", MessageBoxButton.OK, MessageBoxImage.Information) == MessageBoxResult.OK) Load(); } }