示例#1
0
        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"));
            }
        }
示例#2
0
        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"));
            }
        }