/// <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); } } }
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); }
/// <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); }