发送人员没有显示出来,代码见下面红色部分 麻烦老师们指导下 谢谢!
此主题相关图片如下:22.png
代码如下:
Case "AddNew.htm"
If e.PostValues.Count = 0 Then
wb.AddForm("","form1","addnew.htm")
With wb.AddInputGroup("form1","ipg1","信息编辑")
.AddInput("信息时间","信息时间","Date") '前一个"姓名"是ID,后一个"姓名"是标题
' .AddInput("信息类别","信息类别","text")
Dim filter1 As String = "表名 = '信息列表' and 列名 = '信息类别' and 停用 = false"
Dim fdr1 As DataRow = DataTables("列项设置").Find(filter1)
If fdr1 IsNot Nothing Then
Dim abc1 As String=fdr1("下拉选项").replace(",", "|")
.AddSelect("信息类别","信息类别",abc1)
End If
Dim filter As String = "表名 = '干警信息' and 列名 = '备注' and 停用 = false"
Dim fdr As DataRow = DataTables("列项设置").Find(filter)
If fdr IsNot Nothing Then
Dim abc As String=fdr("下拉选项").replace(",", "|")
.AddSelect("发送对象","发送对象",abc)
End If
Dim filter2 As String = "表名 = '干警信息' and 列名 = '姓名' and 停用 = false"
Dim fdr2 As DataRow = DataTables("列项设置").Find(filter2)
If fdr2 IsNot Nothing Then
Dim abc2 As String=fdr2("下拉选项").replace(",", "|")
.AddSelect("发送人员","发送人员",abc2)
End If
.AddSelect("发送平台","发送平台","移动短信|阿里云短信")
.AddInput("拟发送时间","拟发送时间","Date")
End With
With wb.AddInputGroup("form1","ipg2","信息内容")
.AddTextArea("信息内容",10).Placeholder = "请输入500字以内的备注"
End With
With wb.AddButtonGroup("form1","btg1",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
Functions.Execute("yidongduanzengjiagaozhi")
With wb.AddMsgPage("","msgpage","增加成功", "好好学习,天天向上") '生成成功提示页
.AddButton("btn1","继续增加","addnew.htm")
End With
e.WriteString(wb.Build)
End If