哪位老师帮我看看哪里错了
If e.DataCol.name = "日期" AndAlso e.NewValue IsNot Nothing Then
Dim max As String = e.DataTable.SQLCompute("max(单号)", "日期 = # " & e.DataRow("日期") & " # ")
Dim bh As String = "XS" & Format(e.DataRow("日期"), "yyyyMMdd")
Dim idx As Integer = 0
If max > "" Then
idx = max.SubString(bh.Length)
End If
e.DataRow("单号") = bh & Format(idx+1, "000")
e.DataRow.Save
End If
此主题相关图片如下:hhhhhh.jpg
![dvubb 按此在新窗口浏览图片](UploadFile/2015-1/20151917493729243.jpg)
[此贴子已经被作者于2015-1-12 9:31:04编辑过]