For Each nd As WinForm.TreeNode In trv.AllNodes Dim dd As String = nd.DataRow("地点") Dim lc As String = nd.DataRow("楼层") Select Case nd.Level Case 0 nd.Text = "(" & dt.Compute("count(房号)","地点 = '" & dd & "'") & "间)" Case 1 nd.Text = "(" & dt.Compute("count(房号)","地点 = '" & dd & "' and 楼层 = '" & lc & "'") & "间)" Case 2 nd.Text = nd.text & "(" & nd.DataRow("房号") & "间)" End Select Next
|