Dim e As RequestEventArgs = args(0)
Dim wb As New WeUI
Select Case e.Path
Case "test.htm"
If e.PostValues.Count = 0 Then
wb.AddPageTitle("","ph1","瓮安县","廉洁履职【靶向整治】专项行动调查问卷")
wb.AddForm("","form1","test.htm")
With wb.AddRadioGroup("form1","rdg1","【一】你的职业或身份是?")
.Add("职业或身份_工人","A工人")
.Add("职业或身份_干部","B干部")
.Add("职业或身份_农民","C农民")
.Add("职业或身份_个体","D个体")
.Add("职业或身份_无业","E无业")
.Add("职业或身份_学生","F学生")
End With
With wb.AddRadioGroup("form1","rdg2","【二】你受教育的程度是?")
.Add("bw211","未上过学")
.Add("bw221","小学")
.Add("bm231","初中")
.Add("bm241","高中")
.Add("bm251","大专")
.Add("bm261","本科及以上")
End With
With wb.AddRadioGroup("form1","rdg3","【三】我单位是否履行职责,是否严格按规定办事?")
.Add("bw312","A是")
.Add("bw322","B否")
End With
With wb.AddInputGroup("form1","ipg3","")
.AddTextArea("bz",3).Placeholder = "请填写我单位是否履行职责,是否严格按规定办事?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg4","【四】我单位队伍管理是否严格,工作作风是否扎实?")
.Add("bw412","A是")
.Add("bw422","B否")
End With
With wb.AddInputGroup("form1","ipg4","")
.AddTextArea("bz",3).Placeholder = "请填写我单位队伍管理是否严格,工作作风是否扎实?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg5","【五】我单位人员是否存在滥用职权?以权谋私?吃拿卡要现象?")
.Add("bw512","A是")
.Add("bw522","B否")
End With
With wb.AddInputGroup("form1","ipg5","")
.AddTextArea("bz",3).Placeholder = "请填写我单位人员是否存在滥用职权?以权谋私?吃拿卡要现象?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg6","【六】我单位工作人员能否积极主动为群众办实事?办好事?")
.Add("bw612","A能")
.Add("bw622","B不能")
End With
With wb.AddInputGroup("form1","ipg6","")
.AddTextArea("bz",3).Placeholder = "请填写我单位工作人员能否积极主动为群众办实事?办好事?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg7","【七】我单位是否存在办事拖拉?推诿扯皮?效率低下的现象?")
.Add("bw712","A是")
.Add("bw722","B否")
End With
With wb.AddInputGroup("form1","ipg7","")
.AddTextArea("bz",3).Placeholder = "请填写我单位是否存在办事拖拉?推诿扯皮?效率低下的现象?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg8","【八】我单位人员是否存在利用职权或职务影响为特定关系人承揽工程打招呼的现象?")
.Add("bw812","A是")
.Add("bw822","B否")
End With
With wb.AddInputGroup("form1","ipg8","")
.AddTextArea("bz",3).Placeholder = "请填写我单位人员是否存在利用职权或职务影响为特定关系人承揽工程打招呼的现象?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg9","【九】我单位人员是否存在伙同他人投资经商办企业?占干股?放高利贷的现象?")
.Add("bw912","A是")
.Add("bw922","B否")
End With
With wb.AddInputGroup("form1","ipg9","")
.AddTextArea("bz",3).Placeholder = "请填写我单位人员是否存在伙同他人投资经商办企业?占干股?放高利贷的现象?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg10","【十】我单位人员是否存在教唆支持亲友和群众弄虚作假获取不正当利益的现象?")
.Add("bw1012","A是")
.Add("bw1022","B否")
End With
With wb.AddInputGroup("form1","ipg10","")
.AddTextArea("bz",3).Placeholder = "请填写我单位人员是否存在教唆支持亲友和群众弄虚作假获取不正当利益的现象?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg11","【十一】我单位对群众反映的问题能否积极主动地予以解决?")
.Add("bw1112","A是")
.Add("bw1122","B否")
End With
With wb.AddInputGroup("form1","ipg11","")
.AddTextArea("bz",3).Placeholder = "请填写我单位对群众反映的问题能否积极主动地予以解决?的具体内容 "
End With
With wb.AddRadioGroup("form1","rdg12","【十二】我单位是否存在与民争利?欺压百姓等现象 ?")
.Add("bw1212","A是")
.Add("bw1222","B否")
End With
With wb.AddInputGroup("form1","ipg13","")
.AddTextArea("bz",3).Placeholder = "请填写我单位是否存在与民争利?欺压百姓等现象?的具体内容 "
End With
With wb.AddInputGroup("form1","ipg32","【十三】您对我单位的意见或建议:")
.AddTextArea("bz",5).Placeholder = "请填写你对我单位的意见或建议"
End With
With wb.AddInputGroup("form1","ipg101")
.AddInput("提交时间","提交时间","date")
End With
With wb.AddButtonGroup("form1","btg1",True)
.Add("btn1", "确定", "submit")
End With
Else
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","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return "" ' '必须返回
End If
Next
nms = New String() {"职业或身份_工人","职业或身份_干部","职业或身份_农名","职业或身份_个体","职业或身份_无业","职业或身份_学生","教育程度_未上过学","教育程度_小学","教育程度_初中","教育程度_高中","教育程度_大专","教育程度_本科及以上","是否履职按规定办事_是","是否履职按规定办事_否","是否履职按规定办事_具体表现","队伍管理是否严格扎实_是","队伍管理是否严格扎实_否","队伍管理是否严格扎实_具体表现","是否滥用职权吃拿卡要_是","是否滥用职权吃拿卡要_否","是否滥用职权吃拿卡要_具体表现","是否主动为群众办事_能","是否主动为群众办事_不能","是否主动为群众办事_具体表现","是否办事拖拉效率低下_是","是否办事拖拉效率低下_否","是否办事拖拉效率低下_具体表现","是否利用职务影响_是","是否利用职务影响_否","是否利用职务影响_具体表现","是否有投资经商等_是","是否有投资经商等_否","是否有投资经商等_具体表现","是否弄虚作假等_是","是否弄虚作假等_否","是否弄虚作假等_具体表现","能够主动解决问题_是","能够主动解决问题_否","能够主动解决问题_具体表现","是否与民争利欺压百姓_是","是否与民争利欺压百姓_否","是否与民争利欺压百姓_具体表现","意见或建议","提交时间","调查编号"} '重新定义了nms数组,增加了两列.
Dim dr As DataRow = DataTables("靶向问卷").AddNew()
dr("提交时间")=Date.Today
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
dr(nm) = e.PostValues(nm)
End If
Next
'If dr.Name = "提交时间" Then
If dr.IsNull("提交时间") Then
dr("调查编号") = Nothing
Else
Dim bh As String = Format(dr("提交时间"),"yyyyMMdd") '取得调查编号的8位前缀
If dr("调查编号").StartsWith(bh) = False '如果调查编号的前8位不符
Dim max As String
Dim idx As Integer
max = DataTables("靶向问卷").Compute("Max(调查编号)","提交时间 = #" & dr("提交时间") & "# And [_Identify] <> " & dr("_Identify")) '取得该天的最大调查编号
If max > "" Then '如果存在最大调查编号
idx = CInt(max.Substring(9,3)) + 1 '获得最大调查编号的后三位顺序号,并加1
Else
idx = 1 '否则顺序号等于1
End If
dr("调查编号") = bh & "-" & Format(idx,"000")
End If
End If
'End If
dr.save()
End If
'
'保存并生成增加成功提示页面
End Select
e.WriteString(wb.Build)