Dim e As RequestEventArgs = args(0)
Dim ftp1 As New FtpClient
Dim wb As New weui
ftp1.Host=
ftp1.Account =
ftp1.Password =
Dim dr As DataRow = DataTables("中考表").sqlfind("sfzh = '" & e.Cookies("username") & "'")
Dim dr1 As DataRow = DataTables("生地报名库").SQLfind("身份证号= '" & e.Cookies("username") & "'","_identify desc")
Dim dr2 As DataRow = DataTables("学生信息").SQLfind("身份证件号= '" & e.Cookies("username") & "'","_identify desc")
Dim dr3 As DataRow = DataTables("用户").sqlfind("身份证号= '" & e.Cookies("username") & "'")
If dr Is Nothing
dr=DataTables("中考表").addnew()
Else
DataTables("中考表").loadfilter ="sfzh = '" & e.Cookies("username") & "'"
DataTables("中考表").load
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("bswy")="1"
dr("kshlb")="1"
If dr3 IsNot Nothing
dr("xxmc")= dr3("group")
End If
dr.save()
If e.PostValues.Count = 0 Then
With wb.AddTabBar("", "tb1", 1)
Dim a1= .AddPage("page1","中考报名","./images/21.png")
.AddPage("page2","注意事项","./images/23.png")
.AddPage("page3","有关通知","./images/24.png")
End With
wb.AddForm("page1","form1","zkbm.htm")
With wb.AddInputGroup("form1","ipg1","用户:" & e.Cookies("username") & ",请仔细填写每项信息")
If dr("xjh") >""
Dim Inxjh = .AddInput("xjh","学籍号码:","text")
Inxjh.value=dr("xjh")
Inxjh.readonly = dr("手机锁定")
Inxjh.Attribute="style = 'color:blue'"
Else
If dr1("学籍号")>""
Dim Inxjh= .AddInput("xjh","学籍号码:","text")
Inxjh.value=dr1("学籍号")
Inxjh.readonly = dr("手机锁定")
Inxjh.Attribute="style = 'color:blue'"
Else
Dim Inxjh=.AddInput("xjh","学籍号码:","text")
Inxjh.value=dr2("学籍号")
Inxjh.readonly = dr("手机锁定")
Inxjh.Attribute="style = 'color:blue'"
End If
End If
If dr("xm") >""
Dim Inxm =.AddInput("xm","姓 名:","text")
Inxm.value=dr("xm")
Inxm.readonly = dr("手机锁定")
Inxm.Attribute="style = 'color:blue'"
Else
If dr1("姓名")>""
Dim Inxm =.AddInput("xm","姓 名:","text")
Inxm.value=dr1("姓名")
Inxm.readonly = dr("手机锁定")
Inxm.Attribute="style = 'color:blue'"
Else
Dim Inxm= .AddInput("xm","姓 名:","text").value=dr2("学生姓名")
Inxm.readonly = dr("手机锁定")
Inxm.Attribute="style = 'color:blue'"
End If
End If
wb.AppendHTML("<script type='text/javascript' src='./lib/common.js'></script>", True)
wb.AppendHTML("<script type='text/javascript' src='./lib/camera.js'></script>")
wb.InsertHTML("<img src='/xp/511011200201038010' width='50' height='50'>")
With .AddUploader("up128","上传照片:",False)
.TextPosition = 0 '标题靠左
.AllowDelete = True '允许删除
.ScaleWidth = 400 '自动压缩图片宽度为400个像素,高度等比例压缩
End With
。。。
Dim str3 As String = " |非借考生|借考生"
If dr.Isnull("是否借考")
Dim Insfjk= .AddSelect("是否借考","是否借考:",str3)
Insfjk.enabled= not dr("手机锁定")
Insfjk.Attribute="style = 'color:red'"
Else
Dim Insfjk= .AddSelect("是否借考","是否借考:",str3.replace(dr("是否借考"), "[" & dr("是否借考") & "]"))
Insfjk.enabled= not dr("手机锁定")
Insfjk.Attribute="style = 'color:red'"
End If
End With
With wb.AddButtonGroup("form1","btg1")
.Add("btn1", "保存", "submit")
.Add("btn2", "锁定", "button").Attribute = ""
.Add("btn3", "退出", "button").Attribute = ""
End With
With wb.AddPanelGroup("page2","pg1","注意事项")
'待加...
End With
wb.AppendHTML("<script src='./lib/order.js'></script>") '引入
e.WriteString(wb.Build) '生成网
If e.GetValues.ContainsKey("lock") Then '如果地址中有page参数
Dim zds() As String = {"xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","yzbm"} '不能为空的列名数组
For Each zd As String In zds
If dr(zd)=""
e.WriteString(wb.Build)
Return ""
e.WriteString(wb.Build)
End If
Next
dr("手机锁定")= True
dr.save()
With wb.AddMsgPage("form1","msgpage","锁定成功数据不能再修改不能再修改", "") '生成成功提示页
.AddButton("btn7","返回","zkbm.htm")
End With
End If
Else
Dim nms() As String = {"xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","yzbm"} '不能为空的列名数组
For Each nm As String In nms
If e.PostValues(nm) = "" Then '生成错误提示页
With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return "" '必须返回
End If
Next
nms = New String() {"xjh","xm","lxdh","txdz","sdbmh","政治面貌","民族","考生类别","户口性质","综合素质","是否借考","bxxjnx","bjdm","sfzh","yzbm"} '重新定义了nms数组,增加了两列.
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
dr(nm) = e.PostValues(nm)
End If
Next
If trim(e.postvalues("是否借考"))="借考生"
dr("jks") = "1"
Else
dr("jks")= Nothing
End If
DataTables("中考表").DataCols("政治面貌").RaiseDataColChanged()
dr.save()
For Each key As String In e.Files.Keys
For Each fln As String In e.Files(key)
e.SaveFile(key,fln,"c:\web\uploadfiles\" & fln)
Dim ifo As new FileInfo("c:\web\uploadfiles\" & fln)
。。。
Next
Next
With wb.AddMsgPage("","msgpage","保存成功,确定无误锁定,锁定后将不能再修改", "") '生成成功提示页
.AddButton("btn6","返回","zkbm.htm")
End With
wb.AppendHTML("<script src='./lib/order.js'></script>") '引入
e.WriteString(wb.Build)
End If
老师,请问两段红色代码的问题:
1、我想这样如果有这个人的相片,在这个位置插入相片,这样写没显示出来,只在页面底部有个图框,该怎样改?
2、我为锁定键增加功能锁定,可以锁定,但想在锁定后给个提示没有出来,该怎样改?
[此贴子已经被作者于2018/4/7 15:33:28编辑过]