Dim tx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim user As String=tx1.text
Dim sss As String=e.Form.Controls("ComboBox2").text
Dim dept As String=e.Form.Controls("ComboBox3").text
Dim tx2 As WinForm.TextBox = e.Form.Controls("TextBox2")
Dim pows As String=tx2.text
Dim dl As WinForm.Button = e.Form.Controls("Button1")
Dim dt As DataTable=DataTables("用户表")
Dim dr As DataRow
If user="" Then
MessageBox.show("请输入用户名称!","提示",MessageBoxButtons.OK,MessageBoxIcon.Error)
Return
Else
dr=dt.find("用户名称='" & user & "'")
If dr IsNot Nothing Then
If pows=dr("密码") Then
PopMessage("登陆成功","提示",PopIconEnum.Infomation,1)
dr("登陆时间")=Date.Now
dr("登陆账套")=sss
dr.Save()
usna=user
' usna=dr("用户名称")
' Public pwsd As String
' Public dpt As String
pwsd = pows
' pwsd = dr("密码")
dpt = dept
' dpt = dr("部门")
'Forms("主窗口2").Controls("btnChat").Enabled = QQClient.Ready
'Forms("OpenQQ").Open(-2000,-2000)
'Dim btn As WinForm.Button = Forms("OpenQQ").Controls("btnLogin")
'btn.PerformClick()
'Forms("OpenQQ").Close
syscmd.project.open(ProjectFile,sss)
e.Form.close
' syscmd.project.Exit(True)
Return
Else
MessageBox.show("密码错误","提示")
Return
End If
Else
MessageBox.show("用户不存在!","提示")
Return
End If
End If