Beispiel #1
0
        /// <summary>
        /// method wich fill the lists to print the details on the bon
        /// </summary>
        /// <param name="department"></param>
        private void FillListsToPrintBon()
        {
            string department = string.Empty;

            for (int i = 0; i < linesInOrde.Length; i++)
            {
                LinesInOrder curr_line = new LinesInOrder(linesInOrde[i]);

                if (curr_line.isLineGlass())
                {
                    curr_line.ProductID -= GLASS_ID_SCALE_FACTOR;
                }

                if (curr_line.isLineTakeAwayBottle())
                {
                    curr_line.ProductID -= TA_BOTTLE_ID_SCALE_FACTOR;
                }

                department = db.GetProdductDepartmentByID(curr_line.ProductID);
                if (department == "kitchen")
                {
                    kitchen.Add(curr_line);
                }
                if (department == "Bar")
                {
                    Bar.Add(curr_line);
                }
                if (department == "Waiters")
                {
                    Waiters.Add(curr_line);
                }
                department = string.Empty;
            }
        }
Beispiel #2
0
 /// <summary>
 /// Copy Constractor function
 /// </summary>
 public LinesInOrder(LinesInOrder instance_of)
 {
     this.orderID     = instance_of.orderID;
     this.productID   = instance_of.productID;
     this.productName = instance_of.productName;
     this.amount      = instance_of.amount;
     this.totalPrice  = instance_of.totalPrice;
     this.notes       = instance_of.notes;
 }