DocumentManagerByInventoryId Method (Int32) |
Namespace: Law.EdaIntegration.Document
public IDocument ByInventoryId( int inventoryId )
[Missing <param name="inventoryId"/> documentation for "M:Law.EdaIntegration.Document.DocumentManager.ByInventoryId(System.Int32)"]
Exception | Condition |
---|---|
EdaApiException | Thrown if a document cannot be found with the specified Id |
using Law.EdaIntegration; using Law.EdaIntegration.Case; using Law.EdaIntegration.Document; class Sample { public static void Main() { string connectionString = @"Data Source=localhost;Initial Catalog=EDA_Management;Integrated Security=False;User ID=myUserId;Password=myPassword"; EdaIntegration edaIntegration = new EdaIntegration(); edaIntegration.InitializeEnvironment(connectionString); Case edaCase = edaIntegration.Cases.OpenCaseByName("Case 1"); IDocument doc = edaCase.Documents.ById(15); Console.WriteLine("Id: {0}", doc.Id); if (doc.DocumentType == DocumentType.EDocument) { Console.WriteLine("File Name: {0}", doc.FileName); } else if (doc.DocumentType == DocumentType.Email) { Console.WriteLine("Subject: {0}", doc.EmailMetadata.Subject); } } } /* This example produces the following results: Id: 15 Name: lorem_pw.docx */