以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 登陆时出错 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=178844) |
||||
-- 作者:zhuxinhui -- 发布时间:2022/7/23 16:33:00 -- 登陆时出错 ![]() ![]() 登陆时出错 ![]() ![]() 不知是哪出错了,查不出问题 Dim user As String = e.Form.Controls("ComboBox1").text Dim sss As String = e.Form.Controls("ComboBox2").text Dim pows As String = e.Form.Controls("TextBox1").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.sqlfind("用户名称=\'" & user & "\'") If dr IsNot Nothing Then If pows = dr("密码") Then dr("登陆时间") = Date.Now dr("登陆账套") = sss dr.Save() usna = user syscmd.project.open(ProjectFile, sss) e.Form.close PopMessage("登陆成功", "提示", PopIconEnum.Infomation, 1) \'syscmd.project.Exit(True) \'Return Else MessageBox.show("密码错误", "提示") Return End If Else MessageBox.show("用户不存在!", "提示") Return End If End If MessageBox.show("成功登陆", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error) 我用MessageBox.show("成功登陆", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error),测试都已弹出汇话框,这个代码应该没有错 |
||||
-- 作者:有点蓝 -- 发布时间:2022/7/23 16:40:00 -- dr("登陆时间") = Date.Now dr("登陆账套") = sss dr.Save() usna = user e.cancel=true syscmd.project.open(ProjectFile, sss) Else MessageBox.show("密码错误", "提示") Return End If
|
||||
-- 作者:zhuxinhui -- 发布时间:2022/7/23 17:52:00 -- 还是一样,现在还直接关闭了打不开了 |
||||
-- 作者:有点蓝 -- 发布时间:2022/7/24 19:42:00 -- 按ctrl打开项目:http://www.foxtable.com/webhelp/topics/1057.htm 参考一下这里的处理方法:
|