private IEdiMessage getMessageFrom(DocContainer docContainer, BusinessPartner partner)
 {
     var parser = docContainer.ParserFor(partner);
     var package = parser.ProcessSegmentList(docContainer.InnerSegments.ToList());
     var docDto = create_document_entity(docContainer);
     add_value(docDto, package.ResponseValues);
     add_lines(docDto, package.Lines);
     _docsRepo.Save(docDto);
     return package.Message;
 }
 private DocumentInDTO create_document_entity(DocContainer document)
 {
     var group = document.ParentGroup;
     return new DocumentInDTO()
                {
                    DocumentID = document.DocType.CastToInt(),
                    ControlNumber = document.ControlNumber,
                    ISAControlNumber = group.ControlNumber.CastToInt(),
                    DateSent = group.DateSent,
                    PartnerNumber = BusinessPartner.FedEx.Number,
                    GroupID = group.GroupId
                };
 }
 public IEdiInContainer CreateChild(EdiSegmentCollection segs)
 {
     var child = new DocContainer(segs, this);
     _documents.Add(child);
     return child;
 }