int id=0;
string name=this.treeView.SelectedNode.Text;//得到节点的名称
string str="select treeid from treeshow where treeid=(select max(treeid)from treeshow where father=(select treeid from treeshow where nodename='"+name+"')) ";
objSqlcomm=new SqlCommand(str,objSqlconn);
objread=objSqlcomm.ExecuteReader();
objread.Read();
try
{
string land="select *from treeshow where father not in (select treeid from treeshow)";
objada=new SqlDataAdapter(land,objSqlconn);
objset=new DataSet();
objada.Fill(objset,"treeshow");
foreach(DataRow rw in objset.Tables[0].Rows)
{
TreeNode node=new TreeNode();
node.Tag=rw[1];