Exemplo n.º 1
0
        public virtual ShipmentPackage ToShipmentPackage(orderDto.ShipmentPackage shipmentPackageDto, IEnumerable <Currency> currencies, Language language)
        {
            var webModel = new ShipmentPackage();

            webModel.InjectFrom <NullableAndEnumValueInjecter>(shipmentPackageDto);

            if (shipmentPackageDto.Items != null)
            {
                webModel.Items = shipmentPackageDto.Items.Select(i => ToShipmentItem(i, currencies, language)).ToList();
            }

            return(webModel);
        }
Exemplo n.º 2
0
        public virtual ShipmentPackage ToShipmentPackage(orderDto.ShipmentPackage shipmentPackageDto, IEnumerable <Currency> currencies, Language language)
        {
            var webModel = ServiceLocator.Current.GetInstance <OrderFactory>().CreateShipmentPackage();

            webModel.InjectFrom <NullableAndEnumValueInjecter>(shipmentPackageDto);

            if (shipmentPackageDto.Items != null)
            {
                webModel.Items = shipmentPackageDto.Items.Select(i => ToShipmentItem(i, currencies, language)).ToList();
            }

            return(webModel);
        }
Exemplo n.º 3
0
        public virtual ShipmentPackage ToShipmentPackage(orderDto.ShipmentPackage shipmentPackageDto, IEnumerable <Currency> currencies, Language language)
        {
            var result = new ShipmentPackage();

            result.BarCode = shipmentPackageDto.BarCode;
            result.Id      = shipmentPackageDto.Id;

            result.Height      = shipmentPackageDto.Height;
            result.Weight      = shipmentPackageDto.Weight;
            result.Length      = shipmentPackageDto.Length;
            result.Width       = shipmentPackageDto.Width;
            result.WeightUnit  = shipmentPackageDto.WeightUnit;
            result.MeasureUnit = shipmentPackageDto.MeasureUnit;

            if (shipmentPackageDto.Items != null)
            {
                result.Items = shipmentPackageDto.Items.Select(i => ToShipmentItem(i, currencies, language)).ToList();
            }

            return(result);
        }
Exemplo n.º 4
0
        public static ShipmentPackage ToShipmentPackage(this orderDto.ShipmentPackage shipmentPackageDto, IEnumerable <Currency> currencies, Language language)
        {
            var result = new ShipmentPackage
            {
                BarCode = shipmentPackageDto.BarCode,
                Id      = shipmentPackageDto.Id,

                Height      = shipmentPackageDto.Height,
                Weight      = shipmentPackageDto.Weight,
                Length      = shipmentPackageDto.Length,
                Width       = shipmentPackageDto.Width,
                WeightUnit  = shipmentPackageDto.WeightUnit,
                MeasureUnit = shipmentPackageDto.MeasureUnit
            };

            if (shipmentPackageDto.Items != null)
            {
                result.Items = shipmentPackageDto.Items.Select(i => ToShipmentItem(i, currencies, language)).ToList();
            }

            return(result);
        }
Exemplo n.º 5
0
 public static ShipmentPackage ToShipmentPackage(this orderDto.ShipmentPackage shipmentPackageDto, IEnumerable <Currency> currencies, Language language)
 {
     return(OrderConverterInstance.ToShipmentPackage(shipmentPackageDto, currencies, language));
 }