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()
|