以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  该账号已经登录,不能重复登录是怎么回事  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=107489)

--  作者:程程
--  发布时间:2017/9/28 20:19:00
--  该账号已经登录,不能重复登录是怎么回事

  开发版的,做了个登录入口,却提示我该账号已经登录,不能重复登录!请闻这是怎么回事呀,我确实没有做别的登录啊

图片点击可在新窗口打开查看
图片点击可在新窗口打开查看

--  作者:程程
--  发布时间:2017/9/28 20:20:00
--  

图片点击可在新窗口打开查看此主题相关图片如下:tim图片2017092820150图片点击可在新窗口打开查看点击浏览该文件

--  作者:有点甜
--  发布时间:2017/9/28 20:23:00
--  

 你的登陆窗口的登陆按钮代码怎么写的?


--  作者:程程
--  发布时间:2017/9/29 9:13:00
--  
Dim dr As DataRow
Dim Ok As Boolean
Dim zhanghao As String = e.Form.Controls("账号1").Value
Dim mima As String = e.Form.Controls("密码1").Value
If zhanghao = Nothing Then
    MessageBox.Show("请输入您的登录账号!", "错误提示!",MessageBoxButtons.OK,MessageBoxIcon.Information)
    e.Cancel = True
ElseIf mima = Nothing Then
    MessageBox.Show("请输入您的登录密码!", "错误提示!",MessageBoxButtons.OK,MessageBoxIcon.Information)
    e.Cancel = True
Else
    DataTables("账户管理").LoadFilter= "[用户账号] = \'" & zhanghao & "\'"
    DataTables("账户管理").Load
    dr = DataTables("账户管理").Find("[用户账号] = \'" & zhanghao & "\'")
    If dr Is Nothing Then
        Messagebox.show("登陆账号和密码不一致!","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Cancel = True
    ElseIf dr("用户密码") <> MD5Encrypt(mima) Then \' 注意这里的MD5加密. 
        Messagebox.show("登陆账号和密码不一致!","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Cancel = True
    ElseIf dr("用户状态") = True Then
        Messagebox.show("该账号已经登陆,不能重复登陆!","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Cancel = True
    ElseIf dr("账号状态") = False Then
        Messagebox.show("该账号已经被锁定,禁止登录!","错误提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
        e.Cancel = True
    Else
        dr("用户状态") = True
        DataTables.Save()
        e.Form.BaseForm.Hide()
        e.Form.close
        Forms("主界面").Open()
    End If
End If

--  作者:有点甜
--  发布时间:2017/9/29 9:27:00
--  

 说明你的用户状态=True。

 

 你是不是在退出程序的时候,没有把用户状态设置成false?或者是异常退出程序导致用户状态依然是true?

 

 你要做一个解锁功能,动态将true改成false。


--  作者:程程
--  发布时间:2017/9/29 9:39:00
--  
谢谢指点,已解决