Foxtable(狐表)用户栏目专家坐堂 → 自定义登录窗口


  共有3164人关注过本帖平板打印复制链接

主题:自定义登录窗口

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


加好友 发短信
等级:童狐 帖子:200 积分:1380 威望:0 精华:0 注册:2013/11/6 17:35:00
自定义登录窗口  发帖心情 Post By:2014/2/19 17:42:00 [只看该作者]

帮助里的自定义登录窗口里登录时

"确定"按钮的代码为:

Dim UserName As String = e.Form.Controls("UserName").Value
Dim cmd As New SQLCommand
Dim dt As DataTable
Dim dr As DataRow
cmd.C
If UserName = "" Then
Messagebox.show("请选择用户!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
cmd.CommandText = "Select * From {Users} Where [Name] = '" & UserName & "'"
dt = cmd.ExecuteReader
If dt.DataRows.Count = 0 Then
Messagebox.show("此用户不存在!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Return
End If
dr = dt.DataRows(0)
If e.Form.Controls("PassWord").Value = dr("Password") Then
_UserName = UserName
_UserGroup = dr("Group")
e.Form.Close
Else
Messagebox.show("密码错误!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
End If

 

 

当没有数据库  使用内部数据表的时候 该怎么做   应该也有一页帮助吧


 回到顶部