示例#1
0
        /// <summary>
        /// Get a string of the Stock by a type of order
        /// </summary>
        /// <param name="order">by what comperiosn to sort</param>
        /// <returns></returns>
        public IEnumerable <Box> GetStock()
        {
            List <Box> stock = new List <Box>();

            _mainTree.TraverseInOrder(x => x.InnerTree.TraverseInOrder(y => stock.Add(new Box {
                Id = y.Id, X = x.X, Y = y.Y, Count = y.Count, TimeLastPurchase = y.DateNode.Data.TimeLastPurchase
            })));
            return(stock);
        }