示例#1
0
        public virtual void AddShipment(ExpeditionService expeditionService, Func <decimal, Tuple <decimal, EstimatedTimeDelivery> > getShippingCost)
        {
            var totalWeight           = this.Items.Sum(i => i.Product.Weight * i.Quantity);
            var result                = getShippingCost(totalWeight);
            var shippingCost          = result.Item1;
            var estimatedTimeDelivery = result.Item2;

            this.Shipment = new OrderShipment(expeditionService, shippingCost, estimatedTimeDelivery);
            calculateSummary();
        }
示例#2
0
 public TenantExpeditionService(ExpeditionService expeditionService)
 {
     this.ExpeditionService = expeditionService;
     this.IsActive          = true;
 }