コード例 #1
0
        private void ValidateQite()
        {
            PerformAction(async() =>
            {
                PopupService.IsPopupOpen     = false;
                PopupService.IsQitePopupOpen = false;
                var timer = new Stopwatch();
                timer.Restart();
                try
                {
                    if (_qiteValidate == null)
                    {
                        _qiteValidate = await _checkoutBusinessLogic.ValidateQite(BandMember);
                    }

                    _checkoutSummary.SaleSummary   = _qiteValidate.SaleSummary;
                    _checkoutSummary.TenderSummary = _qiteValidate.TenderSummary;
                    NavigateService.Instance.NavigateToSaleSummary();
                    MessengerInstance.Send(_checkoutSummary);
                }
                catch (ApiDataException ex)
                {
                    ShowNotification(ex.Error.Message, OpenQitePopup, OpenQitePopup,
                                     ApplicationConstants.ButtonWarningColor);
                }
                finally
                {
                    ReInitialize(true);
                    timer.Stop();
                    Log.Info(string.Format("Time taken in Validate Qite is {0}ms ", timer.ElapsedMilliseconds));
                }
            });
        }
コード例 #2
0
 public void ReInitialize(bool flag)
 {
     BandMember = string.Empty;
     IsBandMemberNameVisible = false;
     BandMemberName          = string.Empty;
     _qiteValidate           = null;
 }
コード例 #3
0
 private void GetBandMemberName()
 {
     PerformAction(async() =>
     {
         try
         {
             PopupService.PopupInstance.IsPopupOpen     = false;
             PopupService.PopupInstance.IsQitePopupOpen = false;
             _qiteValidate  = await _checkoutBusinessLogic.ValidateQite(BandMember);
             BandMemberName = _qiteValidate.BandMemberName;
             PopupService.PopupInstance.IsPopupOpen     = true;
             PopupService.PopupInstance.IsQitePopupOpen = true;
         }
         catch (ApiDataException ex)
         {
             ShowNotification(ex.Error.Message, OpenQitePopup, OpenQitePopup,
                              ApplicationConstants.ButtonWarningColor);
         }
     });
 }