本文整理汇总了C#中LineItem.FromDto方法的典型用法代码示例。如果您正苦于以下问题:C# LineItem.FromDto方法的具体用法?C# LineItem.FromDto怎么用?C# LineItem.FromDto使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LineItem
的用法示例。
在下文中一共展示了LineItem.FromDto方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FromDTO
public void FromDTO(OrderDTO dto)
{
if (dto == null) return;
this.AffiliateID = dto.AffiliateID ?? string.Empty;
this.BillingAddress.FromDto(dto.BillingAddress);
this.bvin = dto.Bvin ?? string.Empty;
this.Coupons.Clear();
if (dto.Coupons != null)
{
foreach (OrderCouponDTO c in dto.Coupons)
{
OrderCoupon cp = new OrderCoupon();
cp.FromDto(c);
this.Coupons.Add(cp);
}
}
this.CustomProperties.Clear();
if (dto.CustomProperties != null)
{
foreach (CustomPropertyDTO prop in dto.CustomProperties)
{
CustomProperty p = new CustomProperty();
p.FromDto(prop);
this.CustomProperties.Add(p);
}
}
this.FraudScore = dto.FraudScore;
this.Id = dto.Id;
this.Instructions = dto.Instructions ?? string.Empty;
this.IsPlaced = dto.IsPlaced;
this.Items.Clear();
if (dto.Items != null)
{
foreach (LineItemDTO li in dto.Items)
{
LineItem l = new LineItem();
l.FromDto(li);
this.Items.Add(l);
}
}
this.LastUpdatedUtc = dto.LastUpdatedUtc;
this.Notes.Clear();
if (dto.Notes != null)
{
foreach (OrderNoteDTO n in dto.Notes)
{
OrderNote nn = new OrderNote();
nn.FromDto(n);
this.Notes.Add(nn);
}
}
this.OrderDiscountDetails.Clear();
if (dto.OrderDiscountDetails != null)
{
foreach (DiscountDetailDTO d in dto.OrderDiscountDetails)
{
Marketing.DiscountDetail m = new Marketing.DiscountDetail();
m.FromDto(d);
this.OrderDiscountDetails.Add(m);
}
}
this.OrderNumber = dto.OrderNumber ?? string.Empty;
this.Packages.Clear();
if (dto.Packages != null)
{
foreach (OrderPackageDTO pak in dto.Packages)
{
OrderPackage pak2 = new OrderPackage();
pak2.FromDto(pak);
this.Packages.Add(pak2);
}
}
this.PaymentStatus = (OrderPaymentStatus)((int)dto.PaymentStatus);
this.ShippingAddress.FromDto(dto.ShippingAddress);
this.ShippingDiscountDetails.Clear();
if (dto.ShippingDiscountDetails != null)
{
foreach (DiscountDetailDTO sd in dto.ShippingDiscountDetails)
{
Marketing.DiscountDetail sdd = new Marketing.DiscountDetail();
sdd.FromDto(sd);
this.ShippingDiscountDetails.Add(sdd);
}
}
this.ShippingMethodDisplayName = dto.ShippingMethodDisplayName ?? string.Empty;
this.ShippingMethodId = dto.ShippingMethodId ?? string.Empty;
this.ShippingProviderId = dto.ShippingProviderId ?? string.Empty;
this.ShippingProviderServiceCode = dto.ShippingProviderServiceCode ?? string.Empty;
this.ShippingStatus = (OrderShippingStatus)((int)dto.ShippingStatus);
this.StatusCode = dto.StatusCode ?? string.Empty;
this.StatusName = dto.StatusName ?? string.Empty;
this.StoreId = dto.StoreId;
this.ThirdPartyOrderId = dto.ThirdPartyOrderId ?? string.Empty;
this.TimeOfOrderUtc = dto.TimeOfOrderUtc;
this.TotalHandling = dto.TotalHandling;
this.TotalShippingBeforeDiscounts = dto.TotalShippingBeforeDiscounts;
this.TotalTax = dto.TotalTax;
this.TotalTax2 = dto.TotalTax2;
this.UserEmail = dto.UserEmail ?? string.Empty;
//.........这里部分代码省略.........