Dim tv As WinForm.TreeView tv = e.Form.Controls("TreeView1") tv.BuildDataTree("DW","","归口股室","乡镇名称","单位类型","单位名称")
If e.Node.Level = 0 Then '如果是顶层节点 Return '则返回 End If Dim Vals() As String = e.Node.FullPath.Split("\") Dim Filter As String = "[归口股室] = '" & Vals(0) & "' And [乡镇名称] = '" & Vals(1) & "' And [单位类型] = '" & Vals(2) & "' And [单位名称] = '" & Vals(3) & "'" Dim dr As DataRow = DataTables("DW").Find(Filter) Dim r As Row = Tables("SYGF").Current r("归口股室") = dr("归口股室") r("乡镇名称") = dr("乡镇名称") r("单位类型1") = dr("单位类型") r("单位类型2") = dr("单位类型2") r("单位名称") = dr("单位名称") r("单位代码") = dr("单位代码") r("是否教龄津贴单位") = dr("是否教龄津贴单位") r("是否护龄津贴单位") = dr("是否护龄津贴单位") r("标准起始时间") = dr("实施绩效工资标准起始时间") r("控制时间") = dr("实施绩效工资审批控制时间") if r("标准起始时间") = "0001-01-01" r("标准起始时间") = nothing end if if r("控制时间") = "0001-01-01" r("控制时间") = nothing end if e.Form.Close() 此主题相关图片如下:未命名.jpg
2楼
雨中的泪 发表于:2009/11/5 9:27:00
双击二层以下节点就出现错误提示!!! 版主帮忙,看看,谢谢
3楼
狐狸爸爸 发表于:2009/11/5 9:32:00
Dim Vals() As String = e.Node.FullPath.Split("\") Dim Filter As String = "[归口股室] = '" & Vals(0) & "' And [乡镇名称] = '" & Vals(1) & "' And [单位类型] = '" & Vals(2) & "' And [单位名称] = '" & Vals(3) & "'"