请教
Select e.DataCol.Name
Case "制单日期"
If e.DataRow.IsNull("制单日期") Then
e.DataRow("送检单编号") = Nothing
Else
Dim d As Date = e.DataRow("制单日期")
Dim y As Integer = d.Year
Dim bh As String = Format(d,"yyyy")
If e.DataRow("送检单编号").StartsWith(bh) = False
Dim max As String
Dim idx As Integer
max = e.DataTable.Compute("Max(送检单编号)","制单日期 = #" & bh & "# And [_Identify] <> " & e.DataRow("_Identify"))
If max > "" Then
idx = CInt(max.Substring(8,4)) + 1
Else
idx = 1
End If
e.DataRow("内部合同编号") = bh & "-F-" & Format(idx,"000")
e.DataRow.Save
End If
End If
End Select
显示
.NET Framework 版本:2.0.50727.8762
Foxtable 版本:2018.3.9.1
错误所在事件:表,理化试验送检单,DataColChanged
详细错误信息:
调用的目标发生了异常。
该字符串未被识别为有效的 DateTime。
哪里有问题?