Esempio n. 1
0
 private static void MapLineItems(
     Shipment shipmentDto,
     Mediachase.Commerce.Orders.Shipment shipment,
     OrderForm orderForm)
 {
     foreach (var lineItemDto in shipmentDto.LineItems)
     {
         var lineItem = CreateLineItem(orderForm, lineItemDto);
         lineItemDto.ConvertToLineItem(lineItem);
         shipment.LineItems.Add(lineItem);
     }
 }
Esempio n. 2
0
        public static void ConvertToShipment(
            this Shipment shipmentDto,
            Mediachase.Commerce.Orders.Shipment shipment,
            OrderForm orderForm)
        {
            shipment.Status                 = shipmentDto.Status;
            shipment.ShippingMethodId       = shipmentDto.ShippingMethodId;
            shipment.SubTotal               = shipmentDto.SubTotal;
            shipment.ShippingTax            = shipmentDto.ShippingTax;
            shipment.ShippingDiscountAmount = shipmentDto.ShippingDiscountAmount;
            shipment.ShipmentTrackingNumber = shipmentDto.ShipmentTrackingNumber;
            shipment.WarehouseCode          = shipmentDto.WarehouseCode;
            shipment.ShippingAddressId      = shipmentDto.ShippingAddressId;
            shipment.ShippingMethodName     = shipmentDto.ShippingMethodName;
            shipment.PrevStatus             = shipmentDto.PrevStatus;
            shipment.PickListId             = shipmentDto.PickListId;

            shipmentDto.MapPropertiesToModel(shipment);
            MapLineItems(shipmentDto, shipment, orderForm);
        }