HttpRequest事件代码:
Case "Xdcg_jbxx.htm"
Functions.Execute("下单常规基本信息录入",e)
Case "test.htm"
‘判断由Xdcg_jbxx.htm页面提交的数据
Dim nms() As String = {"公司","工程名称"} '不能为空的列名数组
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) = False Then '生成错误提示页
With wb.AddMsgPage("","msgpage","增加失败", nm & "列不能为空!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回","Xdcg_jbxx.htm") '如果有问题,返回Xdcg_jbxx.htm页面
End With
e.WriteString(wb.Build)
Return "" '必须返回
End If
Next
Dim wb As New WeUI
With wb.AddArticle("","ar1")
.AddTitle("h1",e.PostValues.ContainsKey("公司") ) '显示提交的数据
.AddTitle("h1",e.PostValues.ContainsKey("工程名称") )
End With
e.WriteString(wb.Build) '生成网页
--------------------
"下单常规基本信息录入"函数代码:
Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
wb.AddForm("","form1","test.htm") '把数据提交到test.htm页面
With wb.AddInputGroup("form1","ipg1","")
With .AddSelect("公司","公司","|" & _dt销售合同.SQLGetComboListString("公司","[合同类型] = '常规' And [执行状态] = '执行中' And [供货完结] = 0 And [业务员] = '" & _UserName & "'"))
.Attribute = "" ‘这些1楼发帖时被论坛屏蔽了,自己补上
End With
With .AddSelect("工程名称","工程名称","")
.Attribute = ""
End With
.AddSelect("浇注部位","浇注部位","")
.AddInput("业务员电话","业务员电话","text").Value = "123456789"
End With
With wb.AddButtonGroup("form1","btg1",False)
.Add("btn1", "下一步", "submit")
.Add("btn2", "返回", "", "default.htm")
End With
e.WriteString(wb.Build) '生成网页