/// <summary> /// Checks the tag exists to include native. /// </summary> /// <param name="collectionId">The collection identifier.</param> /// <param name="documentId">The document identifier.</param> /// <param name="tagNameToIncludeNative">The tag name to include native.</param> /// <returns>boolean</returns> private bool CheckTagExistsToIncludeNative(string collectionId, string documentId, string tagNameToIncludeNative) { try { var tags = new List <RVWTagBEO>(); //Get document all tags for the document DocumentBO.GetDocumentTags(ref tags, matterId.ToString(CultureInfo.InvariantCulture), collectionId, documentId, false, false); //return true if selected tag exists in the tag list else return false. return(tags.Exists(f => f.TagDisplayName.Contains(tagNameToIncludeNative))); } catch (Exception ex) { ex.Trace().Swallow(); return(false); } }
/// <summary> /// Create separator between the documents /// </summary> /// <param name="path">path</param> /// <param name="matterId">matter id</param> /// <param name="collectionId">collection id</param> /// <param name="documentId">document id</param> public void CreateseparatorSheet(string path, string matterId, string collectionId, string documentId) { path.ShouldNotBeEmpty(); matterId.ShouldNotBeEmpty(); collectionId.ShouldNotBeEmpty(); documentId.ShouldNotBeEmpty(); var title = string.Empty; var author = string.Empty; var documentCtlNo = string.Empty; //Get title and Author of the document GetDocumentMetaData(matterId, collectionId, documentId, ref title, ref author, ref documentCtlNo); //Get Document level tag var tagList = new List <RVWTagBEO>(); DocumentBO.GetDocumentTags(ref tagList, matterId, collectionId, documentId, false); //Construct Separator sheet in the shared var sb = new StringBuilder(string.Empty); sb.Append(Constants.HtmlHeadForseparatorSheet); sb.Append(Constants.HtmlContentForDCN); sb.Append(documentCtlNo); sb.Append(Constants.HtmlContentForTitle); sb.Append(title); sb.Append(Constants.HtmlContentForAuthor); sb.Append(author); sb.Append(Constants.HtmlContentForTags); //Add tags to Html Content var alt = 0; tagList.ForEach(o => AddTags(sb, ref alt, o)); sb.Append(Constants.HtmlContentForEndOfseparatorSheet); var folderName = path.Substring(0, path.LastIndexOf("\\")); if (!Directory.Exists(folderName)) { Directory.CreateDirectory(folderName); } File.WriteAllText(path, sb.ToString(), Encoding.UTF8); }
private List <RVWDocumentTagBEO> GetDocumentTags(string documentId, out bool isError) { List <RVWDocumentTagBEO> tags = null; isError = false; try { var tagdetails = new List <RVWTagBEO>(); using (new EVTransactionScope(System.Transactions.TransactionScopeOption.Suppress)) { tags = DocumentBO.GetDocumentTags(ref tagdetails, matterId.ToString(CultureInfo.InvariantCulture), _dataset.CollectionId, documentId, false, false); } } catch (Exception ex) { ex.Trace().Swallow(); isError = true; } return(tags); }