public SegmentBatch(IParsingErrorRepo errorRepo, Type identityType)
        {
            this.identityType             = identityType;
            this.defaultIdentityTypeValue = identityType.GetDefaultValue();
            this.errorRepo    = errorRepo;
            this.ParsedTables = new Dictionary <string, DataTable>();

            this.SegmentTable = new DataTable();
            this.SegmentTable.Columns.Add("InterchangeId", identityType);
            this.SegmentTable.Columns.Add("PositionInInterchange", typeof(int));
            this.SegmentTable.Columns.Add("RevisionId", typeof(int));
            this.SegmentTable.Columns.Add("FunctionalGroupId", identityType);
            this.SegmentTable.Columns.Add("TransactionSetId", identityType);
            this.SegmentTable.Columns.Add("ParentLoopId", identityType);
            this.SegmentTable.Columns.Add("LoopId", identityType);
            this.SegmentTable.Columns.Add("Deleted", typeof(bool));
            this.SegmentTable.Columns.Add("SegmentId", typeof(string));
            this.SegmentTable.Columns.Add("Segment", typeof(string));

            this.LoopTable = new DataTable();
            this.LoopTable.Columns.Add("Id", identityType);
            this.LoopTable.Columns.Add("ParentLoopId", identityType);
            this.LoopTable.Columns.Add("InterchangeId", identityType);
            this.LoopTable.Columns.Add("TransactionSetId", identityType);
            this.LoopTable.Columns.Add("TransactionSetCode", typeof(string));
            this.LoopTable.Columns.Add("SpecLoopId", typeof(string));
            this.LoopTable.Columns.Add("StartingSegmentId", typeof(string));
            this.LoopTable.Columns.Add("EntityIdentifierCode", typeof(string));
        }
Exemplo n.º 2
0
        public SegmentBatch(IParsingErrorRepo <T> errorRepo)
        {
            _errorRepo    = errorRepo;
            _parsedTables = new Dictionary <string, DataTable>();

            _segmentTable = new DataTable();
            _segmentTable.Columns.Add("InterchangeId", typeof(T));
            _segmentTable.Columns.Add("PositionInInterchange", typeof(int));
            _segmentTable.Columns.Add("RevisionId", typeof(int));
            _segmentTable.Columns.Add("FunctionalGroupId", typeof(T));
            _segmentTable.Columns.Add("TransactionSetId", typeof(T));
            _segmentTable.Columns.Add("ParentLoopId", typeof(T));
            _segmentTable.Columns.Add("LoopId", typeof(T));
            _segmentTable.Columns.Add("Deleted", typeof(bool));
            _segmentTable.Columns.Add("SegmentId", typeof(string));
            _segmentTable.Columns.Add("Segment", typeof(string));

            _loopTable = new DataTable();
            _loopTable.Columns.Add("Id", typeof(T));
            _loopTable.Columns.Add("ParentLoopId", typeof(T));
            _loopTable.Columns.Add("InterchangeId", typeof(T));
            _loopTable.Columns.Add("TransactionSetId", typeof(T));
            _loopTable.Columns.Add("TransactionSetCode", typeof(string));
            _loopTable.Columns.Add("SpecLoopId", typeof(string));
            _loopTable.Columns.Add("StartingSegmentId", typeof(string));
            _loopTable.Columns.Add("EntityIdentifierCode", typeof(string));
        }