我在窗体的加载窗体事件中写有如下代码:
Dim ids As String
Dim n As Integer = 10 '未来天数,含今天,所以实际是未来10天
For Each dr As DataRow In DataTables("客户资料").DataRows
Dim rq As String = dr("出生日期")
If rq.Length = 11 Then
Dim Cdt As Date = new Date(rq.SubString(0,4), rq.SubString(5,2), rq.SubString(8,2))
Dim dt1 As New Date(Date.Today.Year,Cdt.Month,Cdt.Day)
Dim dt2 As New Date(Date.Today.AddDays(n).Year,Cdt.Month,Cdt.Day)
If (dt1 >= Date.Today AndAlso dt1 < Date.Today.AddDays(n)) OrElse (dt2 >= Date.Today AndAlso dt2 < Date.Today.AddDays(n)) Then
ids = ids & "," & dr("_Identify")
Else
Tables("提醒窗体_Table2").DataSource =Nothing
End If
End If
Next
这样设置提前提醒天数是一个固定值:我想实现:有另外一个窗体设置提前多少天提醒、提醒天数和是否启动程序后启动提醒,下一次运行程序生效
(1)将设置的数值保存到哪比较好?是不是还得建一张表呢?
(2)因为提醒窗体中有两个提醒表其中一个是客户生日提醒,另一个是流量卡失效提醒,应该什么设置数据表?