public static IState Instance() { cr.State = EnterDecimal.Instance(PosMessage.PRODUCT_QUANTITY, new StateInstance <decimal>(EnterBarcode), new StateInstance(Quit)); return(cr.State); }
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)); }
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); }
public static new IState Instance(String message, decimal defaultValue, StateInstance <decimal> ConfirmState, StateInstance CancelState) { IState baseState = EnterDecimal.Instance(message, defaultValue, ConfirmState, CancelState); return(state); }