unit pmdfeMDFe
//////////////////////////////
TSegCollectionItem = class(TCollectionItem)
private
FrespSeg: TRspSegMDFe;
FCNPJCPF: String;
FxSeg: String;
FCNPJ: String;
FnApol: String;
FAver: TAverCollection;
public
constructor Create; reintroduce;
destructor Destroy; override;
published
property respSeg: TRspSegMDFe read FrespSeg write FrespSeg;
property CNPJCPF: String read FCNPJCPF write FCNPJCPF;
property xSeg: String read FxSeg write FxSeg;
property CNPJ: String read FCNPJ write FCNPJ;
property nApol: String read FnApol write FnApol;
property aver: TAverCollection read FAver write FAver;
end;
TAverCollection = class(TCollection)
private
function GetItem(Index: Integer): TAverCollectionItem;
procedure SetItem(Index: Integer; Value: TAverCollectionItem);
public
constructor Create(AOwner: TSegCollectionItem);
function Add: TAverCollectionItem;
property Items[Index: Integer]: TAverCollectionItem read GetItem write SetItem; default;
end;
/////////////////////////
unit de passagem de parâmetros
estou passando assim
seg.Add(rsEmitente,CNPJ_CPF,ySeg,CNPJSeg,nApol_Seg,aver_Seg,'')