protected void ListCategoriesTreeNodeCreate(object sender, TreeNodeEventArgs e) { var node = e.Node; node.NavigateUrl = RedirectorBase.GetAbsoluteUrl(RedirectorAdmin.GetCategoryInfoPageUrl(int.Parse(node.Value))); node.Target = "ContentFrame"; }
/// <summary> /// Handles the Load event of the Page 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 Page_Load(object sender, EventArgs e) { try { if (pageNotExists) { RedirectorAdmin.GoToDefaultPage(); return; } BackLink.NavigateUrl = Request.Url.ToString(); if (exception == null) { return; } if (AppSettings.ShowExceptions) { RealExceptionPanel.Visible = true; ExceptionTextBox.Text = exception.ToString(); // Message.Text = GetErrorMessage(); MultiView1.ActiveViewIndex = 0; } else { MultiView1.ActiveViewIndex = 1; } } catch (Exception ex) { Log.Site.Fatal("Error show Exception: ", ex); } }
/// <summary> /// Handles the Load event of the Page 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 Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } if (!Identifier.IsValid(RequestIntId)) { RedirectorAdmin.GoToDefaultPage(); return; } Knowledge knowledge = manager.GetByID(RequestIntId.Value); if (knowledge == null) { RedirectorAdmin.GoToDefaultPage(); return; } if (!knowledge.CanView) { GoToPreviousPage(); return; } buttonEdit.Visible = knowledge.CanEdit; viewKnowledge.Knowledge = knowledge; }
/// <summary> /// Handles the Load event of the Page 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 Page_Load(object sender, EventArgs e) { if (!KbContext.CurrentKb.HasUserAdminPermission) { RedirectorAdmin.GoToUserEditPage(KbContext.CurrentUserId); return; } }
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); }
/// <summary> /// Handles the Load event of the Page 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 Page_Load(object sender, EventArgs e) { if (IsPostBack) { return; } buttonEditUser.Text = KbContext.CurrentKb.GetCurrentUser().Login; buttonEditUser.NavigateUrl = RedirectorAdmin.GetUserEditPageUrl(KbContext.CurrentUserId); buttonEditUser.Target = PageFrameset.ContentFrameName; }
/// <summary> /// Handles the Click event of the buttonDelete 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 buttonDelete_Click(object sender, EventArgs e) { _category = KbContext.CurrentKb.ManagerCategory.GetByID(_categoryId); if (_category == null) { RedirectorAdmin.GoToRootCategoryInfoPage(); return; } KbContext.CurrentKb.ManagerCategory.Delete(_category); RedirectorAdmin.GoToCategoryInfoPage(_category.ParentCategoryID ?? 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)); } }
/// <summary> /// Handles the Click event of the buttonAdd 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 ButtonAddClick(object sender, EventArgs e) { RedirectorAdmin.GoToCategoryAddPage(_categoryId); }
/// <summary> /// Handles the OnClick event of the buttonAddKnowledge 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 buttonAddKnowledge_OnClick(object sender, EventArgs e) { RedirectorAdmin.GoToKnowledgeAddPage(_categoryId); }
/// <summary> /// Handles the Click event of the buttonEditKnowledge 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 buttonEditKnowledge_Click(object sender, EventArgs e) { RedirectorAdmin.GoToKnowledgeEditPage(gridKnowledges.GetIntDataKey((Control)sender)); }
/// <summary> /// Handles the Click event of the buttonEdit 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 buttonEdit_Click(object sender, EventArgs e) { RedirectorAdmin.GoToCategoryEditPage(gridSubCategories.GetIntDataKey((Control)sender)); }
/// <summary> /// Handles the OnClick event of the buttonEdit 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 buttonEdit_OnClick(object sender, EventArgs e) { RedirectorAdmin.GoToKnowledgeEditPage(RequestIntId.Value); }
/// <summary> /// Handles the Click event of the ViewButton1 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 ButtonViewCategory_Click(object sender, EventArgs e) { RedirectorAdmin.GoToCategoryInfoPage(gridSubCategories.GetIntDataKey((Control)sender)); }
/// <summary> /// Handles the Click event of the buttonAddUser 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 ButtonAddUserClick(object sender, EventArgs e) { RedirectorAdmin.GoToUserAddPage(); }
/// <summary> /// Handles the Click event of the buttonRights 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 ButtonRightsClick(object sender, EventArgs e) { RedirectorAdmin.GoToUserRightsPage(gridUsers.GetIntDataKey((Control)sender)); }
/// <summary> /// Handles the Click event of the buttonEdit 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 ButtonEditClick(object sender, EventArgs e) { RedirectorAdmin.GoToKeywordEditPage(griKeywords.GetIntDataKey((Control)sender)); }
/// <summary> /// Handles the Click event of the buttonAddKeyword 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 ButtonAddKeywordClick(object sender, EventArgs e) { RedirectorAdmin.GoToKeywordAddPage(); }