コード例 #1
0
        public static IState Instance(String message, decimal defaultValue, StateInstance <decimal> ConfirmState, StateInstance CancelState)
        {
            IState baseState = EnterInteger.Instance(message, defaultValue, null, CancelState);

            ReturnConfirm = ConfirmState;
            return(state);
        }
コード例 #2
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        private static IState SetBatchNo(int batchNo)
        {
            currentBatchNo = batchNo;

            return(EnterInteger.Instance(PosMessage.STAN_NO,
                                         new StateInstance <int>(SetStanNo),
                                         new StateInstance(Continue)));
        }
コード例 #3
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        private static IState SetZNo(int zNo)
        {
            currentZNo = zNo;

            return(EnterInteger.Instance(PosMessage.DOCUMENT_ID,
                                         new StateInstance <int>(SetDocumentNo),
                                         new StateInstance(Continue)));
        }
コード例 #4
0
 public override void SubTotal()
 {
     if (currentProduct != null)
     {
         cr.State = EnterInteger.Instance(PosMessage.PRODUCT_QUANTITY,
                                          new StateInstance <int>(ChangeQuantity),
                                          new StateInstance(Quit));
     }
 }
コード例 #5
0
        public static IState Instance(String message, StateInstance <decimal> ConfirmState, StateInstance CancelState, StateInstance <decimal> RepeatState)
        {
            IState baseState = EnterInteger.Instance(message, null, CancelState);

            ReturnConfirm = ConfirmState;
            ReturnRepeat  = RepeatState;
            firstTime     = true;
            return(state);
        }
コード例 #6
0
        public static IState SetIPAddress(string ip)
        {
            ipAddress = ip;
            cr.State  = EnterInteger.Instance(PosMessage.PORT,
                                              defPort,
                                              new StateInstance <int>(SetPort),
                                              new StateInstance(Continue));

            return(cr.State);
        }
コード例 #7
0
 public override void Pay(CheckPaymentInfo info)
 {
     if (input == null)
     {
         input = new Number(0);
     }
     info.Amount = input.ToDecimal();
     paymentInfo = info;
     cr.State    = EnterInteger.Instance(PosMessage.CHECK_ID,
                                         new StateInstance <int>(PayByCheck));
 }
コード例 #8
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        private static void GetAcquierId(Object o)
        {
            MenuLabel label = o as MenuLabel;

            if (label.Value.ToString().Contains("Z NO"))
            {
                isZNoDocNo = true;
            }
            else
            {
                isZNoDocNo = false;
            }

            cr.State = EnterInteger.Instance(PosMessage.ACQUIER_ID,
                                             new StateInstance <int>(SetAcquierId),
                                             new StateInstance(Continue));
        }
コード例 #9
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        public static void GetRepeatType(Object o)
        {
            MenuLabel label = o as MenuLabel;

            if (label.Value.ToString().Contains("BELGE NO ÝLE"))
            {
                cr.State = EnterInteger.Instance(PosMessage.DOCUMENT_ID,
                                                 new StateInstance <int>(RepeatDocument),
                                                 new StateInstance(Continue));
            }
            else if (label.Value.ToString().Contains("BARKOD ÝLE"))
            {
                cr.State = EnterString.Instance(PosMessage.BARCODE,
                                                new StateInstance <string>(RepeatDocument),
                                                new StateInstance(Continue));
            }
        }
コード例 #10
0
        //Called from this, EnterNumber and Selling
        public static void GetCreditInstallments(CreditPaymentInfo creditInfo)
        {
            if (creditInfo.Amount == 0 && paymentInfo != null)
            {
                creditInfo.Amount = paymentInfo.Amount;
            }

            paymentInfo = creditInfo;
            if (cr.DataConnector.CurrentSettings.GetProgramOption(Setting.PromptCreditInstallments) == PosConfiguration.ON &&
                !creditInfo.Credit.IsTicket &&
                cr.IsAuthorisedFor(Authorizations.InstallOptAuth))
            {
                cr.State = EnterInteger.Instance(PosMessage.INSTALLMENT_COUNT, 0,
                                                 new StateInstance <int>(PayByCredit));
            }
            else
            {
                cr.State = PayByCredit(0);
            }
        }
コード例 #11
0
ファイル: CommandMenu.cs プロジェクト: serhatmorkoc/cepos
        private static IState SetAcquierId(int acquierId)
        {
            currentAcquierId = acquierId;

            if (isZNoDocNo)
            {
                return(EnterInteger.Instance(PosMessage.Z_NO,
                                             new StateInstance <int>(SetZNo),
                                             new StateInstance(Continue)));
            }
            else if (selectedEftOperation == PosMessage.RETURN_DOCUMENT_TR)
            {
                return(SetStanNo(0));
            }
            else
            {
                return(EnterInteger.Instance(PosMessage.BATCH_NO,
                                             new StateInstance <int>(SetBatchNo),
                                             new StateInstance(Continue)));
            }
        }