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);

 

posted on 2017-08-23 19:49  garfieldtom  阅读(322)  评论(0编辑  收藏  举报