Dim e As RequestEventArgs = args(0)
Dim wb As New weui
Dim PageNumber As Integer = e.GetValues("page")
Dim PrimaryKey As String = e.GetValues("key")
Dim PageURL = "faceid.htm?page=" & PageNumber
If e.PostValues.Count = 0 Then \'生成编辑页面
Dim dr As DataRow = DataTables("USERSlist").SQLFind("[工号]=" & PrimaryKey)
If dr IsNot Nothing Then
wb.AddForm("", "form1", "faceid.htm?" & "page = " & PageNumber & "&key = " & PrimaryKey )
\'
With wb.AddInputGroup("form1", "ipg1", "基础信息")
.AddInput("工号", "工号", "text").value = dr("工号")
.AddInput("姓名", "姓名", "text").Value = dr("姓名")
.AddInput("部门", "部门", "Text").Value = dr("部门")
End With
With wb.AddInputGroup("form1", "ipg22", "照片上传")
With .AddUploader("up2", "照片上传", True)
.AllowDelete = True \'允许删除
.Incremental = True \'允许重复选择文件或连续拍照
.ScaleWidth = 1000
End With
End With
With wb.AddButtonGroup("form1", "btg1", True)
.Add("btn1", "确定", "button").Attribute= "" \'调用js函数上传
End With
wb.AddToast("", "tst1", "正在上传", 1)
wb.AddToast("", "tst2", "上传成功", 0)
wb.AddToast("", "tst3", "上传失败", 0).Icon = "warn"
wb.AppendHTML("<script src=\'./lib/ajaxform.js\'></script>") \'引入脚本文件
Else
With wb.AddMsgPage("", "msgpage", "编辑失败", "此用户可能已经被删除!") \'提示用户此订单不存在.
.icon = "Warn"
.AddButton("btn1", "返回", "rzfilter.htm") \'生成返回原来页面的按钮
End With
End If