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)
|