Пример #1
0
    protected void ListCategoriesTreeNodeCreate(object sender, TreeNodeEventArgs e)
    {
        var node = e.Node;

        node.NavigateUrl = RedirectorBase.GetAbsoluteUrl(RedirectorAdmin.GetCategoryInfoPageUrl(int.Parse(node.Value)));
        node.Target      = "ContentFrame";
    }
Пример #2
0
 private void ShowCategory()
 {
     SetTitle(_category.CategoryID, _category.Name);
     buttonDelete.Visible   = true;
     buttonDelete.Text      = "Delete " + _category.Name + " Category";
     buttonUp.NavigateUrl   = RedirectorAdmin.GetCategoryInfoPageUrl(_category.ParentCategoryID ?? 0);
     buttonMove.NavigateUrl = RedirectorAdmin.GetCategoryMovePageUrl(_category.CategoryID);
 }
Пример #3
0
    /// <summary>
    /// Handles the Click event of the buttonGotoCategory control.
    /// </summary>
    /// <param name="sender">The source of the event.</param>
    /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
    protected void buttonGotoCategory_Click(object sender, EventArgs e)
    {
        string matcher = textBoxCategoryMatcher.Text.Trim();

        if (string.IsNullOrEmpty(matcher))
        {
            return;
        }
        int categoryId;

        if (!int.TryParse(matcher, out categoryId))
        {
            categoryId = FindCategory(matcher);
        }

        if (Identifier.IsValid(categoryId))
        {
            ShowContent(RedirectorAdmin.GetCategoryInfoPageUrl(categoryId));
        }
        else
        {
            ShowContent(RedirectorAdmin.GetSearchPageUrl(matcher));
        }
    }