Foxtable(狐表)用户栏目专家坐堂 → [求助]平均分配数据并提醒


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

主题:[求助]平均分配数据并提醒

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


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

Dim t As Table = Tables("资源分配_Table1")
Dim dic As new Dictionary(Of String, Integer)
Dim ary() As String = Forms("资源分配").Controls("CheckedListBox1").Value.split(",")
Dim i As Integer = 0
For Each r As Row In t.GetCheckedRows
    r("工号") = ary(i)
    If Forms("资源分配").Controls("_mtxz").Value = Nothing Then
    Else
        r("媒体") = Forms("资源分配").Controls("_mtxz").Value
    End If
    r("分配日期") = Forms("资源分配").Controls("DateTimePicker1").Value
    r.save
    Dim nm As String =  r("部门") & "." & r("工号")
    If dic.ContainsKey(nm) = False Then
        dic.Add(nm, 1)
    Else
        dic(nm) += 1
    End If
    i += 1
    If i = ary.length Then
        i = 0
    End If
Next
For Each key As String In dic.Keys
    QQClient.SendChatMessage(key, "{!} 已收到" & dic(key) & "条新的客户资源请及时处理!")
Next
Syscmd.Project.Save()

 回到顶部