Dim max As String = e.DataTable.Compute("max(资料编码)") If max > "" Then e.DataRow("资料编码") = "CS-" & Format(Val(max.SubString(3))+1, "0000") Else e.DataRow("资料编码") = "CS-0001" End If