Select Case e.Path
Case "kffk.htm"
wb.AddPageTitle("","pageheader","客户反馈表","艾迪尔事业部")
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","kffk.htm")
With wb.AddInputGroup("form1","ipg1","您的基本信息")
.AddInput("日期","日期:","date")
.AddInput("姓名","姓名:","Text")
.AddInput("楼盘","您的楼盘:","Text")
.AddInput("单元","单元:","Text")
.AddInput("房号","房号:","Text")
End With
With wb.AddInputGroup("form1","ipg2","售前评价")
.AddTextArea("其他",1).Placeholder = "10分最高分,1分最低分"
.AddSelect("着装整齐","着装整齐","选择|10|9|8|7|6|5|5|4|3|2|1")
.AddSelect("文明施工","文明施工","选择|10|9|8|7|6|5|5|4|3|2|1")
.AddSelect("产品保护","产品保护","选择|10|9|8|7|6|5|5|4|3|2|1")
.AddSwitch("文明施工","文明施工是否满意")
.AddSwitch("现场清洁","现场清洁是否满意" ,True)
.AddSwitch("服务态度","服务态度是否满意" ,True)
.AddSwitch("颜色材质","颜色材质是否满意", True)
.AddSwitch("工程进度","施工进度是否满意", True)
.AddSwitch("店面服务","店面服务是否满意", True)
.AddSwitch("设计满意度","设计效果是否满意", True)
.AddSwitch("现场安装服务","现场安装是否满意", True)
.AddSwitch("销售人员服务","销售服务是否满意", True)
.AddSelect("总体服务","总体打分","选择|10|9|8|7|6|5|5|4|3|2|1")
.AddTextArea("建议与意见",5).Placeholder = "这里需要您的宝贵评语:您的一分钟,是我们成长的方向,提高管理,服务水平."
.AddTextArea("建议与意见",5).Placeholder = "这里需要您对我们安装团队评价!您的一分钟,是我们成长的方向"
End With
'With wb.AddInputGroup("form1","ipg8","文件上传")
'With .AddUploader("up128","照片",True)
'.AllowDelete = True '允许删除
'.Incremental = True '允许 重复选择文件或连续拍照
'End With
'End With
With wb.AddButtonGroup("form1","btg8",True)
.Add("btn1", "确定评价", "submit")
End With
e.WriteString(wb.Build)
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()
For Each nm As String In nms
If e.PostValues.ContainsKey(nm) Then
dr(nm) = e.PostValues(nm)
End If
Next
wb.InsertHTML("您的评价如下:<br/>")
For Each key As String In e.PostValues.Keys
wb.InsertHTML(key & ":" & e.PostValues(key) & "<br/>")
Next
'保存并生成增加成功提示页面
dr.save()
With wb.AddMsgPage("","msgpage","增加成功", "感谢您的支持,艾迪尔的发展离不开您的信任") '生成成功提示页
.AddButton("btn1","继续添加","kffk.htm")
End With
e.WriteString(wb.Build)
End If
End Select