public static FancyTreeNode ToFancyTreeNode(this TaxonomyBranch taxonomyBranch, FirmaSession currentFirmaSession) { var fancyTreeNode = new FancyTreeNode($"{UrlTemplate.MakeHrefString(taxonomyBranch.GetDetailUrl(), taxonomyBranch.GetDisplayName())}", taxonomyBranch.TaxonomyBranchID.ToString(), false) { ThemeColor = string.IsNullOrWhiteSpace(taxonomyBranch.ThemeColor) ? taxonomyBranch.TaxonomyTrunk.ThemeColor : taxonomyBranch.ThemeColor, MapUrl = taxonomyBranch.GetCustomizedMapUrl(), Children = taxonomyBranch.TaxonomyLeafs.SortByOrderThenName().Select(x => x.ToFancyTreeNode(currentFirmaSession)).ToList() }; return(fancyTreeNode); }
public static FancyTreeNode ToFancyTreeNode(this TaxonomyLeaf taxonomyLeaf, FirmaSession currentFirmaSession) { var fancyTreeNode = new FancyTreeNode($"{UrlTemplate.MakeHrefString(taxonomyLeaf.GetDetailUrl(), taxonomyLeaf.GetDisplayName())}", taxonomyLeaf.TaxonomyLeafID.ToString(), false) { ThemeColor = String.IsNullOrWhiteSpace(taxonomyLeaf.ThemeColor) ? taxonomyLeaf.TaxonomyBranch.ThemeColor : taxonomyLeaf.ThemeColor, MapUrl = GetCustomizedMapUrl(taxonomyLeaf), Children = taxonomyLeaf.GetAssociatedProjects(currentFirmaSession).Select(x => x.ToFancyTreeNode(currentFirmaSession)).OrderBy(x => x.Title).ToList() }; return(fancyTreeNode); }
public FancyTreeNode ToFancyTreeNode() { var fancyTreeNode = new FancyTreeNode( $"{UrlTemplate.MakeHrefString(this.GetFactSheetUrl(), ProjectName, ProjectName)}", FancyTreeNodeKey.ToString(), false) { ThemeColor = ProjectType.TaxonomyBranch.TaxonomyTrunk.ThemeColor, MapUrl = null }; return(fancyTreeNode); }
public static FancyTreeNode ToFancyTreeNode(this TaxonomyTrunk taxonomyTrunk, FirmaSession currentFirmaSession) { var fancyTreeNode = new FancyTreeNode($"{UrlTemplate.MakeHrefString(taxonomyTrunk.GetDetailUrl(), taxonomyTrunk.GetDisplayName())}", taxonomyTrunk.TaxonomyTrunkID.ToString(), true) { ThemeColor = taxonomyTrunk.ThemeColor, MapUrl = taxonomyTrunk.GetCustomizedMapUrl(), Children = taxonomyTrunk.TaxonomyBranches.ToList().SortByOrderThenName().Select(x => x.ToFancyTreeNode(currentFirmaSession)) .ToList() }; return(fancyTreeNode); }