Foxtable(狐表)用户栏目专家坐堂 → web数据源的问题


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

主题:web数据源的问题

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


加好友 发短信
等级:三尾狐 帖子:647 积分:5702 威望:0 精华:0 注册:2017/4/7 12:15:00
web数据源的问题  发帖心情 Post By:2018/7/10 18:45:00 [只看该作者]

出现“e”是private ,因此它在此上下文中不可访问,完全按帮助做的

假定服务端建立的本地数据源的名称为"Orders",现在将HttpRequest事件代码设置为:

Dim Verified As Boolean
If
 e.PostValues.ContainsKey("username"AndAlso e.PostValues.ContainsKey("password"Then
    
'实际开发的时候,请改为根据用户表验证身份
    
Dim username As String  = e.PostValues("username")
    Dim password As String  = e.PostValues("password")
    If username = 
"
张三" AndAlso password = "888" Then
        Verified  = True
    End 
If

End
 If
If
 Verified = False Then
    e.AppendCookie("Error",
"
用户身份验证失败!"'通过Cookie返回错误信息.
    
Return
End
 If
Select
 Case e.Path
    
Case "DataServer.htm"
        e.AsDataServer("Orders")  
'将一个本地数据源公开为Web数据源

End
 Select


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


加好友 发短信
等级:超级版主 帖子:106949 积分:543964 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2018/7/10 19:56:00 [只看该作者]

重启一下项目就可以了

 回到顶部