以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  如何在分页和动态加载的时候加入过滤代码?  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=57636)

--  作者:linshibin
--  发布时间:2014/9/28 11:12:00
--  如何在分页和动态加载的时候加入过滤代码?

我是在登录窗口位置加入类似一下的窗口代码,如何在动态加载的时候也能够保证下面的权限呢?
\'关怀信息表过滤与表窗口加载
Dim filtergh As String
If _Role = "销售部同事" Then
Filtergh = "BelongTeam= \'公海\' Or BelongUser = \'" & _UserName & "\'"
Else If _Role = "销售部经理" Then
Filtergh = "BelongTeam = \'" & _department & "\' Or BelongTeam= \'公海\'"
Else If _Role = "外包部同事" Then
Filtergh = "BelongTeam = \'" & _department & "\' And BelongUser = \'" & _UserName & "\'"
Else If _Role ="超级管理员" Or _Role= "公司总经理" Then
Filtergh = ""
Else
Filtergh = "BelongUser = \'还想加载数据想太多\'"
End If
\'Forms("关怀信息分页").Show()
DataTables("GuanHuai").LoadFilter = filtergh
DataTables("GuanHuai").Load


--  作者:有点甜
--  发布时间:2014/9/28 11:20:00
--  
 设置了LoadFilter以后,只要不改变它的值,加载的内容就是你设定的内容