public SetTypeForm(decimal mapid) { InitializeComponent(); //DataTable roottable = MapDBClass.GetLayerInformation(mapid); //查询影像图结构 //PhotoList = MapDBClass.GetPhotoList(); ParentChildTable = MapDBClass.GetLayerInformation(mapid); treeView1.Nodes.Clear(); //if (roottable != null && roottable.Rows.Count == 1) //{ TreeNode rootnode = new TreeNode("基础图层") { Tag = "0" }; treeView1.Nodes.Add(rootnode); AddNode(rootnode); treeView1.SelectedNode = rootnode; TreeNode rootnode1 = new TreeNode("数据图层") { Tag = "4" }; treeView1.Nodes.Add(rootnode1); AddNode(rootnode1); init();//gridview绑定值 }