怎么能在项目属性里用
Select e.DataCol.Name
Case "第一次收益时间","人员姓名"
If e.DataRow.IsNull("第一次收益时间") OrElse e.DataRow.IsNull("人员姓名") Then
e.DataRow("人员编号") = Nothing
Else
Dim d As Date = e.DataRow("第一次收益时间")
Dim y As Integer = d.Year
Dim m As Integer = d.Month
Dim Days As Integer = Date.DaysInMonth(y,m)
Dim fd As Date = New Date(y,m,1) '获得该月的第一天
Dim ld As Date = New Date(y,m,Days) '获得该月的最后一天
Dim bh As String = e.DataRow("人员姓名") & "-" & Format(d,"yyMMdd") & "-"
If e.DataRow("人员编号").StartsWith(bh) = False
Dim max As String
Dim idx As Integer
Dim flt As String
flt = "人员姓名 = '"& e.DataRow("人员姓名") & "' And 第一次收益时间 >= #" & fd & "# And 第一次收益时间 <= #" & ld & "# And [_Identify] <> " & e.DataRow("_Identify")
max = e.DataTable.Compute("Max(人员编号)",flt)
If max > "" Then '如果存在最大单据编号
idx = CInt(max.Substring(12,4)) + 1
Else
idx = 1
End If
e.DataRow("人员编号") = bh & Format(idx,"0000")
End If
End If
End Select