'********************************统计跟进数量*********************************************
Dim ldGenjin As Integer
ldGenjin=val(user.Name)
Dim cmdGenjin As New SQLCommand
cmdGenjin.C
cmdGenjin.CommandText = "Select count(*) From crm_customer_track where track_user=" & val(user.name) & "and next_time = '" & Date.now & "'"
ldGenjin = cmdGenjin.ExecuteScalar()
e.form.controls("txtGenjinbenri").text=ldGenjin
Dim yGenjin As Integer = Date.Today.Year
Dim wGenjin As Integer = Date.Today.DayOfWeek '算出今天是星期几 '算出今天是星期几 '算出今天是星期几
Dim dt1Genjin As Date = Date.Today.AddDays(-wGenjin) '获取本周的第一天
Dim dt2Genjin As Date = Date.Today.AddDays(6 - wGenjin) '获取本周的最后一天
Dim FilterGenjin As String
FilterGenjin = "next_time >='" & dt1Genjin & "' And next_time <='" & dt2Genjin & "'"
FilterGenjin=filterGenjin & "and track_user=" & User.Name
Dim ldGenjin2 As Integer
ldGenjin2=val(user.Name)
Dim cmdGenjin2 As New SQLCommand
cmdGenjin2.C
cmdGenjin2.CommandText = FilterGenjin
ldGenjin2 = cmdGenjin2.ExecuteScalar()
e.form.controls("txtGenjinbenzhou").text=ldGenjin2
'********************************统计跟进数量********************************************
[此贴子已经被作者于2013-8-28 13:22:10编辑过]