📄 specialinfotreexml.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 SpecialInfoTreeXml : 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();
SpecialInfoXml(xTreeList);
base.Response.Write(xTreeList.ToString());
base.Response.End();
}
public static void SpecialInfoXml(XTreeCollection xTreeList)
{
if (DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"]) <= 0)
{
foreach (SpecialCategoryInfo info in Special.GetSpecialCategoryList())
{
XTreeItem item = new XTreeItem();
string str = "";
if (Special.ExistsSpecialCategoryIdInSpecials(info.SpecialCategoryId))
{
str = "SpecialInfoTreeXml.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
}
item.Text = info.SpecialCategoryName;
item.ArrModelId = "1";
item.ArrModelName = "";
item.Icon = "Container";
item.NodeId = info.SpecialCategoryId.ToString();
item.Target = "main_right";
item.Expand = "0";
item.AnchorType = "1";
item.XmlSrc = str;
item.Action = "SpecialInfosManage.aspx?SpecialCategoryID=" + info.SpecialCategoryId;
xTreeList.Add(item);
}
}
else
{
foreach (SpecialInfo info2 in Special.GetSpecialList(DataConverter.CLng(HttpContext.Current.Request.QueryString["SpecialCategoryID"])))
{
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 = string.Concat(new object[] { "SpecialInfosManage.aspx?SpecialCategoryID=", info2.SpecialCategoryId, "&SpecialID=", info2.SpecialId, "&SpecialName=", HttpContext.Current.Server.UrlEncode(info2.SpecialName) });
xTreeList.Add(item2);
}
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -