Foxtable(狐表)用户栏目专家坐堂 → 否能利用临时表进行分页加载


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

主题:否能利用临时表进行分页加载

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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/10 11:21:00 [显示全部帖子]

分页语法,参考

 

https://blog.csdn.net/qq269228887/article/details/13769283

 

loadover可以用别的列分页的,但此列如果不唯一,分页可能出错


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/12 22:13:00 [显示全部帖子]

1、你的临时表,没有 _Identify 列。

 

2、你这种方法也是无法做到你需要的效果的。你必须另外加一列,给这一列从1到n赋值。


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/19 17:03:00 [显示全部帖子]

 

1、为空的,我测试没问题。请截图说明。

 

2、

 

'Functions.Execute("项目筛选树Trv_sxs_AfterCheckNode_e",e)

Dim s As String = e.Form.Controls("Chebox_sxs").Text
Dim tb1 As Table = Tables(e.Form.Name & "_Table1")
Dim dt As DataTable = lsbdt
Dim Colstr() As String
Dim qts As String() = {"'","#",""}
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String = ""
Dim nd As WinForm.TreeNode
Dim pd As WinForm.TreeNode
Dim notchecked As Integer = 0
Colstr = s.split("|")

For Each nd In e.Node.AllNodes  '清除子节点的选中标记
    nd.Checked = False
Next
pd = e.Node.ParentNode
Do While pd IsNot Nothing    '清除父节点的选中标记
    pd.Checked = False
    pd = pd.ParentNode
Loop

