Esempio n. 1
0
 /// <summary>
 /// Remove Orders From Order List
 /// </summary>
 /// <param name="orderList"></param>
 public void RemoveOrders(OrdersList orderList)
 {
     if (orderList.OrderList.Count > 0)
     {
         foreach (Order order in orderList.OrderList)
         {
             RemoveOrder(order);
         }
     }
 }
Esempio n. 2
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. 3
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);
        }