/// <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 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)); }