Dim max As Stringmax = e.DataTable.Compute("Max(单位编号)", "单位编号 like 'CUN%'")Dim int As Integer = 1If max > "" Then int = CInt(max.Substring(3,3)) + 1End Ife.DataRow("单位编号") = "CUN" & Format(int,"000") & "-01"