protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refCommon.EkMsgRef; AppImgPath = m_refCommon.AppImgPath; m_strPageAction = Request.QueryString["action"]; //object refCommon = m_refCommon as object; Utilities.SetLanguage(m_refCommon); TaxonomyLanguage = m_refCommon.ContentLanguage; TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); if ((Request.QueryString["view"] != null)) { m_strViewItem = Request.QueryString["view"]; } taxonomy_request = new TaxonomyRequest(); taxonomy_request.TaxonomyId = TaxonomyId; taxonomy_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent = m_refCommon.EkContentRef; if ((Page.IsPostBack)) { if ((Request.Form["submittedaction"] == "delete")) { m_refContent.DeleteTaxonomy(taxonomy_request); Response.Write("<script type=\"text/javascript\">parent.CloseChildPage();</script>"); } else if ((Request.Form["submittedaction"] == "deleteitem")) { if ((m_strViewItem != "folder")) { taxonomy_request.TaxonomyIdList = Request.Form["selected_items"]; if ((m_strViewItem.ToLower() == "cgroup")) { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Group; } else if ((m_strViewItem.ToLower() == "user")) { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.User; } else { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Content; } m_refContent.RemoveTaxonomyItem(taxonomy_request); } else { TaxonomySyncRequest tax_folder = new TaxonomySyncRequest(); tax_folder.TaxonomyId = TaxonomyId; tax_folder.TaxonomyLanguage = TaxonomyLanguage; tax_folder.SyncIdList = Request.Form["selected_items"]; m_refContent.RemoveTaxonomyFolder(tax_folder); } if ((Request.Params["ccp"] == null)) { Response.Redirect("LocaleTaxonomy.aspx?" + Request.ServerVariables["query_string"] + "&ccp=true", true); } else { Response.Redirect("LocaleTaxonomy.aspx?" + Request.ServerVariables["query_string"], true); } } } else if ((IsPostBack == false)) { DisplayPage(); } }
protected void Page_Load(object sender, System.EventArgs e) { m_refMsg = m_refCommon.EkMsgRef; AppImgPath = m_refCommon.AppImgPath; m_strPageAction = Request.QueryString["action"]; object refAPI = m_refCommon as object; Utilities.SetLanguage(m_refCommon); //Utilities.SetLanguage(m_refCommon); TaxonomyLanguage = m_refCommon.ContentLanguage; TaxonomyId = Convert.ToInt64(Request.QueryString["taxonomyid"]); if (Request.QueryString["view"] != null) { m_strViewItem = AntiXss.HtmlEncode(Request.QueryString["view"]); } PageLabel.Text = PageLabel.ToolTip = m_refMsg.GetMessage("lbl pagecontrol page"); OfLabel.Text = OfLabel.ToolTip = m_refMsg.GetMessage("lbl pagecontrol of"); FirstPage.ToolTip = m_refMsg.GetMessage("lbl first page"); PreviousPage.ToolTip = m_refMsg.GetMessage("lbl previous page"); NextPage.ToolTip = m_refMsg.GetMessage("lbl next page"); LastPage.ToolTip = m_refMsg.GetMessage("lbl last page"); FirstPage.Text = "[" + m_refMsg.GetMessage("lbl first page") + "]"; PreviousPage.Text = "[" + m_refMsg.GetMessage("lbl previous page") + "]"; NextPage.Text = "[" + m_refMsg.GetMessage("lbl next page") + "]"; LastPage.Text = "[" + m_refMsg.GetMessage("lbl last page") + "]"; taxonomy_request = new TaxonomyRequest(); taxonomy_request.TaxonomyId = TaxonomyId; taxonomy_request.TaxonomyLanguage = TaxonomyLanguage; m_refContent = m_refCommon.EkContentRef; if (Page.IsPostBack && Request.Form[isPostData.UniqueID] != "") { if (Request.Form["submittedaction"] == "delete") { m_refContent.DeleteTaxonomy(taxonomy_request); Response.Write("<script type=\"text/javascript\">parent.CloseChildPage();</script>"); } else if (Request.Form["submittedaction"] == "deleteitem") { if (m_strViewItem != "folder") { taxonomy_request.TaxonomyIdList = Request.Form["selected_items"]; if (m_strViewItem.ToLower() == "cgroup") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Group; } else if (m_strViewItem.ToLower() == "user") { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.User; } else { taxonomy_request.TaxonomyItemType = EkEnumeration.TaxonomyItemType.Content; } m_refContent.RemoveTaxonomyItem(taxonomy_request); } else { TaxonomySyncRequest tax_folder = new TaxonomySyncRequest(); tax_folder.TaxonomyId = TaxonomyId; tax_folder.TaxonomyLanguage = TaxonomyLanguage; tax_folder.SyncIdList = Request.Form["selected_items"]; m_refContent.RemoveTaxonomyFolder(tax_folder); } if (Request.Params["ccp"] == null) { Response.Redirect("taxonomy.aspx?" + Request.ServerVariables["query_string"] + "&ccp=true", true); } else { Response.Redirect((string) ("taxonomy.aspx?" + Request.ServerVariables["query_string"]), true); } } } else if (IsPostBack == false) { DisplayPage(); } isPostData.Value = "true"; }