public void PrintlnDiscount()
 {
     if (this.discountLine == null)
     {
         this.Println();
         this.discountLine = this.lineInfo;
     }
     else
     {
         this.discountLine.Amount = this.Amount;
     }
 }
 public void PrintlnSurcharge()
 {
     if (this.surchargeLine == null)
     {
         this.Println();
         this.surchargeLine = this.lineInfo;
     }
     else
     {
         this.surchargeLine.Amount = this.Amount;
     }
 }
        public void Println()
        {
            lineInfo             = new InvoiceLineInfo();
            lineInfo.Amount      = this.Amount;
            lineInfo.Desc        = this.Desc;
            lineInfo.Item        = this.Item;
            lineInfo.Price       = this.Price;
            lineInfo.Qty         = this.Qty;
            lineInfo.PLU         = this.PLU;
            lineInfo.LineNumber  = this.LineNumber;
            lineInfo.Employee_no = this.Employee_no;

            invoiceLines.Add(lineInfo);


            _colView.MoveCurrentToLast();
            this.SetSelectedItemCursor();
        }
 public void ClearEmployeeLine(string employee)
 {
     try
     {
         InvoiceLineInfo lineInfoWork = null;
         foreach (InvoiceLineInfo lineInfo in invoiceLines)
         {
             if (lineInfo.Employee_no == employee)
             {
                 lineInfoWork = lineInfo;
             }
         }
         if (lineInfoWork != null)
         {
             invoiceLines.Remove(lineInfoWork);
         }
     }
     catch (Exception ex)
     {
     }
 }
 public void Clearln(int index)
 {
     try
     {
         InvoiceLineInfo lineInfoWork = null;
         foreach (InvoiceLineInfo lineInfo in invoiceLines)
         {
             if (lineInfo.LineNumber == index)
             {
                 lineInfoWork = lineInfo;
             }
         }
         if (lineInfoWork != null)
         {
             invoiceLines.Remove(lineInfoWork);
         }
     }
     catch (Exception ex)
     {
     }
 }
        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
                    {
                    }
                }
            }
        }
 public void Clear()
 {
     invoiceLines.Clear();
     this.surchargeLine = null;
     this.discountLine  = null;
 }