Foxtable(狐表)用户栏目专家坐堂 → 加载树代码错误?


  共有3006人关注过本帖树形打印复制链接

主题:加载树代码错误?

帅哥哟,离线,有人找我吗?
身份不明
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:459 积分:3137 威望:0 精华:0 注册:2014/2/13 9:22:00
加载树代码错误?  发帖心情 Post By:2014/6/20 17:07:00 [只看该作者]

错误提示:


图片点击可在新窗口打开查看此主题相关图片如下:1.jpg
图片点击可在新窗口打开查看
代码如下:

Dim Filter As String
If e.Node.Text = "加载所有数据" Then
    Filter = ""
Else
    Dim dr As DataRow = e.Node.DataRow '获取生成此节点的行
    Dim pname As String = dr("外协完成")
    Dim Year As Integer = dr("年")
    Dim Month As Integer = dr("月")
    Dim pname As String = dr("外协厂")
    Select Case e.Node.Level
        Case 0
            Filter ="[外协完成] = " & iif(dr("外协完成") = False, 0, 1)
        Case 1
            Filter ="Year(日期) = " & Year
        Case 2
            Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month
        Case 3
            Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month & " And 外协厂 = '" & pname & "'"       
    End Select
End If
With DataTables("外协管理")
    .LoadFilter = Filter
    .LoadPage = 0
    .LoadTop = 10
    .Load()
    e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With

 


 回到顶部
帅哥哟,离线,有人找我吗?
有点甜
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2014/6/20 17:08:00 [只看该作者]

Dim Filter As String
If e.Node.Text = "加载所有数据" Then
    Filter = ""
Else
    Dim dr As DataRow = e.Node.DataRow '获取生成此节点的行
    Dim Year As Integer = dr("年")
    Dim Month As Integer = dr("月")
    Dim pname As String = dr("外协厂")
    Select Case e.Node.Level
        Case 0
            Filter ="[外协完成] = " & iif(dr("外协完成") = False, 0, 1)
        Case 1
            Filter ="Year(日期) = " & Year
        Case 2
            Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month
        Case 3
            Filter ="Year(日期) = " & Year & " And Month(日期) = " & Month & " And 外协厂 = '" & pname & "'"       
    End Select
End If
With DataTables("外协管理")
    .LoadFilter = Filter
    .LoadPage = 0
    .LoadTop = 10
    .Load()
    e.Form.Controls("TextBox1").Value = 1 & "/" & .TotalPages
End With

 


 回到顶部