/// <summary>
        /// Overlay- Check ContentFile (i.e  same file as used during Append)
        /// </summary>
        /// <param name="collectionId"></param>
        /// <param name="documentId"></param>
        /// <returns></returns>
        private string GetExistingContentFile(string collectionId, string documentId)
        {
            string         contentFilePath = null;
            var            docVaultManager = new DocumentVaultManager();
            RVWDocumentBEO document;

            using (new EVTransactionScope(System.Transactions.TransactionScopeOption.Suppress))
            {
                document = docVaultManager.GetDocumentFileDetails(_datasetBEO.Matter.FolderID, new Guid(collectionId), documentId, 1, string.Empty);
            }
            if (document != null && document.DocumentBinary != null && document.DocumentBinary.FileList != null && document.DocumentBinary.FileList.Count > 0)
            {
                var contentFile         = document.DocumentBinary.FileList.Where(f => f.Type == Constants.ExtractedText_FILE_TYPE);
                var rvwExternalFileBeos = contentFile as RVWExternalFileBEO[] ?? contentFile.ToArray();
                if (rvwExternalFileBeos.FirstOrDefault() != null)
                {
                    contentFilePath = (!string.IsNullOrEmpty(rvwExternalFileBeos.First().Path) ? rvwExternalFileBeos.First().Path : string.Empty);
                }
            }
            return(contentFilePath);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Overlay- Check ContentFile (i.e  same file as used during Append)
        /// </summary>
        /// <param name="collectionId"></param>
        /// <param name="documentId"></param>
        /// <param name="textFilePath"></param>
        /// <param name="newTextFile"></param>
        /// <returns></returns>
        private string GetExistingContentFile(string collectionId, string documentId)
        {
            string contentFilePath = null;
            DocumentVaultManager docVaultManager = new DocumentVaultManager();
            var            collectionGUILD       = new Guid(collectionId);
            RVWDocumentBEO document = null;

            using (EVTransactionScope transScope = new EVTransactionScope(System.Transactions.TransactionScopeOption.Suppress))
            {
                document = docVaultManager.GetDocumentFileDetails(m_Dataset.Matter.FolderID, new Guid(collectionId), documentId, 1, string.Empty);
            }
            if (document != null && document.DocumentBinary != null && document.DocumentBinary.FileList != null && document.DocumentBinary.FileList.Count > 0)
            {
                var contentFile = document.DocumentBinary.FileList.Where(f => f.Type == Constants.ExtractedText_FILE_TYPE);
                if (contentFile != null && contentFile.FirstOrDefault() != null)
                {
                    contentFilePath = (!string.IsNullOrEmpty(contentFile.FirstOrDefault().Path) ? contentFile.FirstOrDefault().Path : string.Empty);
                }
            }
            return(contentFilePath);
        }
 /// <summary>
 /// Overlay- Check ContentFile (i.e  same file as used during Append)
 /// </summary>
 /// <param name="collectionId"></param>
 /// <param name="documentId"></param>
 /// <param name="textFilePath"></param>
 /// <param name="newTextFile"></param>
 /// <returns></returns>
 private string GetExistingContentFile(string collectionId, string documentId)
 {
     string contentFilePath = null;
     DocumentVaultManager docVaultManager = new DocumentVaultManager();
     var collectionGUILD = new Guid(collectionId);
     RVWDocumentBEO document = null;
     using (EVTransactionScope transScope = new EVTransactionScope(System.Transactions.TransactionScopeOption.Suppress))
     {
         document = docVaultManager.GetDocumentFileDetails(m_Dataset.Matter.FolderID, new Guid(collectionId), documentId, 1, string.Empty);
     }
     if (document != null && document.DocumentBinary != null && document.DocumentBinary.FileList != null && document.DocumentBinary.FileList.Count > 0)
     {
         var contentFile = document.DocumentBinary.FileList.Where(f => f.Type == Constants.ExtractedText_FILE_TYPE);
         if (contentFile != null && contentFile.FirstOrDefault() != null)
         {
             contentFilePath = (!string.IsNullOrEmpty(contentFile.FirstOrDefault().Path) ? contentFile.FirstOrDefault().Path : string.Empty);
         }
     }
     return contentFilePath;
 }