以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 函数错误 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=165070) |
-- 作者:yifan3429 -- 发布时间:2021/5/10 22:34:00 -- 函数错误 .NET Framework 版本:4.0.30319.42000 Foxtable 版本:2020.5.29.8 错误所在事件:自定义函数,管理植入 详细错误信息: 调用的目标发生了异常。 无法将类型为“Foxtable.ControlEventArgs”的对象强制转换为类型“Foxtable.RequestEventArgs”。 Dim e As RequestEventArgs = args(0) Dim s As String Select Case MainTable.Name Case "企略落地系统" For Each dr As DataRow In DataTables("企略落地系统").DataRows s = dr("权限组") If s.Contains("管理员|渡哥|开发者|") = False Then dr("权限组") = "管理员|渡哥|开发者|"& dr("权限组") End If If s.Contains(dr("责任人") & "|" & dr("责任部门")) = False Then dr("权限组") = dr("责任人") & "|" & dr("责任部门")& "|" & dr("权限组") End If Next Case "终端用户" For Each dr As DataRow In DataTables("终端用户").DataRows s = dr("权限组") If s.Contains("管理员|渡哥|开发者|") = False Then dr("权限组") = "管理员|渡哥|开发者|"& dr("权限组") End If If s.Contains(dr("责任人") & "|" & dr("责任部门")) = False Then dr("权限组") = dr("责任人") & "|" & dr("责任部门")& "|" & dr("权限组") End If Next Case "渠道客户" For Each dr As DataRow In DataTables("渠道客户").DataRows s = dr("权限组") If s.Contains("管理员|渡哥|开发者|") = False Then dr("权限组") = "管理员|渡哥|开发者|"& dr("权限组") End If If s.Contains(dr("责任人") & "|" & dr("责任部门")) = False Then dr("权限组") = dr("责任人") & "|" & dr("责任部门")& "|" & dr("权限组") End If Next Case Else \'StatusBar.Message1 = "就绪" End Select |
-- 作者:有点蓝 -- 发布时间:2021/5/10 22:47:00 -- RequestEventArgs 是web服务httprequest事件独有的e参数,应该是在控件里调用了这个函数,然后传入了控件事件的e参数。 改为 Dim e = args(0) 或者直接去掉,因为代码也没用到
|