Dim e As RequestEventArgs = args(0)
Dim wb As New weui
wb.InsertHTML("<script src='../mui/js/mui.min.js'></script>")
wb.InsertHTML("<script Type='text/javascript' charset='utf-8'>mui.init();</script>")
Dim dr As DataRow
dr = DataTables("幼儿园基本情况表").sqlfind("[_Identify] = '" & e.Cookies("xxxxid") & "'")
For Each key As String In e.PostValues.Keys
If key <>"lock"
dr(key)=e.PostValues(key)
End If
Next
dr.Save()
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() {"幼儿人数","班数","专任教师人数","图书册数","保教费","学校占地面积","学校建筑面积"}
For Each nm As String In nms
If e.PostValues(nm) = 0 Then
With wb.AddMsgPage("","msgpage","请注意检查修改", nm & "不能为0!")
.icon = "Warn" '改变图标
.AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)
Return ""
End If
Next
If e.PostValues("lock")="on"
With wb.AddMsgPage("","msgpage","数据保存并锁定成功", "")
.icon = "success" '改变图标
.AddButton("btn1","返回").Attribute =";"
End With
dr("_locked")=True
dr.Save()
End If
If e.PostValues("lock")="off"
With wb.AddMsgPage("","msgpage","数据保存成功,但还没有锁定", "")
.icon = "success" '改变图标
.AddButton("btn1","返回").Attribute =";"
End With
End If
e.WriteString(wb.Build)
e.Handled=True
老师,上面当保存成功不弹出对话框,问题出在哪里?