protected byte[] GetSubmittedDocumentList(out int rowCount)
        {
            SubmittedDocumentList list = GetSubmittedDocumentList();

            rowCount = list.SubmittedDocuments.Length;

            if (rowCount == 0)
            {
                AppendAuditLogEvent("Did not find any submitted documents");
            }
            else
            {
                AppendAuditLogEvent("Found {0} submitted documents", rowCount.ToString());
            }

            return(_serializationHelper.Serialize(list));
        }
        protected SubmittedDocumentList GetSubmittedDocumentList()
        {
            SubmittedDocumentList list = new SubmittedDocumentList();

            List <SubmittedDocument> documents = new List <SubmittedDocument>();

            string triFlowId = _flowManager.GetDataFlowIdByName("TRI");

            string queryString;

            object[] queryParams;

            if (_transactionStatus == CommonTransactionStatusCode.Unknown)
            {
                queryString = "FlowId;WebMethod;ModifiedOn >=";
                queryParams = new object[] { triFlowId, NodeMethod.Submit.ToString(), _submissionDate };
            }
            else
            {
                queryString = "FlowId;WebMethod;Status;ModifiedOn >=";
                queryParams = new object[] { triFlowId, NodeMethod.Submit.ToString(), _transactionStatus.ToString(), _submissionDate };
            }

            _baseDao.DoSimpleQueryWithRowCallbackDelegate(
                "NTransaction", queryString, queryParams,
                "ModifiedOn DESC", "Id;ModifiedOn",
                delegate(IDataReader reader)
            {
                SubmittedDocument doc = new SubmittedDocument();
                doc.TransactionID     = reader.GetString(0);
                doc.ReceivedDate      = reader.GetDateTime(1);
                documents.Add(doc);
            });

            TrimListToRequestSize(_dataRequest, documents);

            list.SubmittedDocuments = documents.ToArray();

            return(list);
        }