private async Task SubmitAsync() { string errorMessage = string.Empty; try { if (await _accountService.VerifySavedCredentialsAsync() == null) { _signInUserControlViewModel.Open(async() => await SubmitOrderTransactionAsync()); } else { await SubmitOrderTransactionAsync(); } } catch (Exception ex) { errorMessage = string.Format(CultureInfo.CurrentCulture, _resourceLoader.GetString("GeneralServiceErrorMessage"), Environment.NewLine, ex.Message); } if (!string.IsNullOrWhiteSpace(errorMessage)) { await _alertMessageService.ShowAsync(errorMessage, _resourceLoader.GetString("ErrorProcessingOrder")); } }
private async Task CheckoutAsync() { string errorMessage = string.Empty; try { if (await _accountService.VerifyUserAuthenticationAsync() == null) { _signInUserControlViewModel.Open(async() => await GoToNextPageAsync()); } else { await GoToNextPageAsync(); } } catch (Exception ex) { errorMessage = string.Format(CultureInfo.CurrentCulture, _resourceLoader.GetString("GeneralServiceErrorMessage"), Environment.NewLine, ex.Message); } if (!string.IsNullOrWhiteSpace(errorMessage)) { await _alertMessageService.ShowAsync(errorMessage, _resourceLoader.GetString("ErrorServiceUnreachable")); } }