protected void SaveCat(object sender, ImageClickEventArgs e) { FaqCategoryInfo cat = SnitzFaq.GetCategory(fcTitle.Text) ?? new FaqCategoryInfo(); cat.Description = fcTitle.Text; cat.Order = Convert.ToInt32(fcOrder.Text); cat.Roles = fcRoles.Text; cat.Language = CultureInfo.CurrentCulture.TwoLetterISOLanguageName; if (cat.Id > 0) { SnitzFaq.UpdateFaqCategory(cat); } else { SnitzFaq.AddFaqCategory(cat); } //refresh the category cache Cache.Remove("faqcatlist"); Response.Redirect(this.Request.RawUrl); }
protected void AddNewCategory(object sender, EventArgs e) { FaqCategoryInfo cat = SnitzFaq.GetCategory(catDescription.Text) ?? new FaqCategoryInfo(); cat.Description = catDescription.Text; cat.Order = Convert.ToInt32(catOrder.Text); cat.Roles = catRole.Text; cat.Language = CultureInfo.CurrentCulture.TwoLetterISOLanguageName; if (cat.Id > 0) { SnitzFaq.UpdateFaqCategory(cat); } else { SnitzFaq.AddFaqCategory(cat); } SetDefaultView(); //refresh the category cache Cache.Remove("faqcatlist"); Response.Redirect(this.Request.RawUrl); }