コード例 #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));
         }
     }
 }
コード例 #2
0
 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);
         }
     }
 }
コード例 #3
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;
        }