Dim e As RequestEventArgs = args(0)
Dim wb As New weui
'msgbox("进函数了")
wb.AppendHTML("<link rel='stylesheet' href='../ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.css'/>",True) '引入样式文件,参数True表示添加到head区
wb.AppendHTML("<link rel='stylesheet' href='../xdf/img/main.css'/>",True) '引入样式文件
wb.AppendHTML("<script src='../ajax/libs/jquery/1.7.1/jquery.min.js'></script>",True) '引入jquery
wb.AppendHTML("<script src='../ajax/jquery.mobile/1.1.1/jquery.mobile-1.1.1.min.js'></script>",True) '引入jquery
wb.AppendHTML("<script src='../scripts/main.js'></script>",True) '引入jquery
wb.AppendHTML("<div data-theme='g' data-role='header' data-position='fixed'><h1>需求登记</h1></div>") '页眉
' wb.AppendHTML("<div data-theme='g' data-role='footer' data-position='fixed'><h3>咨询电话:000*****</h3></div>") '页脚
wb.AppendHTML("<div data-theme='g' data-role='footer'><h3>咨询电话:0000-0000</h3></div>") '页脚
wb.InsertHTML("<div data-theme='g' data-role='page' data-position='fixed'>") '页内容样式 不能加</div> 加在好几个地方都不能正常显示页头页脚
'wb.InsertHTML("<h3 align='center' style='margin-top:5px'>服务满意度调查</h3>") '插入表头
If e.PostValues.Count = 0 Then '生成增加调查表网页
wb.AddForm("","form2","SoftRequire.htm")
'wb.InsertHTML("form1","<fieldset data-role='controlgroup' data-Type='horizontal'>") '起效果了 按钮分组
With wb.AddInputGroup("form2","ipg1","请输入系统名称")
' .AddTextArea("q8",2).Placeholder = "请输入80字以内的备注"
.AddInput("系统名称","系统名称","text")
End With
'msgbox(4)
With wb.AddInputGroup("form2","ipg2","请输入功能模块")
' .AddTextArea("q8",2).Placeholder = "请输入80字以内的备注"
.AddInput("功能模块","功能模块","text")
End With
'msgbox(5)
With wb.AddInputGroup("form2","ipg3","请仔细描述您的需求")
' .AddTextArea("q8",2).Placeholder = "请输入80字以内的备注"
.AddInput("需求描述","需求描述","text")
End With
With wb.AddInputGroup("form2","ipg4","您的联系方式")
.AddInput("科室","科室","text")
.AddInput("姓名","姓名","text")
'.AddInput("岗位","岗位","text")
.AddSelect("岗位","岗位","医生|护士|财务人员|工程师|行政人员") '第一个是数据库字段,第二个是 左边的提示
.AddInput("电话","电话","text")
.AddInput("提交日期","提交日期","date")
End With
With wb.AddButtonGroup("form2","btg1",True)
.Add("btn1", "确定", "submit")
End With
Else '保存新增的调查单
Dim dr As DataRow = DataTables("软件需求登记表").AddNew()
' Dim nms() As String = {"q1","q2","q3","q4","q5","q6","q7","q8","q9","q10","科室","姓名","岗位","电话","提交日期"}
' For Each nm As String In nms
' dr(nm) = e.PostValues(nm)
' ' msgbox(nm & e.PostValues(nm)) ' dr(nm) 为空值
' Next
' dr.Save()
'msgbox(1)
Dim nms() As String = {"系统名称","功能模块","需求描述","科室","姓名","岗位","电话","提交日期"}
For Each nm As String In nms
dr(nm) = e.PostValues(nm)
' msgbox(nm & e.PostValues(nm)) 'dr(nm) 为空值
Next
dr.Save()
' nms = new String(){"科室","姓名","岗位","电话","提交日期"}
' For Each nm As String In nms
' dr(nm) = e.PostValues(nm)
' Next
' dr.Save()
With wb.AddMsgPage("","msgpage","增加成功", "您的意见我们已经收到,感谢你的反馈!") '增加订单成功提示信息
.AddButton("btn1","继续增加","SoftRequire.htm")
' .AddButton("btn1","返回列表","list.htm")
End With
End If
e.WriteString(wb.Build) '生成网页
[此贴子已经被作者于2017/3/24 7:16:29编辑过]