⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 specialtreexml.cs

📁 动易SiteFactory&#8482 网上商店系统1.0源代码
💻 CS
字号:
namespace PowerEasy.WebSite.Admin.Contents
{
    using PowerEasy.Common;
    using PowerEasy.Contents;
    using PowerEasy.Controls;
    using PowerEasy.Model.Contents;
    using PowerEasy.Web.UI;
    using System;
    using System.Web;
    using System.Web.UI.HtmlControls;

    public class SpecialTreeXml : AdminPage
    {
        protected HtmlForm form1;

        protected void Page_Load(object sender, EventArgs e)
        {
            base.Response.Clear();
            base.Response.ContentType = "text/xml; charset=UTF-8";
            base.Response.CacheControl = "no-cache";
            XTreeCollection xTreeList = new XTreeCollection();
            SpecialXml(xTreeList);
            base.Response.Write(xTreeList.ToString());
            base.Response.End();
        }

        private static void SpecialXml(XTreeCollection xTreeList)
        {
            if (DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"]) <= 0)
            {
                foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
                {
                    string str = "SpecialManage.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
                    string str2 = "";
                    string str3 = "2";
                    if (Special.ExistsSpecialCategoryIdInSpecials(info.SpecialCategoryId))
                    {
                        str3 = "1";
                        str2 = "SpecialTreeXml.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
                    }
                    XTreeItem item = new XTreeItem();
                    item.Text = info.SpecialCategoryName;
                    item.ArrModelId = str3;
                    item.ArrModelName = "";
                    item.Icon = "Container";
                    item.NodeId = info.SpecialCategoryId.ToString();
                    item.Target = "main_right";
                    item.Expand = "0";
                    item.AnchorType = "1";
                    item.XmlSrc = str2;
                    item.Action = str;
                    item.Title = "小贴士:您可以在节点名称上点击鼠标右键,从弹出菜单中选择相关操作。";
                    xTreeList.Add(item);
                }
            }
            else
            {
                foreach (SpecialInfo info2 in Special.GetSpecialList(DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"])))
                {
                    string str4 = "Special.aspx?Action=Modify&amp;SpecialID=" + info2.SpecialId;
                    XTreeItem item2 = new XTreeItem();
                    item2.Text = info2.SpecialName;
                    item2.ArrModelId = "0";
                    item2.ArrModelName = "";
                    item2.NodeId = info2.SpecialId.ToString();
                    item2.Icon = "Container";
                    item2.Target = "main_right";
                    item2.Expand = "0";
                    item2.AnchorType = "1";
                    item2.XmlSrc = "";
                    item2.Action = str4;
                    item2.Title = "小贴士:您可以在节点名称上点击鼠标右键,从弹出菜单中选择相关操作。";
                    xTreeList.Add(item2);
                }
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -