Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]点击目录树个别数据不能加载

1楼
dahai 发表于:2024/10/9 0:24:00
老师您好,我用的阿里云。问题描述:大概有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编辑过]
2楼
有点蓝 发表于:2024/10/9 11:13:00
应该是数据有问题,可能这4行的供应商有空格等看不见的字符
3楼
dahai 发表于:2024/10/10 21:34:00
谢谢老师,确实是空格的问题
共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .02344 s, 2 queries.