protected void Save() { using (FaqHelper fh = new FaqHelper(SiteID)) { var itm = fh.FaqItemGetByID(ItemGuid); if (itm == null || ItemGuid == Guid.Empty) { ItemGuid = Guid.NewGuid(); itm = new carrot_FaqItem(); itm.FaqItemID = ItemGuid; itm.FaqCategoryID = CatGuid; } if (itm != null) { itm.Caption = txtCaption.Text; itm.Answer = reAnswer.Text; itm.Question = reQuestion.Text; itm.IsActive = chkActive.Checked; itm.ItemOrder = int.Parse(txtSort.Text); fh.Save(itm); ItemGuid = itm.FaqItemID; } } string filePath = CreateLink(ModuleName, string.Format("id={0}", ItemGuid)); Response.Redirect(filePath); }
protected void btnSave_Click(object sender, EventArgs e) { using (FaqHelper fh = new FaqHelper(SiteID)) { var fc = fh.CategoryGetByID(ItemGuid); if (fc == null || ItemGuid == Guid.Empty) { ItemGuid = Guid.NewGuid(); fc = new carrot_FaqCategory(); fc.SiteID = SiteID; fc.FaqCategoryID = ItemGuid; } fc.FAQTitle = txtFAQ.Text; fh.Save(fc); } string stringFile = CreateLink("CategoryList"); Response.Redirect(stringFile); }
protected void btnSave_Click(object sender, EventArgs e) { using (FaqHelper fh = new FaqHelper(SiteID)) { var fc = fh.CategoryGetByID(ItemGuid); if (fc == null || ItemGuid == Guid.Empty) { ItemGuid = Guid.NewGuid(); fc = new carrot_FaqCategory(); fc.SiteID = SiteID; fc.FaqCategoryID = ItemGuid; } fc.FAQTitle = txtFAQ.Text; fh.Save(fc); } string stringFile = CreateLink("CategoryList"); Response.Redirect(stringFile); }
protected void Save() { using (FaqHelper fh = new FaqHelper(SiteID)) { var itm = fh.FaqItemGetByID(ItemGuid); if (itm == null || ItemGuid == Guid.Empty) { ItemGuid = Guid.NewGuid(); itm = new carrot_FaqItem(); itm.FaqItemID = ItemGuid; itm.FaqCategoryID = CatGuid; } if (itm != null) { itm.Caption = txtCaption.Text; itm.Answer = reAnswer.Text; itm.Question = reQuestion.Text; itm.IsActive = chkActive.Checked; itm.ItemOrder = int.Parse(txtSort.Text); fh.Save(itm); ItemGuid = itm.FaqItemID; } } string filePath = CreateLink(ModuleName, string.Format("id={0}", ItemGuid)); Response.Redirect(filePath); }