.NET Framework 版本:2.0.50727.8745
Foxtable 版本:2018.3.9.1
错误所在事件:表,人工费明细表,DataColChanged
详细错误信息:
调用的目标发生了异常。
未找到类型“Integer”的公共成员“StartsWith”。
原代码
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 Then '如果单据编号前缀不符
Dim max As String
Dim idx As String
max = e.DataTable.sqlCompute("Max(次数)","账户名称 = '" & lb & "' And [_Identify] <> " & e.DataRow("_Identify")) '取得该账户名称的最大编号
If max > "" Then '如果存在最大编号
idx = cint(max) + 1 '获得最大编号的后三位顺序号,并加1
Else
idx = 1 '否则顺序号等于1
End If
e.DataRow("次数") = Format(idx,"00")
End If
End If
End Select