Exemplo n.º 1
0
 internal static void AssignValues(MLLogis source,
                                   MainlandLogisticsViewModel target)
 {
     target.MainlandLogisticsCompanyId = source.MainlandLogisticsCompanyId;
     target.MLLogisCompany             = new MLLogisCompanyViewModel(source.MLLogisCompany);
     target.LogisItems = new List <LogisticsItem>();
     if (source.MainlandLogisticsItems != null && source.MainlandLogisticsItems.Count > 0)
     {
         foreach (var it in source.MainlandLogisticsItems)
         {
             target.LogisItems.Add(new LogisticsItem(it));
         }
     }
 }
Exemplo n.º 2
0
        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;
        }