--
登录按钮的代码是这些,现在加载还是很慢从点登陆到主窗口要15秒,我已经将部分表限制加载了还是一样。
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
pwsd = pows
dpt = dept
syscmd.project.open(ProjectFile,sss)
e.Form.Close
Return
Else
MessageBox.show("密码错误","提示")
Return
End If
Else
MessageBox.show("用户不存在!","提示")
Return
End If
End If