如何存储树型结构的数据?? 最近做个项目必须用数据库存储树型结构,但没想到什么好招,请高手解决下 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 class A{int param;collection<A> As;} Table的格式:ID(樹圖每項ID) TreeItem(樹圖項名稱) ParentID(樹圖項的上一級ID)1 廣東省 null2 廣州市 13 中山市 14 惠州市 15 天河區 26 番愚區 2... 我一直使用xiwang6428(冰鹽膚木)的方法,不过根类我用的是0而不是null以下是几个相关的操作方法public void FillWebDropDownList ( System.Web.UI.WebControls.DropDownList DropList , String TableName , String PrimaryField , String ParentClassField , String NameField , String ValueField , Int32 CurrentID , Int32 SelectedID , Int32 Level , String LeaderChar )public void FillWebDropDownList ( System.Web.UI.WebControls.DropDownList DropList , String TableName , String PrimaryField , String ParentClassField , String NameField , Int32 CurrentID , Int32 SelectedID , Int32 Level , String LeaderChar )public String SearchSubClassIDList ( String TableName , String PrimaryField , String ParentClassField , Int32 CurrentID , Int32 Level , Boolean IncParentID )public String SearchSubClassIDList ( String TableName , String PrimaryField , String ParentClassField , String ResultField , Int32 CurrentID , Int32 Level , Boolean IncParentID , Boolean IsString ) c# id 寻求查找Method中的一些特定内容的方法 树的后跟遍历 一个面向对象的小问题 C# 事务Update,超难!!!!!!!! webform的小问题,都来看看吧 内存问题 急。。。急。。。帮忙解决问题后,再送100分!!!!!!! .Net 1.1 无法在 Win 2003 R2 上安装 关于WebControls.Table的问题 急救!!!this.ResumeLayout(false);这句出错,提示 找不到指定模块是什么情况? 用C#的ADO 要执行这么个复杂的操作,请高手进来帮帮忙!在线等,急用!!
{
int param;
collection<A> As;
}
ID(樹圖每項ID) TreeItem(樹圖項名稱) ParentID(樹圖項的上一級ID)
1 廣東省 null
2 廣州市 1
3 中山市 1
4 惠州市 1
5 天河區 2
6 番愚區 2
.
.
.
以下是几个相关的操作方法
public void FillWebDropDownList ( System.Web.UI.WebControls.DropDownList DropList , String TableName , String PrimaryField , String ParentClassField , String NameField , String ValueField , Int32 CurrentID , Int32 SelectedID , Int32 Level , String LeaderChar )
public void FillWebDropDownList ( System.Web.UI.WebControls.DropDownList DropList , String TableName , String PrimaryField , String ParentClassField , String NameField , Int32 CurrentID , Int32 SelectedID , Int32 Level , String LeaderChar )
public String SearchSubClassIDList ( String TableName , String PrimaryField , String ParentClassField , Int32 CurrentID , Int32 Level , Boolean IncParentID )
public String SearchSubClassIDList ( String TableName , String PrimaryField , String ParentClassField , String ResultField , Int32 CurrentID , Int32 Level , Boolean IncParentID , Boolean IsString )