1、如何让考核序号自动增加到第18时,出现提示,注意,你的考核序号已经增加到18条
Select e.DataCol.Name
Case "文档号"
If e.DataRow.IsNull("文档号") Then
e.DataRow("考核序号") = Nothing
Else
Dim lb As String = e.DataRow("文档号")
If e.DataRow("考核序号").StartsWith(lb) = False
Dim max As String
Dim idx As Integer
max = e.DataTable.Compute("Max(考核序号)","文档号 = '" & lb & "'")
If max > "" Then '
idx = CInt(max.Substring(5,3)) + 1
Else
idx = 1
End If
e.DataRow("考核序号") = lb & Format(idx,"000")
End If
End If
End Select
2、如何根据考核序号判断,不再填入已经存在的内容。
Dim f As New Filler
f.SourceTable = DataTables("出勤表")
f.SourceCols = "时间,考核事实,依据,加扣分值,考核序号"
f.DataTable = DataTables("文档号")
f.DataCols = "时间,考核事实,依据,加扣分值,考核序号"
f.Fill() '
求大神帮忙啦