protected void btnDeleteLastConfirm_Click(object sender, EventArgs e) { var cc = new CategoryController(); var fc = new FAQController(); foreach (var c in cc.GetCategories(ModuleId)) { if (c.CategoryName == ddCategory.SelectedValue) { categoryId.Text = c.CategoryId.ToString(); } } cc.DeleteCategory(Convert.ToInt32(categoryId.Text.Trim()), ModuleId); foreach (var f in fc.GetFAQs(ModuleId)) { if (f.FaqCategory == ddCategory.SelectedValue) { fc.DeleteFAQ(f); } } lblSubTitle.Text = "Category Deleted! FAQ Entries Deleted!"; pnlPopUp.Visible = false; CategoryDropdownFill(cc); LoadNew(); }
protected void btnDelete_Click(object sender, EventArgs e) { var fc = new FAQController(); fc.DeleteFAQ(Convert.ToInt32(lblDeleteFaqId.Text.Trim()), ModuleId); pnlPopUp.Visible = false; LoadPage(); }
private void DeleteFAQ(int FAQid) { FAQController clt = new FAQController(); clt.DeleteFAQ(FAQid, GetPortalID, int.Parse(SageUserModuleID)); ShowMessage(SageMessageTitle.Information.ToString(), SageMessage.GetSageModuleLocalMessageByVertualPath("Modules/FAQ/ModuleLocalText", "DeleteSuccessfully"), "", SageMessageType.Success); LoadFAQList(); }