protected void btnSave_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHLatex t = bh.GetCurrentVersionLatexText(CultureCode, ItemId, ItemType); if (t == null) { t = new PHLatex(); t.CreatedByUserId = UserId; t.CultureCode = CultureCode; t.ItemId = ItemId; t.ItemType = ItemType; } t.ModifiedByUserId = UserId; if (Case == EControlCase.Edit) { t.Text = tbEnterLatex.Text; t.HtmlText = ""; bh.SaveLatexTextInAllCc(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "edit=0", AttachQS)); } else if (Case == EControlCase.Translate) { PHLatex translatedFrom = bh.GetCurrentVersionLatexText(CreatedInCultureCode, ItemId, ItemType); if (translatedFrom != null) { t.Text = translatedFrom.Text; t.HtmlText = System.Net.WebUtility.HtmlDecode(teTranslate.Text); t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SaveLatexText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "translate=0", AttachQS)); } } }
protected void btnSaveRRt_Click(object sender, EventArgs e) { List<PluggComponent> comps = this.PluggContainer.GetComponentList(); PluggComponent cToAdd = comps.Find(x => x.PluggComponentId == this.ComponentID); BaseHandler bh = new BaseHandler(); var comtype = cToAdd.ComponentType; PHLatex latex = bh.GetCurrentVersionLatexText(this.CurrentLanguage, this.ComponentID, ELatexItemType.PluggComponentLatex); latex.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; latex.ItemId = this.ComponentID; latex.CreatedByUserId = this.UserID; latex.Text = System.Net.WebUtility.HtmlDecode(richrichtext.Text); //bh.SaveLatexText(latex); bh.SaveLatexTextInAllCc(latex); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }
protected void btnSaveRRt_Click(object sender, EventArgs e) { var id = hdnlabel.Value; var itemid = Convert.ToInt32(id); List<PluggComponent> comps = p.GetComponentList(); PluggComponent cToAdd = comps.Find(x => x.PluggComponentId == Convert.ToInt32(id)); BaseHandler bh = new BaseHandler(); var comtype = cToAdd.ComponentType; switch (cToAdd.ComponentType) { case EComponentType.RichRichText: //PHText RichRichText = bh.GetCurrentVersionText(curlan, itemid, ETextItemType.PluggComponentRichRichText); //RichRichText.Text = richrichtext.Text; PHText objPHtext = new PHText(System.Net.WebUtility.HtmlDecode(richrichtext.Text), curlan, ETextItemType.PluggComponentRichRichText); objPHtext.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; objPHtext.ItemId = itemid; objPHtext.CreatedByUserId = this.UserId; if (EditStr == "2") objPHtext.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhTextInAllCc(objPHtext); break; case EComponentType.Latex: PHLatex latex = bh.GetCurrentVersionLatexText(curlan, Convert.ToInt32(id), ELatexItemType.PluggComponentLatex); latex.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; latex.ItemId = itemid; latex.CreatedByUserId = this.UserId; latex.Text = System.Net.WebUtility.HtmlDecode(richrichtext.Text); //bh.SaveLatexText(latex); bh.SaveLatexTextInAllCc(latex); break; } Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", new string[] { "edit=" + EditStr, "language=" + curlan })); }