Dim dt4 As Date = Date.Today.AddDays(30)
Dim dtdq As Date = Date.Today
Dim drs1 = DataTables("应急预案台账").Select("下次修订日期 >= #" & dtdq & "# and 下次修订日期 <= #" & dt4 & "#")
Dim drs2 = DataTables("应急预案台账").Select("下次修订日期 < #" & dtdq & "#")
If drs2.count > 0 Then
Dim str As String = ""
For Each dr As DataRow In drs2
str &= dr("企业名称") & ":安全应急预案已于" & dr("下次修订日期") & "过期,请及时办理!" & vbcrlf
Next
popmessage(str,"警告",PopIconEnum.alert,8)
End If
If drs1.count > 0 Then
Dim str As String = ""
For Each dr As DataRow In drs1
str &= dr("企业名称") & ":安全应急预案即将到期于" & dr("下次修订日期") & "过期,请及时办理!" & vbcrlf
Next
popmessage(str,"提示",PopIconEnum.Infomation,8)
End If