/// <summary>
 /// 递归加载数据到TreeNode
 /// </summary>
 /// <param name="pid"></param>
 /// <param name="treeNodes">TreeNode集合</param>
 /// 由于这个方法的参数有TreeNode,所以不适合写在逻辑层
 public void LoadAreaDataRec(int pid, TreeNodeCollection treeNodes)
 {
     TblAreaBll bll = new TblAreaBll();
     List<Area> list=bll.GetAreaDataByAreaPID(pid);
     foreach (var item in list)
     {
         TreeNode newNode=treeNodes.Add(item.AreaName);
         newNode.Tag = item.AreaId;
         LoadAreaDataRec(item.AreaId, newNode.Nodes);
     }
 }
 /// <summary>
 /// 删除按钮
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void btnDelete_Click(object sender, EventArgs e)
 {
     TblAreaBll bll = new TblAreaBll();
     bll.RecDeleteAreaData((int)treeView1.SelectedNode.Tag);
     treeView1.SelectedNode.Remove();
 }