For Each nd In trv.AllNodes
    If nd.Checked  Then
        If nd.Name = "显示所有项目" Then
            Exit For
        Else
           
            Dim rts() As String = nd.FullPath.Split("\")
            Dim val As String = ""
            For i As Integer = 0 To rts.length - 1
                If dt.DataCols(Colstr(i)).IsString Then
                    If rts(i) <> "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        End If
                    ElseIf rts(i) = "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null"
                        Else
                            val = val & Colstr(i) & " Is Null"
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsDate Then
                    If rts(i) <> #0001-1-1 0:00:00# Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                        Else
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                        End If
                    ElseIf rts(i) = #0001-1-1 0:00:00# Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null"
                        Else
                            val = val & Colstr(i) & " Is Null"
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsNumeric Then
                    If rts(i) <> 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        Else
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        End If
                    ElseIf rts(i) = 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null"
                        Else
                            val = val & Colstr(i) & " Is Null"
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsBoolean Then
                    If rts(i) <> False Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & True & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & True & qts(0)
                        End If
                    ElseIf rts(i) = False Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & False & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & False & qts(0)
                        End If
                    End If
                End If
            Next
            If flt > "" Then
                flt = flt & " Or (" & val & ")"
            Else
                flt = val
            End If
            notchecked + = 1
        End If
    End If
Next
msgbox(flt)
Dim lst As List(of String)
If flt > "" AndAlso  notchecked > 0 Then
    lst = lsbdt.GetValues("系统编号",flt,"idx")
Else
    lst = lsbdt.GetValues("系统编号","","idx")
End If

bhlst = Nothing
bhlst = lst

lsbcnt = Nothing
lsbcnt = lst.Count

''加载第一页数据
e.Form.Strips("主菜单").Items("btnFirst").PerformClick()


''


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/19 23:02:00 [显示全部帖子]

1、循环每一个节点,符合的字符,就修改节点的text为空;

 

2、修改代码

 

    For n As Integer = st To ed-1


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/20 16:40:00 [显示全部帖子]

Dim s As String = e.Form.Controls("CheckedComboBox1").Text
Dim tb1 As Table = Tables(e.Form.Name & "_Table1")
Dim dt As DataTable = lsbdt
Dim Colstr() As String
Dim qts As String() = {"'","#",""}
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String = ""
Dim nd As WinForm.TreeNode
Dim pd As WinForm.TreeNode
Dim notchecked As Integer = 0
Colstr = s.split("|")
'If e.Node.Name = "显示所有项目" Then
'If e.Node.Checked = True Then
'For Each nd In trv.AllNodes
'If nd.Name <> "显示所有项目" Then
'nd.Checked = False
'End If
'Next
'''第一页
'Functions.Execute("btnFirst_e",e)
'Else
'For Each nd In trv.AllNodes
'nd.Checked = False
'Next
''tb1.Filter = (1 = 2)
'DataTables(tb1.DataTable.Name).LoadFilter = (1 = 2)
'DataTables(tb1.DataTable.Name).Load()
'e.Form.Controls("Page").Value = Nothing
'End If
'trv.CollapseAll
'Return
'Else
'trv.AllNodes(0).Checked = False
'End If

For Each nd In e.Node.AllNodes  '清除子节点的选中标记
    nd.Checked = False
Next
pd = e.Node.ParentNode
Do While pd IsNot Nothing    '清除父节点的选中标记
    pd.Checked = False
    pd = pd.ParentNode
Loop

For Each nd In trv.AllNodes
    If nd.Checked  Then
        If nd.Name = "显示所有行" Then
            Exit For
        Else
            Dim rts() As String = nd.FullPath.Split("\")
            Dim val As String = ""
            For i As Integer = 0 To rts.length - 1
                If dt.DataCols(Colstr(i)).IsString Then
                    If rts(i) <> "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        End If
                    ElseIf rts(i) = "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null"
                        Else
                            val = val & Colstr(i) & " Is Null"
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsDate Then
                    If rts(i) = "无日期" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " is null "
                        Else
                            val = val & Colstr(i) & " is null "
                        End If
                    ElseIf rts(i) <> Nothing Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                           
                        Else
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                           
                        End If
                       
                        'ElseIf rts(i) = #0001-1-1 0:00:00# Then
                        'If val > "" Then
                        'val = val & " And "
                        'val = val & Colstr(i) & " Is Null"
                        'Else
                        'val = val & Colstr(i) & " Is Null"
                        'End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsNumeric Then
                    If rts(i) <> 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        Else
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        End If
                    ElseIf rts(i) = 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null"
                        Else
                            val = val & Colstr(i) & " Is Null"
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsBoolean Then
                    If rts(i) <> False Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & True & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & True & qts(0)
                        End If
                    ElseIf rts(i) = False Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & False & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & False & qts(0)
                        End If
                    End If
                End If
            Next
            If flt > "" Then
                flt = flt & " Or (" & val & ")"
            Else
                flt = val
            End If
            notchecked + = 1
        End If
    End If
Next
Dim lst As List(of String)
If flt > "" AndAlso  notchecked > 0 Then
    lst = lsbdt.sqlGetValues("编号",flt,"日期 DESC")
Else
    lst = lsbdt.sqlGetValues("编号","","日期 DESC")
End If
msgbox(flt)
bhlst = Nothing
bhlst = lst

lsbcnt = Nothing
lsbcnt = lst.Count


e.Form.Strips("主菜单").Items("btnFirst").PerformClick()

 


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


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2019/5/27 17:30:00 [显示全部帖子]

 

Dim s As String = e.Form.Controls("Chebox_sxs").Text
Dim tb1 As Table = Tables(e.Form.Name & "_Table1")
Dim dt As DataTable = lsbdt
Dim Colstr() As String
Dim qts As String() = {"'","#",""}
Dim trv As WinForm.TreeView = e.Sender
Dim flt As String = ""
Dim nd,pd As WinForm.TreeNode
'Dim pd As WinForm.TreeNode
Dim notchecked As Integer = 0
Colstr = s.split("|")
If e.Node.Name = "显示所有项目" Then
    If e.Node.Checked = True Then
        For Each nd In trv.AllNodes
            If nd.Name <> "显示所有项目" Then
                nd.Checked = False
            End If
        Next
    Else
        For Each nd In trv.AllNodes
            nd.Checked = False
        Next
    End If
    'trv.CollapseAll
    Return
Else
    trv.AllNodes(0).Checked = False
End If

For Each nd In e.Node.AllNodes  '同步子节点选中状态
    If nd.FullPath.StartsWith(e.Node.FullPath) Then
        nd.Checked = e.Node.Checked
    End If
Next
If e.Node.Checked = False Then  '如果本次操作为清除节点选中状态
    pd = e.Node.ParentNode  '获取父节点
    Do While pd IsNot Nothing
        pd.Checked = False    '清除父节点选中状态
        pd = pd.ParentNode   '继续获取上一层级的父节点
    Loop
End If


For Each nd In trv.AllNodes
    If nd.Checked  Then
        If nd.Name = "显示所有项目" Then
           
            Exit For
        Else
            Dim rts() As String = nd.FullPath.Split("\")
            Dim val As String = ""
            For i As Integer = 0 To rts.length - 1
                If dt.DataCols(Colstr(i)).IsString Then
                    If rts(i) = "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null "
                        Else
                            val = val & Colstr(i) & " Is Null "
                        End If
                    ElseIf rts(i) <> "空" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        Else
                            val = val & Colstr(i) & " = " & qts(0) & rts(i) & qts(0)
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsDate Then
                    If rts(i) = "无日期" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null "
                        Else
                            val = val & Colstr(i) & " Is Null "
                        End If
                    ElseIf rts(i) <> Nothing Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                        Else
                            val = val & Colstr(i) & " = " & qts(1) & rts(i) & qts(1)
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsNumeric Then
                    If rts(i) <> 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        Else
                            val = val & Colstr(i) & " = " & qts(2) & rts(i) & qts(2)
                        End If
                    ElseIf rts(i) = 0 Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " Is Null "
                        Else
                            val = val & Colstr(i) & " Is Null "
                        End If
                    End If
                ElseIf dt.DataCols(Colstr(i)).IsBoolean Then
                    If rts(i) = "未审核" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(2) & False & qts(2)
                        Else
                            val = val & Colstr(i) & " = " & qts(2) & False & qts(2)
                        End If
                    ElseIf rts(i) = "已审核" Then
                        If val > "" Then
                            val = val & " And "
                            val = val & Colstr(i) & " = " & qts(2) & True & qts(2)
                        Else
                            val = val & Colstr(i) & " = " & qts(2) & True & qts(2)
                        End If
                    End If
                End If
            Next
            If flt > "" Then
                flt = flt & " Or (" & val & ")"
            Else
                flt = val
            End If
            notchecked + = 1
        End If
    End If
Next

Dim lst As List(of String)
If flt > "" AndAlso  notchecked > 0 Then
    lst = lsbdt.sqlGetValues("编号",flt,"日期 DESC")
Else
    lst = lsbdt.sqlGetValues("编号","","日期 DESC")
End If

msgbox(flt)
msgbox(lst.count)

bhlst = Nothing
bhlst = lst

lsbcnt = Nothing
lsbcnt = lst.Count


e.Form.Strips("主菜单").Items("btnFirst").PerformClick()

 

 


 回到顶部