Esempio n. 1
0
        public OrdersList ExtractOrdersByOrderDeliveryDate(DateTime orderDeliveryDate)
        {
            OrdersList result = new OrdersList();

            foreach (Order order in OrderList)
            {
                if (order.OrderDeliveryDate.Date <= orderDeliveryDate.Date)
                {
                    result.AddOrder(order);
                }
            }
            RemoveOrders(result);
            return(result);
        }
Esempio n. 2
0
        /// <summary>
        /// Retutn OrderList with given OrderDate
        /// </summary>
        /// <param name="orderDate"></param>
        /// <returns></returns>
        public OrdersList GetOrdersByOrderDate(DateTime orderDate)
        {
            OrdersList result = new OrdersList();

            foreach (Order order in OrderList)
            {
                if (order.OrderDate.Date <= orderDate.Date)
                {
                    result.AddOrder(order);
                }
            }

            return(result);
        }