Foxtable(狐表)用户栏目专家坐堂 → 保存选择


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

主题:保存选择

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


加好友 发短信
等级:八尾狐 帖子:1953 积分:15015 威望:0 精华:0 注册:2016/4/28 9:58:00
保存选择  发帖心情 Post By:2017/9/13 21:11:00 [显示全部帖子]

Dim e As RequestEventArgs = args(0)
Dim  wb As New weui
Dim dr As DataRow
Dim nms As String()
dr = DataTables("用户").sqlfind("[_Identify] = '" & e.Cookies("jssfzh") & "'")
nms = new 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 true'必须返回
    End If
Next
If e.postvalues("角色")="班主任"
    nms = new 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 true'必须返回
        End If
    Next
End If

If e.postvalues("group")<> dr("group")
    With wb.AddMsgPage("","msgpage","特别提示", "是否确定调出该教师")
        .icon = "Warn" '改变图标
        .AddButton("btn1","是")
        .AddButton("btn2","否").Attribute = ""
        e.WriteString(wb.Build)
        Return true'必须返回
    End With
End If



dr("group")= e.postvalues("group")
dr("角色")= e.postvalues("角色")
If e.postvalues("角色")="班主任"
    dr("班级")= e.postvalues("学段") & e.postvalues("学级") & e.postvalues("班级")
Else
    dr("班级")= ""
End If
dr.Save()
'wb.AddToast("","t1", "已经保存",0).Msec= 1500
With wb.AddMsgPage("","msgpage","保存信息成功", "")
    .icon = "success" '改变图标
    .AddButton("btn1","返回").Attribute = ""
End With
e.WriteString(wb.Build)


老师,我想做个选择,如果是则执行后面的保存,如果否则返回,现在是提示调用目标错误,请问这该如何写

 回到顶部