老师您好,我用的阿里云。问题描述:大概有100多家供应商,2700行数据,点击case0、case1可以加载所有数据,点击case2和case3,只有一个供应商的4行数据加载不了,点击其他供应商都没有问题。请老师帮我看看,谢谢!
窗口afterload 代码如下
Dim jycmd As New SQLCommand
Dim jydt As DataTable
jycmd.C onne ctionNam e = "****"
jycmd.CommandText = "SELECT DISTINCT Year(入库日期) As 年,Month(入库日期) As 月,供应商,单号 Fro m {入库明细}"
jydt = jycmd.ExecuteReader()
Dim jytrv As WinForm.TreeView = e.Form.Controls("tvjy")
jytrv.BuildTree(jydt, "年|月|供应商|单号")
DataTables("入库明细").LoadFilter = "_identify is null"
DataTables("入库明细").Load
nodemouseclick 事件代码如下:
Dim dr As DataRow = e.Node.DataRow
Dim FL As String
Dim Year As Integer = dr("年")
Dim Month As Integer = dr("月")
Dim gy As String = dr("供应商")
Dim xh As String = dr("单号")
Select Case e.Node.Level
Case 0
FL = "Year(入库日期) = " & Year & ""
Case 1
FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & ""
Case 2
FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & " And 供应商 = '" & gy & "' "
Case 3
FL = "Year(入库日期) = " & Year & " And Month(入库日期) = " & Month & " And 供应商 = '" & gy & "' And 单号 = '" & xh & "'"
End Select
DataTables("入库明细").LoadTop = Nothing
DataTables("入库明细").LoadFilter = FL
DataTables("入库明细").Load()
[此贴子已经被作者于2024/10/9 0:25:58编辑过]
应该是数据有问题,可能这4行的供应商有空格等看不见的字符