Dim nms() As String = {"出勤人数"} '不能为空的列名数组
For Each nm As String In nms
‘MessageBox.Show(e.PostValues(nm)) '这里就已经出错了,因为PostValues没有"出勤人数",下面代码当然不会执行,去掉再测试
If e.PostValues.ContainsKey(nm) = False Then '生成错误提示页
With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn11","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return"" '必须返回
End If
Next