我用自定义权限设计了一个登录窗口,按照教程贴的,报错:教程:
Dim UserName As String = e.Form.Controls("UserName").Value
Dim dr As DataRow
If UserName = "" Then
Messagebox.show("请选择用户!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
dr = _UserTable.SQLFind("[Name] = '" & UserName & "'")
If dr Is Nothing Then
Messagebox.show("此用户不存在!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information)
Return
End If
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
报错:
无法将类型为“Foxtable.WinForm.TextBox”的对象强制转换为类型“Foxtable.WinForm.ComboBox”。
然后我用内部数据用户表设置了一个默认用户,再切换回外部数据表之后,打开项目一直要登录2次,一次是默认的ft 的登录,一次是我自定义的登录界面,
是哪里出了问题啊老师