protected void btnSave_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText t = bh.GetCurrentVersionText(CultureCode, ItemId, ItemType); if (t == null) { t = new PHText(); t.CreatedByUserId = UserId; t.CultureCode = CultureCode; t.ItemId = ItemId; t.ItemType = ItemType; } t.Text = System.Net.WebUtility.HtmlDecode(hdnrichtext.Value); t.ModifiedByUserId = UserId; if (Case == EControlCase.Edit) { bh.SavePhTextInAllCc(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", AttachQS)); } else if (Case == EControlCase.Translate) { t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", AttachQS)); } }
protected void btnSave_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText t = bh.GetCurrentVersionText(CultureCode, ItemId, ItemType); if (t == null) { t = new PHText(); t.CreatedByUserId = UserId; t.CultureCode = CultureCode; t.ItemId = ItemId; t.ItemType = ItemType; } t.Text = Regex.Replace(tbTheText.Text, "<[^>]*>", String.Empty); if (ddlHeadingType.SelectedIndex > 0) { t.Text = "<h" + ddlHeadingType.SelectedIndex.ToString() + ">" + t.Text + "</h" + ddlHeadingType.SelectedIndex.ToString() + ">"; } t.ModifiedByUserId = UserId; if (Case == EControlCase.Edit) { bh.SavePhTextInAllCc(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", AttachQS)); } else if (Case == EControlCase.Translate) { t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", AttachQS)); } }
protected void btnGoogleOK_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText t = bh.GetCurrentVersionText(CultureCode, ItemId, ItemType); if (t != null) { t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; t.ModifiedByUserId = UserId; bh.SavePhText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", AttachQS)); } }
protected void btnSaveRt_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText phText = this.PHText; phText.Text = hdnrichtext.Value; phText.ModifiedByUserId = this.UserID; phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(phText); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }
protected void btnSaveRRt_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText objPHtext = this.PHText; //new PHText(System.Net.WebUtility.HtmlDecode(richrichtext.Text), this.CurrentLanguage, ETextItemType.PluggComponentRichRichText); objPHtext.Text = richrichtext.Text; objPHtext.ModifiedByUserId = this.UserID; objPHtext.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(objPHtext); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }
private void GoogleTranText(PHText txt) { BaseHandler bh = new BaseHandler(); txt.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(txt); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", new string[] { "edit=" + EditStr, "language=" + curlan })); }
private void UpdatePHtext(ETextItemType ItemType, string txt) { 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; PHText phText = bh.GetCurrentVersionText(curlan, itemid, ItemType); phText.Text = txt; phText.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; phText.CreatedByUserId = this.UserId; if (EditStr == "2") { phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(phText); } else bh.SavePhTextInAllCc(phText); // bh.SavePhText(phText); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", new string[] { "edit=" + EditStr, "language=" + curlan })); }
protected void btnSave_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText t = bh.GetCurrentVersionText(CultureCode, ItemId, ItemType); if (t == null) { t = new PHText(); t.CreatedByUserId = UserId; t.CultureCode = CultureCode; t.ItemId = ItemId; t.ItemType = ItemType; } t.Text = Regex.Replace(tbTheText.Text, "<[^>]*>", String.Empty); t.ModifiedByUserId = UserId; if (Case == EControlCase.Edit) { bh.SavePhTextInAllCc(t); if (ItemType == ETextItemType.PluggTitle) { string newPageName = ItemId.ToString() + ": " + t.Text; PluggContainer pc = new PluggContainer(CultureCode, ItemId); DNNHelper h = new DNNHelper(); h.RenameTab(pc.ThePlugg.TabId, newPageName); } if (ItemType == ETextItemType.CourseTitle) { string newPageName = "C" + ItemId.ToString() + ": " + t.Text; CourseContainer cc = new CourseContainer(CultureCode, ItemId); DNNHelper h = new DNNHelper(); h.RenameTab(cc.TheCourse.TabId, newPageName); } Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "edit=0", AttachQS)); } else if (Case == EControlCase.Translate) { t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(t); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", "translate=0", AttachQS)); } }
protected void btnSaveTranslation_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText t = bh.GetCurrentVersionText(Language, Convert.ToInt32(hdnNodeSubjectId.Value), ETextItemType.Subject); t.Text = tbNewTranslation.Text; t.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(t); tbNewTranslation.Text = ""; BindTree(); }
private void UpdatePHtext(ETextItemType ItemType, string txt) { BaseHandler bh = new BaseHandler(); PHText phText = bh.GetCurrentVersionText(curlan, cc.TheCourse.CourseId, ItemType); phText.Text = txt; phText.CreatedByUserId = this.UserId; phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(phText); }
protected void btnImpGTransT_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); ETextItemType ItemType = ETextItemType.CourseTitle; PHText phText = bh.GetCurrentVersionText(curlan, cc.TheCourse.CourseId, ItemType); phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(phText); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId, "", new string[] { "edit=" + EditStr, "language=" + curlan })); }
private void UpdatePHtext(ETextItemType ItemType, string txt) { var itemid = Convert.ToInt32(this.ComponentID); List<PluggComponent> comps = this.PluggContainer.GetComponentList(); PluggComponent cToAdd = comps.Find(x => x.PluggComponentId == itemid); BaseHandler bh = new BaseHandler(); var comtype = cToAdd.ComponentType; PHText phText = bh.GetCurrentVersionText(this.CurrentLanguage, itemid, ItemType); phText.Text = txt; phText.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; phText.CreatedByUserId = this.UserID; if (this.EditCase == 2) { phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; bh.SavePhText(phText); } else bh.SavePhTextInAllCc(phText); // bh.SavePhText(phText); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }