Foxtable(狐表)用户栏目专家坐堂 → [求助]已注册用户未被批准不准登陆,怎么改代码?


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

主题:[求助]已注册用户未被批准不准登陆,怎么改代码?

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


加好友 发短信
等级:幼狐 帖子:81 积分:805 威望:0 精华:0 注册:2015/9/19 12:53:00
  发帖心情 Post By:2016/5/6 23:07:00 [显示全部帖子]

Dim dt As DataTable 
Dim cmd As New SQLCommand 
cmd.C 
cmd.Command Text ="S elect 系统批准,公司批准 From {Users} Where Name = '" & Name & "' and pass = '" & pass & "'" 
dt = cmd.Execute Reader
For Each dr As DataRow In dt.DataRows 
 if dr isnot notthing then 
 if val(dr("系统批准")) = 0 orelse val(dr("公司批准")) = 0 then 
 Messagebox.Show("未授权","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) 
 end if 
 exit for
 else 
 Messagebox.Show("用户或密码错误","提示",MessageBoxButtons.OK,MessageBoxIcon.Information) 
 end if 
Next
[此贴子已经被作者于2016/5/6 23:14:52编辑过]

 回到顶部