public void Prepare(Ticket selectedTicket)
        {
            _foreignCurrencyButtonsViewModel.Prepare();
            _paymentTotals.Model          = selectedTicket;
            _paymentEditor.SelectedTicket = selectedTicket;
            _orderSelectorViewModel.UpdateTicket(selectedTicket);
            _numberPadViewModel.ResetValues();
            _numberPadViewModel.LastTenderedAmount = _tenderedValueViewModel.PaymentDueAmount;
            _numberPadViewModel.BalanceMode        = false;
            _commandButtonsViewModel.Update();
            _foreignCurrencyButtonsViewModel.UpdateCurrencyButtons();

            RaisePropertyChanged(() => SelectedTicketTitle);
        }
예제 #2
0
 private void OnSelectCalculationSelector(CalculationSelector calculationSelector)
 {
     foreach (var calculationType in calculationSelector.CalculationTypes)
     {
         var amount = calculationType.Amount;
         if (amount == 0)
         {
             amount = _tenderedValueViewModel.GetTenderedValue();
         }
         if (calculationType.CalculationMethod == 0 || calculationType.CalculationMethod == 1)
         {
             amount = amount / _paymentEditor.ExchangeRate;
         }
         _paymentEditor.SelectedTicket.AddCalculation(calculationType, amount);
     }
     _tenderedValueViewModel.UpdatePaymentAmount(0);
     _orderSelectorViewModel.UpdateTicket(_paymentEditor.SelectedTicket);
     _numberPadViewModel.ResetValues();
 }