/// <summary>
/// 加載目錄樹
/// </summary>
void LoadTree(int parentId, TreeNode node)
{
DataSet ds = AccessHelper.Query(AccessHelper.ConnectionStringLocalTransaction,
CommandType.Text, "select * from [dir] where [parent_id]=" + Convert.ToString(parentId),
null);
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
TreeNode tn = new TreeNode(ds.Tables[0].Rows[i]["dir_name"].ToString());
//tn.NavigateUrl = "TextList.ASPx?id=" + ds.Tables[0].Rows[i]["id"].ToString();
//tn.Target = "mainFrame";
tn.Value = ds.Tables[0].Rows[i]["id"].ToString();
node.ChildNodes.Add(tn);
LoadTree(Convert.ToInt16(ds.Tables[0].Rows[i]["id"].ToString()), tn);
}