-- 作者:cd_tdh
-- 发布时间:2022/5/6 13:36:00
-- 页面跳转问题
跳转问题
老师我Insurance这个页面代码如下:
Dim e As object = args(0) Dim wb As New weui wb.AddForm("","form1","Insurance.htm") With wb.AddListGroup("form1", "ls1","团体意外伤害保险") \'ParentID 父容器的ID,如果是顶层对象,设置为""即可. ID 分组ID. Text 可选参数,用于指定分组标题. .Add("团体意外伤害保险","团体意外伤害保险", "查看详情", "Insurance_filter.htm?name=" & e.getvalues("name"), "./images/意外伤害保险.png") \'ID ID. Text 列表内容. Description 列表说明 Href 超链接. Image 图标. End With With wb.AddListGroup("form1", "ls2","建筑工程一切险") \'ParentID 父容器的ID,如果是顶层对象,设置为""即可. ID 分组ID. Text 可选参数,用于指定分组标题. .Add("建筑工程一切险","建筑工程一切险", "查看详情", "Insurance_filter.htm?name=" & e.getvalues("name"), "./images/建筑工程一切险.png") \'ID ID. Text 列表内容. Description 列表说明 Href 超链接. Image 图标. End With With wb.AddListGroup("form1", "ls3","第三者责任险") \'ParentID 父容器的ID,如果是顶层对象,设置为""即可. ID 分组ID. Text 可选参数,用于指定分组标题. .Add("第三者责任险","第三者责任险", "查看详情", "Insurance_filter.htm?name=" & e.getvalues("name"), "./images/第三者责任险.png") \'ID ID. Text 列表内容. Description 列表说明 Href 超链接. Image 图标. End With wb.InsertHTML("<div style=\'height:50px\'></div>") wb.AddPage("form1","page1").Attribute = "style=\'position: fixed;bottom: 0;right: 0;left: 0\'" \'增加1个page With wb.AddButtonGroup("page1","btg2", False) .Add("btn1", "首页", "", "default.htm") End With e.WriteString(wb.Build)
如图:
此主题相关图片如下:qq截图20220506133219.jpg
点击查看详情,跳转过去报错哪儿问题?调试时,弹出e.getvalues("name")没有值
报错:
.NET Framework 版本:4.0.30319.42000 Foxtable 版本:2022.1.30.2 错误所在事件:自定义函数,Insurance_filter 详细错误信息: 调用的目标发生了异常。 未将对象引用设置到对象的实例。
Insurance_filter.htm页面代码如下:
Dim e As object = args(0) Dim wb As New weui Dim dr As DataRow = DataTables("项目保险管理").SQLFind("项目名称 = \'" & _Userxmmc & "\' and 保险类别 = \'" & e.getvalues("name") & "\'","_Identify Desc") If dr IsNot Nothing Then msgbox(e.getvalues("name")) wb.AddForm("","form1","Insurance_filter.htm?name=" & e.getvalues("name")) With wb.AddInputGroup("form1","保单基本信息","保单基本信息") With .AddInput("保险类别","保险类别","Text") .Value = dr("保险类别") .Readonly= True End With With .AddInput("保单编号","保单编号","Text") .Value = dr("保单编号") .Readonly= True End With
............
wb.InsertHTML("<div style=\'height:50px\'></div>") wb.AddPage("form1","page1").Attribute = "style=\'position: fixed;bottom: 0;right: 0;left: 0\'" \'增加1个page With wb.AddButtonGroup("page1","btg2", False) .Add("btn1", "首页", "", "default.htm") .Add("btn2", "返回", "", "Insurance.htm") End With e.WriteString(wb.Build) Else With wb.AddMsgPage("","msgpage","查询完成","没有查询到该项目" & dr("保险类别") & "的相关数据!") .icon = "info" \'改变图标"success","info","warn",对应的图标分别是 .AddButton("btn2", "首页", "default.htm") End With e.WriteString(wb.Build) Return Nothing \'必须返回 End If
[此贴子已经被作者于2022/5/6 13:36:47编辑过]
|
-- 作者:cd_tdh
-- 发布时间:2022/5/6 15:29:00
--
我是想这样,这个意思,写出来了
Dim e As object = args(0) Dim wb As New weui Dim drs As List(Of String) = DataTables("项目保险管理").SQLGetValues("保险类别") If drs.Count > 0 Then For Each dr As String In drs With wb.AddListGroup("", dr,dr) .Add(dr,dr, "查看详情", "Insurance_filter.htm?name=" & dr, "./images/" & dr & ".png") End With Next wb.InsertHTML("<div style=\'height:50px\'></div>") wb.AddPage("","page1").Attribute = "style=\'position: fixed;bottom: 0;right: 0;left: 0\'" \'增加1个page With wb.AddButtonGroup("page1","btg2", False) .Add("btn1", "首页", "", "default.htm") End With End If e.WriteString(wb.Build)
|