以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  生日提醒设计  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=11929)

--  作者:youyuweinihao
--  发布时间:2011/8/17 10:16:00
--  生日提醒设计

以下以我上传的附件为例说明问题

在表“客户信息”中包含---客户ID、姓名、出生日期三列数据。并有“提示”窗口

当软件打开时

如果明天有两个过生日,会自动弹跳出“提示”窗口。提示窗口显示为“明天生日两人”。点击此条信息,在表中显示出明天过生日的两条信息。请问如何实现??

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:管理项目1_0817.zip


--  作者:youyuweinihao
--  发布时间:2011/8/17 11:19:00
--  

这个会了

其他的提醒就都会了

不知道狐爸能不能看到,个人感觉这个功能很重要


--  作者:狐狸爸爸
--  发布时间:2011/8/17 11:39:00
--  

当然,这个提醒本来就比一般的提醒要复杂的。

 

设置在AfterOpenProject事件:

 

 

Dim ids As String
Dim cnt As Integer
Dim nms As String
For Each dr As DataRow In DataTables("客户信息").DataRows
   Dim dt As Date = dr("出生日期")
   dt =  New Date(Date.Today.Year,dt.Month,dt.Day)
    If Date.Today.AddDays(1) = dt Then
        cnt = cnt + 1
        ids = ids & "," & dr("_Identify")
        nms = nms & "," & dr("姓名")
    End If
Next
If cnt > 0 Then
     messagebox.show("有" & cnt & "个客户明天生日, 分别是:  " & nms.Trim(","))
     Tables("客户信息").filter = "[_Identify] In (" & ids.Trim(",") &")"
End If


--  作者:ashi_shine
--  发布时间:2011/8/17 11:47:00
--  

Dim Birth As Date
Dim BirthPl As Integer
For Each dr As DataRow In DataTables("客户信息").DataRows
   Birth = dr("出生日期")
If (birth.Month=Date.Today.Month)
  If (birth.Day=Date.Today.AddDays(1).Day)
BirthPl=BirthPl +1

End If
End If
Next

MessageBox.Show("生日"+str(BirthPl)+"人")


--  作者:舜风
--  发布时间:2011/8/17 14:16:00
--  
路过,顺手捡个宝
--  作者:denghui69986
--  发布时间:2022/9/30 15:30:00
--  
路过,排上用场,谢谢