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);
        }
예제 #2
0
 public TaxonomyTier(TaxonomyLeaf taxonomyLeaf)
 {
     TaxonomyTierID   = taxonomyLeaf.TaxonomyLeafID;
     ThemeColor       = taxonomyLeaf.ThemeColor;
     DisplayName      = taxonomyLeaf.GetDisplayName();
     DisplayNameAsUrl = taxonomyLeaf.GetDisplayNameAsUrl();
     DetailUrl        = taxonomyLeaf.GetDetailUrl();
     TaxonomyTierPerformanceMeasures = taxonomyLeaf.GetTaxonomyTierPerformanceMeasures();
     SortOrder      = taxonomyLeaf.TaxonomyLeafSortOrder;
     TaxonomyLevel  = TaxonomyLevelEnum.Leaf;
     TaxonomyLeaf   = taxonomyLeaf;
     TaxonomyBranch = null;
     TaxonomyTrunk  = null;
 }
예제 #3
0
        public string GetDisplayNameAsDetailUrl()
        {
            switch (TaxonomyLevel)
            {
            case TaxonomyLevelEnum.Trunk:
                return($"{UrlTemplate.MakeHrefString(TaxonomyTrunk.GetDetailUrl(), GetDisplayName())}");

            case TaxonomyLevelEnum.Branch:
                return($"{UrlTemplate.MakeHrefString(TaxonomyBranch.GetDetailUrl(), GetDisplayName())}");

            case TaxonomyLevelEnum.Leaf:
                return($"{UrlTemplate.MakeHrefString(TaxonomyLeaf.GetDetailUrl(), GetDisplayName())}");

            default:
                return(string.Empty);
            }
        }
 public static HtmlString GetDisplayNameAsUrl(this TaxonomyLeaf taxonomyLeaf)
 {
     return(UrlTemplate.MakeHrefString(taxonomyLeaf.GetDetailUrl(), taxonomyLeaf.GetDisplayName()));
 }