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 })); }
protected void btnSaveRRt_Click(object sender, EventArgs e) { 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; //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), this.CurrentLanguage, ETextItemType.PluggComponentRichRichText); objPHtext.CultureCodeStatus = ECultureCodeStatus.GoogleTranslated; objPHtext.ItemId = itemid; objPHtext.CreatedByUserId = this.UserID; if (EditCase == 2) { objPHtext.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; } bh.SavePhTextInAllCc(objPHtext); Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(this.TabID, "", new string[] { "edit=1", "language=" + this.CurrentLanguage })); }
protected void btnLabelSave_Click(object sender, EventArgs e) { BaseHandler bh = new BaseHandler(); PHText phText = this.PHText; phText.Text = txtlabel.Text; phText.CultureCodeStatus = ECultureCodeStatus.HumanTranslated; phText.ModifiedByUserId = this.UserID; 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 })); }
protected void btnOk_Click(object sender, EventArgs e) { try { if (txtTitle.Text.Trim() == "") { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Err", "alert('Please enter title !')", true); return; } BaseHandler bh = new BaseHandler(); List <object> cmpData = new List <object>(); PluggContainer pc = new PluggContainer(new Localization().CurrentCulture); //pc.ThePlugg.CreatedByUserId = this.UserId; //pc.ThePlugg.ModifiedByUserId = this.UserId; pc.ThePlugg.PluggId = 0; pc.SetTitle(txtTitle.Text); //pc.SetDescription(txtDescription.Text); PHText RichRichText = new PHText(); RichRichText.ItemType = ETextItemType.PluggComponentRichRichText; cmpData.Add(RichRichText); Plugghest.Base2.YouTube objYouTube = new Plugghest.Base2.YouTube(); cmpData.Add(objYouTube); bh.SavePlugg(pc, cmpData); txtTitle.Text = ""; Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Success", "alert('New Plugg is created successfully')", true); } catch (Exception ex) { Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "Error", "alert('Error : " + ex.Message + "')", true); } }