IExportDocumentManagerMarkAsReceived Method (IEnumerableInt32) |
Namespace: EdaIntegrationContract.Exports
void MarkAsReceived( IEnumerable<int> documentIds )
using EdaIntegrationContract; using EdaIntegrationContract.Case; using EdaIntegrationContract.Exports; class Sample { static void Main() { var edaIntegration = new EdaIntegration().ConnectToExplore(); // Get the export ICase edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); IExport export = edaCase.Exports.ByName("Export-001"); // Create a list to hold the ids of the documents that have been received/processed List<int> docsReceived = new List<int>(); // Set the number of documents to process before we update their received state const int batchSize = 10; // Retrieve the list of documents that were exported ExportDocumentManager mgr = export.Documents; // Loop through each document foreach (IExportDocument doc in mgr.All()) { Console.WriteLine("{0}: {1}", doc.ExportNumber, doc.FileName); // Accumulate the document ids so we can mark them as received. docsReceived.Add(doc.InventoryId); if (docsReceived.Count >= batchSize) { // Mark items as received mgr.MarkAsReceived(docsReceived); // Clear the received list docsReceived.Clear(); } } } } /* This example produces the following results: 00001160: Unprofitable actions.msg 00001155: Four Attributes.msg 00002241: Technology outlook.pdf 00001163: Load Forecasting Technology.msg 00002240: Book1.xlsx 00001159: Monthly data.msg 00001170: Viewpoint from above.msg 00001168: Scope.docx 00001166: Key Stats YTD 2011.xlsx 00001167: Forecast 2012.pptx */