public DocumentEntity GetNextDocument(ISAEntity isa, int docType, string bol) { var doc = new DocumentEntity { ISAEntity = isa, DocumentID = docType, ERPID = bol }; Save(doc); createAckRecord(doc); return doc; }
private void createAckRecord(DocumentEntity doc) { try { var ack = new ReceiptAcknowledgement(); ack.DocumentControlNumber = doc.ControlNumber; ack.DocumentType = doc.DocumentID; ack.DocumentSendDate = DateTime.Now; _ackRepo.SetPlaceholder(ack); } catch (Exception ex) { Logger.Error(this, "Could not create acknowledgement record for " + doc.ControlNumber + ".", ex); } }
public virtual void Add(DocumentEntity doc) { doc.ISAEntity = this; Documents.Add(doc); }