在项目事件的afteropenproject中录入以下代码,希望指定用户打开时,到期未出货的明细表打开。进入后未打开明细表,也无任何提示,帮忙看看是哪里的问题,谢谢!:
BaseMainForm.Text = "【ERP管理系统】"
Forms("用户登录").Open()
If _UserName = "" Then
Syscmd.Project.Exit()
Return
End If
If _Username = "张三" Then
Dim dt As Date = Date.Today
Dim dr As DataRow = DataTables("生产入库明细表").Find("提醒日期 <= #" & dt & "# and 已出货 = false " )
If dr IsNot Nothing Then
MessageBox.Show("有产品逾期未出货!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
DataTables("生产入库明细表").loadFilter = "提醒日期 <= #" & dt & "# and 已出货 = false "
DataTables("生产入库明细表").load
MainTable = Tables("生产入库明细表")
End If
Else
Forms("主界面").Open()
MainTable = Tables("物料信息表")
End If
If User.Type <> UserTypeEnum.Developer
TableCaptionVisible = False
End If
Forms("导航栏").Open()
Forms("标题栏").Open()
Output.Logs("登录日志").Add(_UserName & ":" & Date.Now )
Output.Logs("登录日志").Save("c:\foxtable\开发版\log.txt",True)
Output.Logs("登录日志").Clear