ModelManage/SaleSetManage/StoreType/StoreTypeShow.aspx.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
public partial class SaleSetManage_StoreType_StoreTypeShow : PageBase
{
public string strControlValue = "";
public string strControlName = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
strControlValue = Request.QueryString["Uvalue"].ToString();
strControlName = Request.QueryString["Uname"].ToString();
}
BindTree(this.ListTreeView.Nodes, 0);
}
private void BindTree(TreeNodeCollection Nds, int IDStr)
{
DataTable dt = DBUtility.DbHelperSQL.GetDataTable("select * from StoreTypeInfor where STParentID=" + IDStr.ToString() + " and (STState=0 or STState=1) order by STypeNumber desc");
foreach (DataRow item in dt.Rows)
{
TreeNode OrganizationNode = new TreeNode();
OrganizationNode.Text = item["STypeName"].ToString();
OrganizationNode.Value = item["ID"].ToString();
int strId = int.Parse(item["ID"].ToString());
OrganizationNode.SelectAction = TreeNodeSelectAction.Expand;
string ChildID = DBUtility.DbHelperSQL.GetSHSLInt("select top 1 ID from StoreTypeInfor where STParentID=" + item["ID"].ToString() + " and (STState=0 or STState=1) order by STypeNumber desc");
OrganizationNode.ToolTip = item["ID"].ToString();
OrganizationNode.Expand();
Nds.Add(OrganizationNode);
//递归循环
BindTree(Nds[Nds.Count - 1].ChildNodes, strId);
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
