Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
下载信息 [文件大小: 下载次数: ] | |
![]() |
GetComboListString
从指定的列中提取不重复的值,用符号"|"将这些值连接成一个字符串,并返回这个字符串。
此方法通常用于动态设置列表项目。
语法:
GetComboListString(ColumnName,Filter, Sort)
ColumnName:列名称,从此列中提取不重复的值。
Filter: 可选参数,指定一个条件表达式,只返回符合此条件的值。
Sort: 可选参数,指定排序列,如果省略,则根据取值列排序,通常无需设置。
下载信息 [文件大小: 下载次数: ] 点击浏览该文件:窗口动态列表.zip
Dim bm As WinForm.ComboBox = e.Form.Controls("部门")
Dim zh As WinForm.TextBox = e.Form.Controls("账号")
Dim mm As WinForm.TextBox = e.Form.Controls("密码")
Dim xm As WinForm.ComboBox = e.Form.Controls("姓名")
If bm.Value ="" Then
MessageBox.Show
("请选择部门!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
If xm.Value ="" Then
MessageBox.Show
("请选择姓名!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
If zh.Value ="" Then
MessageBox.Show
("请输入账号!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
If mm.value = "" Then
MessageBox.Show
("密码不能为空!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
'判断部门、姓名、账号、密码是否一致?
Dim dr As DataRow = DataTables("用户管理").Find("账号 = '" & zh.text
& "'")
If dr Is Nothing Then
MessageBox.Show
("账号不存在,请确认账号是否注册!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
If mm.value=
dr("密码") Then
Forms("登录").close
'' Forms("主窗口").open()
Else
mm.Value
=""
MessageBox.Show
("密码错误,请重新输入!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
''Dim bmyz As String = dr("部门")
''If bm.value <> bmyz Then
''
MessageBox.Show ("账号与部门不一致!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
'' Return
''End If
''Dim dr1 As DataRow = DataTables("用户管理").Find("姓名
= '" & _UserName & "'")
'用户名
''If dr1 IsNot Nothing AndAlso dr("密码")
= _UserPassword Then
''Dim dr As DataRow = DataTables("用户管理").Find("姓名
= '" & userName & "'")
'用户名
''If dr IsNot Nothing AndAlso dr("密码") =
Password Then
'' Verified
= True
''End If
_UserGroup = dr("部门") '用户部门,给全局代码赋值,对登陆没影响
_UserPost = dr("职务") '用户职务,给全局代码赋值,对登陆没影响
_UserName =dr("姓名") '用户姓名,给全局代码赋值,对登陆没影响
_UserAccount = dr("账号") '用户账号,给全局代码赋值,对登陆没影响
_UserPassword = dr("密码") '用户密码,给全局代码赋值,对登陆没影响
一看就是用的论坛里面我的那个改的,其实用账号密码就好了,没必要加上部门、姓名,账号必须唯一,才能通过账号的找对应行的密码,账号不唯一,就需要在通过部门或姓名去找,注册的时候或添加用户的时候,就必须判断账号不能重复,比如用手机号或是身份证号码来做账号
If mm.value= dr("密码") Then
If dr("用户状态") = "停用" Then
MessageBox.Show ("您的账号还未启用或已停用,请与管理员联系!","提示",MessageBoxButtons.OK,MessageBoxIcon.Warning)
Return
End If
Forms("主窗口").Open()
MainTable = Tables("主界面") '打开主界面表
e.Form.close
End If