码迷,mamicode.com
首页 > 其他好文 > 详细

SuperObject生成示例

时间:2017-08-23 20:48:53      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:live   int   bsp   custom   add   oms   material   rod   nes   

var
  jo,jEntity,jSubEntity: ISuperObject;
  jaOrder,jaEntity,jaSubEntity: ISuperObject;
  i,j,entityCount,subEntityCount: Integer;
begin

  entityCount:=2;
  subEntityCount:=3;

  jo := SO();
  jaEntity := SA([]);
  jaOrder :=SA([]);

  jo.S[FSampleType]:=‘‘;
  jo.S[FDate]:=‘‘;
  jo.S[FOrderNumber]:=‘‘;
  jo.S[FDeliverDate]:=‘‘;
  jo.S[FOrderTypeId]:=‘‘;
  jo.S[FSalePerson]:=‘‘;

  for I := 0 to entityCount-1 do
  begin
    jEntity := SO();
    jEntity.S[FProductId]:=IntToStr(i);
    jEntity.S[FFreeStyle]:=‘‘;
    jEntity.S[FOrderLB]:=‘‘;
    jEntity.S[FClothseSerialId]:=‘‘;
    jEntity.S[FProductUnitID]:=‘‘;
    jEntity.S[FMLMaterialID]:=‘‘;
    jEntity.S[FAuxPropId]:=‘‘;
    jEntity.S[FCustomStyle]:=‘‘;
    jEntity.S[FBrand]:=‘‘;
    jEntity.S[FRefOEMStyle]:=‘‘;
    jEntity.S[FSendSampleQty]:=‘‘;
    jEntity.S[FLeftSampleQty]:=‘‘;
    jEntity.S[FTestQty]:=‘‘;
    jEntity.S[FPreProductQty]:=‘‘;
    jEntity.S[FSpecialArtType]:=‘‘;
    jEntity.S[FWashingType]:=‘‘;

    jaSubEntity := SA([]);
    for j := 0 to subEntityCount-1 do
    begin
      jSubEntity := SO();
      jSubEntity.S[FCMaterial]:=IntToStr(j);
      jSubEntity.S[FCNumerator]:=‘‘;
      jSubEntity.S[FCUnitID]:=‘‘;

      jaSubEntity.AsArray.Add(jSubEntity);
    end;

    jEntity.O[FSubEntity]:=jaSubEntity;

    jaEntity.AsArray.Add(jEntity);
  end;

  jo.O[FEntity]:=jaEntity;

  jaOrder.AsArray.Add(jo);
  //memContent.Lines.add(jo.AsString);
  memContent.Lines.add(jaOrder.AsString);

 

SuperObject生成示例

标签:live   int   bsp   custom   add   oms   material   rod   nes   

原文地址:http://www.cnblogs.com/GarfieldTom/p/7419849.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!