下面这段代码,怎么调整,也是第一步可以可靠暂停;待第二部就不能停止,直接全部执行完。
请费心帮助看下如何编写
谢谢
Dim at As Date = Date.Today.AddDays(10)
'Dim ar As DataRow = DataTables("检定流水记录").Find("本年计划检定日期 <= #" & at & "#")
Dim ar As DataRow = DataTables("检定流水记录").Find("本年计划检定日期 <= #" & at & "# And 本年实际检定日期 Is Null")
If ar IsNot Nothing Then
MessageBox.Show("有计量器具到期或即将到期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
' Tables("检定流水记录").Filter = "本年计划检定日期 <= #" & at & "#"
Tables("检定流水记录").Filter = "( 本年计划检定日期 <= #" & at & "#) And (本年实际检定日期 Is Null) And ([状态] not Like '%报废%' or [状态] is null) and ([计量计划.备注] not Like '%报废%' or [计量计划.备注] is null) and ([计量台帐.备注] not Like '%报废%' or [计量台帐.备注] Is null)"
Forms("计量器具到期提醒").Show()
'MainTable = Tables("检定流水记录")
End If
Dim bt As Date = Date.Today.AddDays(10)
'Dim ar As DataRow = DataTables("检定流水记录").Find("本年计划检定日期 <= #" & at & "#")
Dim br As DataRow = DataTables("计划维护记录流水表").Find("计划执行日期 <= #" & bt & "# And 实际执行日期 Is Null Or 存档日期 Is Null")
If br IsNot Nothing Then
MessageBox.Show("有设备设施计划任务到期或即将到期!","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
Tables("计划维护记录流水表").Filter = "(计划执行日期 <= #" & bt & "#) And (实际执行日期 Is Null) and (存档日期 Is Null)"
'Tables("计划维护记录流水表").Filter = "(计划执行日期 <= #" & bt & "#) And (实际执行日期 Is Null) And ([状态] not Like '%报废%' or [状态] is null) and ([计量计划.备注] not Like '%报废%' or [计量计划.备注] is null) and ([计量台帐.备注] not Like '%报废%' or [计量台帐.备注] Is null)"
Forms("计划维护执行情况").Show()
'MainTable = Tables("计划维护记录流水表")
End If
Syscmd.Project.OpenSystemMenu()
Forms("1360*768分辨率窗口").Open()