以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- 错误提示 (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=150308) |
-- 作者:yetle -- 发布时间:2020/5/26 17:11:00 -- 错误提示 .NET Framework 版本:4.0.30319.18063 Foxtable 版本:2020.1.19.19 错误所在事件:窗口,登陆,TextBox2,KeyDown 详细错误信息: This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row. TextBox2,KeyDown If e.KeyCode = Keys.Enter Then Dim btt As WinForm.Button = e.Form.Controls("Button1") btt.PerformClick() e.Cancel = True End If .NET Framework 版本:4.0.30319.18063 Foxtable 版本:2020.1.19.19 错误所在事件:项目,AfterOpenProject 详细错误信息: This row has been removed from a table and does not have any data. BeginEdit() will allow creation of new data in this row. 项目,AfterOpenProject Forms("主窗口").Open() MainTable=Tables("用户表") Tables("报价申请").Cols("业务部_客户").DropForm = "客户" If User.Type <> UserTypeEnum.Developer TableCaptionVisible = False End If If OpenFileArgs.count>0 Then Else Forms("登陆").Open() If usna="" Then syscmd.project.Exit() Return End If End If Tables("物料资料").AllowEdit=False Tables("报价明细").Cols("产品编号").DropForm ="产品录入" Tables("报价明细").Cols("产品名称").DropForm ="产品录入" \'Forms("主窗口").Open() \'Forms("主窗口1").open() MainTable=Tables("用户表") Dim w As Integer = sysinfo.ScreenWidth Dim h As Integer = Sysinfo.ScreenHeight With baseMainForm .show .WindowState = System.Windows.Forms.FormWindowState.Normal .Width = 920 .Height = 640 .Top=h\\10 .left=w\\6 End With Dim dr As DataRow=DataTables("用户表").find("用户名称=\'" & usna & "\'") If dr IsNot Nothing Then StatusBar.Message1= "用户:" & usna & " " & "当前账套:" & dr("登陆账套") End If StatusBar.Message2=" 登陆日期:" & Date.Today |
-- 作者:有点蓝 -- 发布时间:2020/5/26 17:29:00 -- Button1按钮事件发生来 |
-- 作者:yetle -- 发布时间:2020/5/26 17:46:00 -- 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
|
-- 作者:有点蓝 -- 发布时间:2020/5/26 20:08:00 -- 试试 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 e.Form.close e.cancel =True syscmd.project.open(ProjectFile,sss) Else MessageBox.show("密码错误","提示") End If Else MessageBox.show("用户不存在!","提示") End If End If |
-- 作者:有点蓝 -- 发布时间:2020/5/26 20:13:00 -- 如果还有问题,就这样: button1按钮 Dim tx1 As WinForm.ComboBox = e.Form.Controls("ComboBox1") Dim user As String=tx1.text vars("sss") = 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 e.Form.close Else MessageBox.show("密码错误","提示") End If Else MessageBox.show("用户不存在!","提示") End If End If 项目,AfterOpenProject If OpenFileArgs.count = 0 Then Forms("登陆").Open() If usna="" Then syscmd.project.Exit() Return End If syscmd.project.open(ProjectFile,vars("sss")) Return End If Forms("主窗口").Open() MainTable=Tables("用户表") Tables("报价申请").Cols("业务部_客户").DropForm = "客户" If User.Type <> UserTypeEnum.Developer TableCaptionVisible = False End If Tables("物料资料").AllowEdit=False Tables("报价明细").Cols("产品编号").DropForm ="产品录入" Tables("报价明细").Cols("产品名称").DropForm ="产品录入" Dim w As Integer = sysinfo.ScreenWidth Dim h As Integer = Sysinfo.ScreenHeight With baseMainForm .show .WindowState = System.Windows.Forms.FormWindowState.Normal .Width = 920 .Height = 640 .Top=h\\10 .left=w\\6 End With Dim dr As DataRow=DataTables("用户表").find("用户名称=\'" & usna & "\'") If dr IsNot Nothing Then StatusBar.Message1= "用户:" & usna & " " & "当前账套:" & dr("登陆账套") End If StatusBar.Message2=" 登陆日期:" & Date.Today |
-- 作者:yetle -- 发布时间:2020/5/27 8:53:00 -- 后面一种方式可以,谢谢 |