以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- 对话问题 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=140393) |
-- 作者:刘林 -- 发布时间:2019/9/4 21:26:00 -- 对话问题 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 老师,上面当保存成功不弹出对话框,问题出在哪里?
|
-- 作者:有点蓝 -- 发布时间:2019/9/5 8:51:00 -- If e.PostValues.ContainsKey("lock") AndAlso e.PostValues("lock")="on" With wb.AddMsgPage("","msgpage","数据保存并锁定成功", "") .icon = "success" \'改变图标 .AddButton("btn1","返回").Attribute =";" End With dr("_locked")=True dr.Save() Else With wb.AddMsgPage("","msgpage","数据保存成功,但还没有锁定", "") .icon = "success" \'改变图标 .AddButton("btn1","返回").Attribute =";" End With End If
|