以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 当前表模糊筛选 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=170807) |
-- 作者:yifan3429 -- 发布时间:2021/8/8 8:41:00 -- 当前表模糊筛选 Dim e = args(0) Dim txt As String = e.Form.Controls("模糊筛选").Text Dim tbl As Table = Tables("渠道客户") If txt = "" Then tbl.Filter = "" Else txt = "\'%" & txt & "%\'" tbl.DataTable.loadFilter = "工作室名称 Like " & txt & " Or 提交人 Like " & txt & " Or 手机号 Like " & txt & " Or 客户姓名 Like " & txt & " Or 备注 Like " & txt tbl.DataTable.load End If 上面的代码需要制定到表和关键列 我想在当前表内 所有列搜索 |
-- 作者:有点蓝 -- 发布时间:2021/8/8 20:28:00 -- Else txt = "\'%" & txt & "%\'" dim f as string = "1=2" for each c as col in tbl.cols if c.IsString then f = f & " or " & c.name & " Like " & txt end if next tbl.DataTable.loadFilter = f tbl.DataTable.load End If
|
-- 作者:yifan3429 -- 发布时间:2021/8/9 22:44:00 -- Dim txt As String = e.Form.Controls("模糊筛选").Text Dim tbl As Table = CurrentTable If txt = "" Then tbl.Filter = "" Else txt = "\'%" & txt & "%\'" Dim f As String = "1=2" For Each c As Col In tbl.cols If c.IsString Then f = f & " or " & c.name & " Like " & txt & " Or 权限组 Like \'%" & User.Name & "%\'" & txt 需要配合权限内容 求助老师 End If Next tbl.DataTable.loadFilter = f tbl.DataTable.load End If
|
-- 作者:有点蓝 -- 发布时间:2021/8/9 22:50:00 -- Dim f As String = "1=2" For Each c As Col In tbl.cols If c.IsString Then f = f & " or " & c.name & " Like " & txt End If Next f = "(" & f & ") and 权限组 Like \'%" & User.Name & "%\'" tbl.DataTable.loadFilter = f tbl.DataTable.load |