Foxtable(狐表)用户栏目专家坐堂 → 注册时提示不能注册相同的用户名。


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

主题:注册时提示不能注册相同的用户名。

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


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/31 9:43:00 [显示全部帖子]


 回到顶部
帅哥哟,离线,有人找我吗?
有点色
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:13837 积分:69650 威望:0 精华:0 注册:2016/11/1 14:42:00
  发帖心情 Post By:2017/3/31 9:49:00 [显示全部帖子]

Dim txt_paw As WinForm.TextBox = e.Form.Controls("txt_paw")
Dim txt_username As WinForm.TextBox = e.Form.Controls("txt_username")
If txt_username.Value = "" Or txt_paw.Value="" Then
    Messagebox.show("用户名和密码不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
Dim fdr As DataRow = DataTables("tblusers").SQLFind("usname = '" & txt_Username.Text & "'")
If fdr IsNot Nothing Then
    Messagebox.show("该用户名已被注册!请使用其他用户名","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
    Return
End If
Dim r As Row=Tables("tblusers").AddNew
r("usname")=txt_username.Value
r("paw")=txt_paw.Value
r.Save()
Messagebox.show("账号注册成功!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)

 回到顶部