public static void AssignValues( LogisticsItem source, LogisticsProductItem target) { target.ContractQuantity = source.ContractQuantity; target.ContractWeight = source.ContractWeight; target.FreightCharges = source.FreightCharges; target.Insurance = source.Insurance; target.ProductItemId = source.ProductItemId.GetValueOrDefault(); target.ReceivingQuantity = source.ReceivingQuantity; target.ReceivingTime = source.ReceivingTime; target.ReceivingWeight = source.ReceivingWeight; }
public MainlandLogisticsViewModel(MLLogis mllogis) { this.mllogis = mllogis; if (this.mllogis != null) { this.IsEnable = true; this.MainlandLogisticsCompanyId = mllogis.MainlandLogisticsCompanyId; this.LogisItems = new List <LogisticsItem>(); foreach (var i in mllogis.MainlandLogisticsItems) { LogisticsItem item = new LogisticsItem(i as LogisticsProductItem); this.LogisItems.Add(item); } } }
public HongkongLogisticsViewModel(YuShang.ERP.Entities.Orders.HKLogis hklogis) { this.hklogis = hklogis; if (this.hklogis != null) { this.IsEnable = true; this.HongKongLogisticsCompanyId = hklogis.HongKongLogisticsCompanyId; this.LogisItems = new List <LogisticsItem>(); foreach (var i in hklogis.HongKongLogisticsItems) { LogisticsItem item = new LogisticsItem(i as YuShang.ERP.Entities.Orders.LogisticsProductItem); this.LogisItems.Add(item); } } }
internal static void AssignValues(MainlandLogisticsViewModel source, MLLogis target) { target.MainlandLogisticsCompanyId = source.MainlandLogisticsCompanyId.GetValueOrDefault(); List <YuShang.ERP.Entities.Orders.MLLogisItem> items = new List <YuShang.ERP.Entities.Orders.MLLogisItem>(); if (source.LogisItems != null && source.LogisItems.Count > 0) { foreach (var it in source.LogisItems) { YuShang.ERP.Entities.Orders.MLLogisItem item = new YuShang.ERP.Entities.Orders.MLLogisItem(); LogisticsItem.AssignValues(it, item); items.Add(item); //items.Add(new LogisticsItem(it)); } } target.MainlandLogisticsItems = items; }