Exemplo n.º 1
0
        public void FromDto(WishListItemDTO dto)
        {
            if (dto == null) return;

            this.Id = dto.Id;
            this.StoreId = dto.StoreId;
            this.CustomerId = dto.CustomerId;
            this.LastUpdatedUtc = dto.LastUpdatedUtc;
            this.ProductId = dto.ProductId ?? string.Empty;
            this.Quantity = dto.Quantity;
            this.SelectionData.Clear();
            if (dto.SelectionData != null)
            {
                foreach (OptionSelectionDTO op in dto.SelectionData)
                {
                    Catalog.OptionSelection o = new Catalog.OptionSelection();
                    o.FromDto(op);
                    this.SelectionData.Add(o);
                }
            }
        }
Exemplo n.º 2
0
        public void FromDto(WishListItemDTO dto)
        {
            if (dto == null)
            {
                return;
            }

            this.Id             = dto.Id;
            this.StoreId        = dto.StoreId;
            this.CustomerId     = dto.CustomerId;
            this.LastUpdatedUtc = dto.LastUpdatedUtc;
            this.ProductId      = dto.ProductId ?? string.Empty;
            this.Quantity       = dto.Quantity;
            this.SelectionData.Clear();
            if (dto.SelectionData != null)
            {
                foreach (OptionSelectionDTO op in dto.SelectionData)
                {
                    Catalog.OptionSelection o = new Catalog.OptionSelection();
                    o.FromDto(op);
                    this.SelectionData.Add(o);
                }
            }
        }
Exemplo n.º 3
0
        public void FromDto(LineItemDTO dto)
        {
            if (dto == null)
            {
                return;
            }

            this.Id               = dto.Id;
            this.StoreId          = dto.StoreId;
            this.LastUpdatedUtc   = dto.LastUpdatedUtc;
            this.BasePricePerItem = dto.BasePricePerItem;
            this.DiscountDetails.Clear();
            if (dto.DiscountDetails != null)
            {
                foreach (DiscountDetailDTO detail in dto.DiscountDetails)
                {
                    DiscountDetail d = new DiscountDetail();
                    d.FromDto(detail);
                    this.DiscountDetails.Add(d);
                }
            }
            this.OrderBvin               = dto.OrderBvin ?? string.Empty;
            this.ProductId               = dto.ProductId ?? string.Empty;
            this.VariantId               = dto.VariantId ?? string.Empty;
            this.ProductName             = dto.ProductName ?? string.Empty;
            this.ProductSku              = dto.ProductSku ?? string.Empty;
            this.ProductShortDescription = dto.ProductShortDescription ?? string.Empty;
            this.Quantity         = dto.Quantity;
            this.QuantityReturned = dto.QuantityReturned;
            this.QuantityShipped  = dto.QuantityShipped;
            this.ShippingPortion  = dto.ShippingPortion;
            this.StatusCode       = dto.StatusCode ?? string.Empty;
            this.StatusName       = dto.StatusName ?? string.Empty;
            this.TaxPortion       = dto.TaxPortion;
            this.SelectionData.Clear();
            if (dto.SelectionData != null)
            {
                foreach (OptionSelectionDTO op in dto.SelectionData)
                {
                    Catalog.OptionSelection o = new Catalog.OptionSelection();
                    o.FromDto(op);
                    this.SelectionData.Add(o);
                }
            }
            this.ShippingSchedule      = dto.ShippingSchedule;
            this.TaxSchedule           = dto.TaxSchedule;
            this.ProductShippingHeight = dto.ProductShippingHeight;
            this.ProductShippingLength = dto.ProductShippingLength;
            this.ProductShippingWeight = dto.ProductShippingWeight;
            this.ProductShippingWidth  = dto.ProductShippingWidth;
            this.CustomProperties.Clear();
            if (dto.CustomProperties != null)
            {
                foreach (CustomPropertyDTO cpd in dto.CustomProperties)
                {
                    CustomProperty prop = new CustomProperty();
                    prop.FromDto(cpd);
                    this.CustomProperties.Add(prop);
                }
            }
            this.ShipFromAddress.FromDto(dto.ShipFromAddress);
            this.ShipFromMode           = (Shipping.ShippingMode)((int)dto.ShipFromMode);
            this.ShipFromNotificationId = dto.ShipFromNotificationId ?? string.Empty;
            this.ShipSeparately         = dto.ShipSeparately;
            this.ExtraShipCharge        = dto.ExtraShipCharge;
        }