private async void DoRevert(object obj) { if (String.IsNullOrEmpty(DeliveryMessage)) { AppInfoBox.ShowInfoMessage("Delivery message is mandatory . ."); return; } if (System.Windows.MessageBox.Show("Confirm Revert Action . .", "Confirm", MessageBoxButton.OKCancel) != MessageBoxResult.OK) { return; } if (Role != null && TAN != null) { WorkInProgress = true; try { var result = await RestHub.RevertDeliveryTAN(TAN.Id, Role.Role, DeliveryMessage); if (result.HttpCode == System.Net.HttpStatusCode.OK) { AppInfoBox.ShowInfoMessage(result.StatusMessage); Search.Execute(this); } else { AppErrorBox.ShowErrorMessage("Error While Reverting TAN . .", result.StatusMessage); } } catch (Exception ex) { AppErrorBox.ShowErrorMessage("Error While Reverting TAN . .", ex.ToString()); } finally { WorkInProgress = false; } } else { System.Windows.MessageBox.Show("Select Role and TAN"); } }