public static ComboTreeNode ToComboTreeNode(this TaxonomyLeaf taxonomyLeaf) { var key = $"{TaxonomyLevel.Leaf.TaxonomyLevelID}-{taxonomyLeaf.TaxonomyLeafID}"; var comboTreeNode = new ComboTreeNode(taxonomyLeaf.GetDisplayName(), key); return(comboTreeNode); }
public MatchmakerTaxonomyTier(TaxonomyLeaf taxonomyLeaf) { TaxonomyTierID = taxonomyLeaf.TaxonomyLeafID; DisplayName = taxonomyLeaf.GetDisplayName(); SortOrder = taxonomyLeaf.TaxonomyLeafSortOrder; Children = null; TaxonomyLevel = TaxonomyLevelEnum.Leaf; TaxonomyLeaf = taxonomyLeaf; TaxonomyBranch = null; TaxonomyTrunk = null; MaximumChildrenCount = 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; }
private PartialViewResult ViewDeleteTaxonomyLeaf(TaxonomyLeaf taxonomyLeaf, ConfirmDialogFormViewModel viewModel) { var canDelete = !taxonomyLeaf.HasDependentObjects() && HttpRequestStorage.DatabaseEntities.TaxonomyLeafs.Count() > 1; var taxonomyLeafDisplayName = FieldDefinitionEnum.TaxonomyLeaf.ToType().GetFieldDefinitionLabel(); var confirmMessage = canDelete ? string.Format("Are you sure you want to delete this {0} '{1}'?", taxonomyLeafDisplayName, taxonomyLeaf.GetDisplayName()) : ConfirmDialogFormViewData.GetStandardCannotDeleteMessage(taxonomyLeafDisplayName, SitkaRoute <TaxonomyLeafController> .BuildLinkFromExpression(x => x.Detail(taxonomyLeaf), "here")); var viewData = new ConfirmDialogFormViewData(confirmMessage, canDelete); return(RazorPartialView <ConfirmDialogForm, ConfirmDialogFormViewData, ConfirmDialogFormViewModel>(viewData, viewModel)); }
public static HtmlString GetDisplayNameAsUrl(this TaxonomyLeaf taxonomyLeaf) { return(UrlTemplate.MakeHrefString(taxonomyLeaf.GetDetailUrl(), taxonomyLeaf.GetDisplayName())); }
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 TaxonomyTierSimple(TaxonomyLeaf taxonomyLeaf) : this() { TaxonomyTierID = taxonomyLeaf.TaxonomyLeafID; DisplayName = taxonomyLeaf.GetDisplayName(); ParentTaxonomyID = taxonomyLeaf.TaxonomyBranchID; }