--
很多人基本都不会做调试,或者是懒得写调试代码
Dim e As object = args(0)
\'Dim e As RequestEventArgs = args(0)
Dim wb As New weui
msgbox(“name=” & e.getvalues("name"))
Dim dr As DataRow = DataTables("实名制管理").SQLFind("项目名称 = \'" & _Userxmmc & "\' and 姓名 = \'" & e.getvalues("name") & "\'")
msgbox(dr IsNot Nothing)
If dr IsNot Nothing Then
msgbox(“e.PostValues.Count=” & e.PostValues.Count)
If e.PostValues.Count = 0 Then
msgbox(1)
wb.AddForm("","form1","ReNamejccx_name.htm")
With wb.AddInputGroup("form1","工人信息","工人信息")
With .AddInput("姓名","姓  名","Text")
.Value = dr("姓名")
.Readonly= True
End With
With .AddInput("身份证号码","身份证号","number")
.Value = dr("身份证号码")
.Readonly= True
End With
With .AddInput("家庭地址","家庭地址","Text")
.Value = dr("家庭地址")
.Readonly= True
End With
With .AddInput("进场日期","进场日期","date")
.Value = dr("进场日期")
.Readonly= True
End With
.AddInput("退场日期","退场日期","date")
.AddInput("退场登记人","退场登记人","Text")
.AddInput("退场登记日期","退场登记日期","date")
End With
With wb.AddButtonGroup("form1","btg2", True)
.Add("btn1", "重新查询", "", "ReNamejccx.htm")
.Add("btn2", "保  存", "submit")
End With
e.WriteString(wb.Build)
Else
msgbox(2)
Dim nms() As String = {"退场日期","退场登记人","退场登记日期"} \'不能为空的列名数组
For Each nm As String In nms
msgbox("nm=" & nm)
If e.PostValues.ContainsKey(nm) = False Then \'生成错误提示页
msgbox("错误")
With wb.AddMsgPage("","msgpage","保存失败", nm & "列不能为空!")
.icon = "Warn" \'改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return Nothing \'必须返回
End If
Next
nms = New String() {"退场日期","退场登记人","退场登记日期"} \'重新定义了nms数组,增加了两列.
Dim ds As DataRow = DataTables("实名制管理").SQLFind("项目名称 = \'" & _Userxmmc & "\' and 姓名 = \'" & e.getvalues("name") & "\'")
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
ds(nm) = e.PostValues(nm)
End If
Next
ds.save()
\'保存并生成增加成功提示页面
With wb.AddMsgPage("","msgpage","保存成功", "你是否继续修改其他人员退场信息") \'生成成功提示页
.AddButton("btn2","返回首页","default.htm")
.AddButton("btn1","继续修改","ReNamejccx.htm")
End With
e.WriteString(wb.Build)
End If
End If
这段代码是哪个页面的?"ReNamejccx_name.htm"?还是"ReNamejccx.htm"?