如何将满足未来几天过生日的多个人名输出到messagebox.show中?
Dim ids As String
Dim n As Integer = 9 '未来天数,含今天,所以实际是未来7天
Dim eDate As Date = Date.Today.AddDays(n)
For Each dr As DataRow In DataTables("员工").Select("姓名 is not null")
Dim month As Integer = dr("生日").Month
Dim day As Integer = dr("生日").Day
Dim sDate As Date = new Date(Date.Today.Year, month, day)
Dim days As TimeSpan = eDate - sDate
If days.TotalDays <= 9 OrElse days.TotalDays > 365 Then
ids = ids & "," & dr("_Identify")
End If
Next
If ids > "" Then
ids = ids.Trim(",")
messagebox.show("未来"& n &"天内是" & “姓名” & "的生日,给他们送去祝福吧.","生日提醒")
End If