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 btnGoogleOK_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHLatex t = bh.GetCurrentVersionLatexText(CultureCode, ItemId, ItemType); if (t != null) { t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; t.ModifiedByUserId = UserId; bh.SaveLatexText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "translate=0", AttachQS)); } }
protected void btnSaveRRt_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHLatex latex = bh.GetCurrentVersionLatexText(this.CurrentLanguage, this.ComponentID, ELatexItemType.PluggComponentLatex); latex.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; latex.ModifiedByUserId = this.UserID; latex.Text = System.Net.WebUtility.HtmlDecode(txtRRtext.Text); bh.SaveLatexText(latex); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }