コード例 #1
0
        public frmPayCash(PayCashConfirmation payCashConfirmation)
            : this()
        {
            this.operationDone = false;
            if (payCashConfirmation == null)
            {
                throw new ArgumentNullException("payCashConfirmation");
            }
            this.tenderInfo = (Tender)payCashConfirmation.TenderInfo;
            this.Text       = payCashConfirmation.Title;

            amtCashAmounts.LocalCurrencyCode = ApplicationSettings.Terminal.StoreCurrency;
            amtCashAmounts.UsedCurrencyCode  = ApplicationSettings.Terminal.StoreCurrency;
            this.balanceAmount                 = payCashConfirmation.BalanceAmount;
            amtCashAmounts.SoldLocalAmount     = PosApplication.Instance.Services.Rounding.RoundAmount(balanceAmount, ApplicationSettings.Terminal.StoreId, tenderInfo.TenderID.ToString());
            amtCashAmounts.ForeignCurrencyMode = false;
            amtCashAmounts.HighestOptionAmount = tenderInfo.MaximumAmountAllowed;
            amtCashAmounts.LowesetOptionAmount = tenderInfo.MinimumAmountAllowed;

            if (this.tenderInfo.OverTenderAllowed)
            {
                amtCashAmounts.ViewOption = LSRetailPosis.POSProcesses.WinControls.AmountViewer.ViewOptions.HigherAmounts;
            }
            else
            {
                amtCashAmounts.ViewOption = LSRetailPosis.POSProcesses.WinControls.AmountViewer.ViewOptions.ExcactAmountOnly;
            }

            amtCashAmounts.SetButtons();

            numCashNumpad.NegativeMode = this.balanceAmount < 0;
            numCashNumpad.Select();
        }
コード例 #2
0
        private void HandlePayCashConfirmationInteraction(InteractionRequestedEventArgs e)
        {
            if (e == null)
            {
                throw new ArgumentNullException("InteractionRequestedEventArgs");
            }

            PayCashConfirmation context = (PayCashConfirmation)e.Context;
            PayCashConfirmation results = InvokeInteraction <PayCashConfirmation, PayCashConfirmation>("PayCashForm", context, true);

            if (results != null)
            {
                context.Confirmed        = results.Confirmed;
                context.RegisteredAmount = results.RegisteredAmount;
                context.OperationDone    = results.OperationDone;
            }
        }