예제 #1
0
 public static IState Instance()
 {
     cr.State = EnterDecimal.Instance(PosMessage.PRODUCT_QUANTITY,
                                      new StateInstance <decimal>(EnterBarcode),
                                      new StateInstance(Quit));
     return(cr.State);
 }
예제 #2
0
        private static void TaxRatesMenuAction(Object menu)
        {
            String msg = ((MenuLabel)menu).ToString();

            vatIndex = (msg.Substring(msg.IndexOf("\t") + 1, 2)).Trim();

            cr.State = EnterDecimal.Instance(PosMessage.VAT_RATE + "\t " + vatIndex,
                                             printerTaxRates[int.Parse(vatIndex) - 1],
                                             new StateInstance <decimal>(SetTaxRates),
                                             new StateInstance(Continue));
        }
예제 #3
0
 public override void Pay(CheckPaymentInfo info)
 {
     if (cr.Document.Customer != null &&
         cr.Document.Customer.Points > 0 &&
         cr.Document.Adjustments.Length == 0 &&
         !(cr.Document is ReturnDocument)
         )
     {
         Payment.TempPaymentMethod = info;
         decimal customerPointsPrice = cr.Document.PointPrices(cr.Document.Customer.Points);
         cr.State = EnterDecimal.Instance(String.Format("({0} PUAN)\t{1:N2}", cr.Document.Customer.Points, customerPointsPrice),
                                          new StateInstance <Decimal>(Payment.ApplyPointDiscount),
                                          new StateInstance(Payment.PayAfterPointDiscount));
         return;
     }
     cr.State = Payment.Instance(String.Empty);
     cr.State.Pay(info);
 }
예제 #4
0
        public static new IState Instance(String message, decimal defaultValue, StateInstance <decimal> ConfirmState, StateInstance CancelState)
        {
            IState baseState = EnterDecimal.Instance(message, defaultValue, ConfirmState, CancelState);

            return(state);
        }