Foxtable(狐表)用户栏目专家坐堂 → 想做个一周派工一键生成,不知道怎么做,有没有HELPER.


  共有4082人关注过本帖树形打印复制链接

主题:想做个一周派工一键生成,不知道怎么做,有没有HELPER.

帅哥哟,离线,有人找我吗?
有点甜
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:版主 帖子:85326 积分:427815 威望:0 精华:5 注册:2012/10/18 22:13:00
  发帖心情 Post By:2015/3/26 17:00:00 [显示全部帖子]

 本周

 

 Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt As Date = Date.Today.AddDays(-w+1) '获取本周的第一天
For i As Integer = 0 To 6
    Dim ndr As DataRow = DataTables("派工表").AddNew
    ndr("日期") = dt.AddDays(i)
    ndr("新老客户") = "老客户"
Next

 

 下周

 

 Dim y As Integer = Date.Today.Year
Dim w As Integer = Date.Today.DayOfWeek '算出今天是星期几
Dim dt As Date = Date.Today.AddDays(-w+1).AddDays(7) '获取本周的第一天
For i As Integer = 0 To 6
    Dim ndr As DataRow = DataTables("派工表").AddNew
    ndr("日期") = dt.AddDays(i)
    ndr("新老客户") = "老客户"
Next


 回到顶部