Exemplo n.º 1
0
        public List <Delivery> GetDeliveries(int instanceNumber, DateTime begin, DateTime end,
                                             DeliveryOrder newDeliveryOrder)
        {
            List <Delivery> oldDeliveries =
                DeliveryOrderRepository.GetDeliveriesOrdersWithDeliveryOrderTrips(instanceNumber, begin, end);
            List <Delivery> newDeliveries = newDeliveryOrder.GetDeliveries();
            List <Delivery> deliveries    = new List <Delivery>();

            deliveries.AddRange(newDeliveries);
            deliveries.AddRange(oldDeliveries);
            return(deliveries.OrderBy(d => d.ServiceTimeBegin).ToList());
        }