Foxtable(狐表)用户栏目专家坐堂 → 对话问题


  共有2912人关注过本帖树形打印复制链接

主题:对话问题

帅哥哟,离线,有人找我吗?
刘林
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
对话问题  发帖心情 Post By: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


老师,上面当保存成功不弹出对话框,问题出在哪里?

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:110648 积分:563148 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By: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

 回到顶部