Пример #1
0
        public static List<CompleteOrder> GeneriereOrders(List<Order> orders, List<OrderLine> lines)
        {
            var ret = new List<CompleteOrder>();
            foreach (var order1 in orders)
            {
                var order = new CompleteOrder(order1, new List<OrderLine>());
                ret.Add(order);
                foreach (var orderLine in lines)
                {
                    if (orderLine.Order.Id == order1.Id)
                    {
                        order.Orderlines.Add(orderLine);
                    }
                }

            }
            return ret;
        }