以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 地址栏返返回true (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=117028) |
-- 作者:刘林 -- 发布时间:2018/4/4 13:31:00 -- 地址栏返返回true Dim e As RequestEventArgs = args(0) Dim dr As DataRow = DataTables("中考表").sqlfind("sfzh = \'" & e.Cookies("username") & "\'") If dr Is Nothing dr=DataTables("中考表").addnew() End If dr("csny")= format(ReadBirthDay(e.Cookies("username")), "yyyyMMdd") If ReadSex(e.cookies("username"))="男" dr("xb")=1 End If If ReadSex(e.cookies("username"))="女" dr("xb")=2 End If DR("sfzh")= e.Cookies("username") dr.save() Dim dr1 As DataRow = DataTables("生地报名库").SQLfind("身份证号= \'" & e.Cookies("username") & "\'","_identify desc") Dim dr2 As DataRow = DataTables("学生信息").SQLfind("身份证件号= \'" & e.Cookies("username") & "\'","_identify desc") Dim wb As New weui If e.PostValues.Count = 0 Then wb.AddForm("","form1","zkbm.htm") With wb.AddInputGroup("form1","ipg1","请依次正确完整填写以下信息") .AddInput("sfzh","身份证号","text").value =e.Cookies("username") Dim In3 = .AddInput("csny","出生年月","text") In3.value = format(ReadBirthDay(e.Cookies("username")), "yyyyMMdd") In3.readonly = True If dr("xjh") >"" .AddInput("xjh","学籍号","text").value=dr("xjh") Else If dr1("学籍号")>"" .AddInput("xjh","学籍号","text").value=dr1("学籍号") Else .AddInput("xjh","学籍号","text").value=dr2("学籍号") End If End If If dr("xm") >"" .AddInput("xm","姓名","text").value=dr("xm") Else If dr1("姓名")>"" .AddInput("xm","姓名","text").value=dr1("姓名") Else .AddInput("xm","姓名","text").value=dr2("学生姓名") End If End If If dr("lxdh") >"" .AddInput("lxdh","联系电话","text").value=dr("lxdh") Else .AddInput("lxdh","联系电话","text").value=dr2("联系电话") End If If dr("txdz") >"" .AddInput("txdz","通讯地址","text").value=dr("txdz") Else .AddInput("txdz","通讯地址","text").value=dr2("通讯地址") End If .AddInput("sdbmh","报名号","text").value = dr1("报名号") If dr("xb") =1 .AddInput("xb","性别","text").value="男" End If If dr("xb") =2 .AddInput("xb","性别","text").value="女" End If \' If dr.Isnull("mz") \' .AddSelect("mz","民 族"," |" & DataTables("民族代码").SQLGetComboListString("民族","","代码")) \' Else \' .AddSelect("mz","民 族"," |" & DataTables("民族代码").SQLGetComboListString("民族","","代码").replace(dr("mz"), "[" & dr("mz") & "]")) \' End If If dr.Isnull("政治面貌") .AddSelect("政治面貌","政治面貌"," |" & DataTables("政治面貌").SQLGetComboListString("政治面貌","","代码")) Else .AddSelect("政治面貌","政治面貌"," |" & DataTables("政治面貌").SQLGetComboListString("政治面貌","","代码").replace(dr("政治面貌"), "[" & dr("政治面貌") & "]")) End If Dim str As String = " |3|2.5|2|1.5|1|0.5|0" If dr.Isnull("bxxjnx") .AddSelect("bxxjnx","本校学籍",str) Else .AddSelect("bxxjnx","本校学籍",str.replace(dr("bxxjnx"), "[" & dr("bxxjnx") & "]")) End If \'Dim str1 As String = " |农业户口|非农业户口" \' If dr.Isnull("hklb") \' .AddSelect("hklb","户口类别",str1) \'Else \' .AddSelect("hklb","户口类别",str1.replace(dr("hklb"), "[" & dr("hklb") & "]")) \' End If If dr.Isnull("bjdm") .AddSelect("bjdm","班级代码"," |" & DataTables("班").SQLGetComboListString("班","","序")) Else .AddSelect("bjdm","班级代码"," |" & DataTables("班").SQLGetComboListString("班","","序").replace(dr("bjdm"), "[" & dr("bjdm") & "]")) End If End With With wb.AddButtonGroup("form1","btg1",True) .Add("btn1", "保存", "submit",True) .Add("btn2", "退出", "button",True).Attribute="" End With e.WriteString(wb.Build) \'生成网 Else Dim nms() As String = {"txdz","lxdh","xjh","txdz","sdbmh","bjdm","bxxjnx","政治面貌"} \'不能为空的列名数组 For Each nm As String In nms If e.PostValues.containskey(nm) =False \'生成错 With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!") .icon = "Warn" \'改变图标 .AddButton("btn1","返回").Attribute = "" End With e.WriteString(wb.Build) Return "" End If Next nms = New String() {"txdz","lxdh","xjh","txdz","sdbmh","bjdm","bxxjnx","政治面貌"} \'重新定义了nms数组,增加了两列. For Each nm As String In nms If e.PostValues.ContainsKey(nm) Then dr(nm) = e.PostValues(nm) End If Next dr.save() With wb.AddMsgPage("","msgpage","保存成功", "祝会议顺利成功") \'生成成功提示页 .AddButton("btn1","返回","button").Attribute="" End With e.WriteString(wb.Build) End If 运行到红色时就白屏,地址:http://192.168.1.100/True 为什么? |
-- 作者:有点甜 -- 发布时间:2018/4/4 14:48:00 -- 这段代码没问题。肯定是你其它代码有影响。
请单独做一个实例发上来测试。 |