Dim d1 As Date = e.DataRow("开店日期")
Dim d2 As Date = e.DataRow("关店日期")
Dim d3 As Date = e.DataRow("查询截止日期")
Dim d4 As Date = e.DataRow("查询初始日期")
Dim y1 As Integer = d1.year
Dim y2 As Integer = d2.year
Dim y3 As Integer = d3.year
Dim y4 As Integer = d4.year
Dim m1 As Integer = d1.month
Dim m2 As Integer = d2.month
Dim m3 As Integer = d3.month
Dim m4 As Integer = d4.month
Select Case e.DataCol.Name
Case "查询截止日期","开店日期","关店日期","查询初始日期"
If d1>=d4 And d1<=d3 And e.DataRow.IsNull("开店日期") = False And e.DataRow.IsNull("关店日期") Then
e.DataRow("当期经营月数") = (e.DataRow("查询截止日期")-e.DataRow("开店日期") + 1)/30
ElseIf (d1>=d4 And d1<=d3) And (d2>=d4 And d2<=d3) And e.DataRow.IsNull("开店日期") = False And e.DataRow.IsNull("关店日期")= False Then
e.DataRow("当期经营月数") = (e.DataRow("关店日期")-e.DataRow("开店日期") + 1)/30
ElseIf (d2<d4 And e.DataRow.IsNull("关店日期")= False) Or d1>d3 Then
e.DataRow("当期经营月数") = 0
Else
e.DataRow("当期经营月数") = m3-m2+1
End If
End Select
重置其中一列的时候出现以下错误信息
详细错误信息:
调用的目标发生了异常。
重载决策失败,因为没有 Public“+”可以用这些参数调用:
'Public Shared Operator +(t1 As System.TimeSpan, t2 As System.TimeSpan) As System.TimeSpan':
与参数“t2”匹配的参数无法从“Integer”转换为“TimeSpan”。