Beispiel #1
0
 public void Update(ItemVoid pEvent)
 {
     prompt = PosContext.Instance.PosPrompt;
     if (prompt != null)
     {
         prompt.PromptText = pEvent.PromptText;
         if (pEvent.States().PeekState() == ItemVoid.GET_LINE_NUMBER)
         {
             prompt.InputText = PosContext.Instance.Receipt.OperDisplay.GetCurrentLineNo.ToString();              // PosContext.Instance.CurrentEjItem.LineNo.ToString();
             PosContext.Instance.InputLine = PosContext.Instance.Receipt.OperDisplay.GetCurrentLineNo.ToString(); //PosContext.Instance.CurrentEjItem.LineNo.ToString();
             prompt.StartInputAnimation();
         }
     }
 }
        void invoiceListView_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (PosEventStack.Instance.CurrentEvent is ItemVoid)
            {
                ItemVoid itemVoid = PosEventStack.Instance.CurrentEvent as ItemVoid;
                if (itemVoid.States().PeekState() == ItemVoid.GET_LINE_NUMBER)
                {
                    try
                    {
                        InvoiceLineInfo lineInfo = _colView.CurrentItem as InvoiceLineInfo;
                        PosContext.Instance.ClearInput();
                        NumKey numKey = new NumKey();
                        numKey.Engage(lineInfo.LineNumber);
                    }
                    catch
                    {
                    }
                }
            }

            if (PosEventStack.Instance.CurrentEvent is EjPriceOverride)
            {
                EjPriceOverride ejPO = PosEventStack.Instance.CurrentEvent as EjPriceOverride;
                if (ejPO.States().PeekState() == EjPriceOverride.GET_LINE_NUMBER)
                {
                    try
                    {
                        InvoiceLineInfo lineInfo = _colView.CurrentItem as InvoiceLineInfo;
                        PosContext.Instance.ClearInput();
                        NumKey numKey = new NumKey();
                        numKey.Engage(lineInfo.LineNumber);
                    }
                    catch
                    {
                    }
                }
            }

            if (PosEventStack.Instance.CurrentEvent is ChangeQuantity)
            {
                ChangeQuantity chQty = PosEventStack.Instance.CurrentEvent as ChangeQuantity;
                if (chQty.States().PeekState() == ChangeQuantity.GET_LINE_NUMBER)
                {
                    try
                    {
                        InvoiceLineInfo lineInfo = _colView.CurrentItem as InvoiceLineInfo;
                        PosContext.Instance.ClearInput();
                        NumKey numKey = new NumKey();
                        numKey.Engage(lineInfo.LineNumber);
                    }
                    catch
                    {
                    }
                }
            }

            if (PosEventStack.Instance.CurrentEvent is RemoveSalesPerson)
            {
                RemoveSalesPerson rSalesPerson = PosEventStack.Instance.CurrentEvent as RemoveSalesPerson;
                if (rSalesPerson.States().PeekState() == RemoveSalesPerson.GET_SALES_PERSON)
                {
                    try
                    {
                        InvoiceLineInfo lineInfo = _colView.CurrentItem as InvoiceLineInfo;
                        PosContext.Instance.ClearInput();
                        PosContext.Instance.InputLine = lineInfo.Employee_no;
                        PosEventStack.Instance.NextEvent();
                    }
                    catch
                    {
                    }
                }
            }
        }