老师你好:下面代码出错:
Case "旁站类别"
If dr.IsNull("旁站类别") Then
dr("旁站编号") = Nothing
Else
Dim flag As Boolean = False
Dim fdr1 As DataRow = DataTables("系统设置").Find("内容 = '" & dr("旁站类别") & "'")
If fdr1 IsNot Nothing Then
Dim lb As String = fdr1("值") & "-"
Dim bhs As List(of String) = e.DataTable.GetValues("项目编号|旁站类别", "旁站编号 Like '" & lb & "%' And [_Identify] <> " & e.DataRow("_Identify"))
For i As Integer = 1 To bhs.count
If bhs(i-1) <> lb & Format(i, "0000") Then
lb = lb & Format(i, "0000")
flag = True
Exit For
End If
Next
If bhs.count = 0 Then
lb = lb & "0001"
ElseIf flag = False Then
lb = lb & Format(bhs.count+1, "0000")
End If
dr("旁站编号") = lb
End If
End If
错误提示:
.NET Framework 版本:2.0.50727.8762
Foxtable 版本:2018.3.9.1
错误所在事件:表,旁站记录, DataColChanged
详细错误信息:
调用的目标发生了异常。
无法将类型为“System.Collections.Generic.List`1[System.String[]]”的对象强制转换为类型“System.Collections.Generic.List`1[System.String]”。
[此贴子已经被作者于2018/7/3 15:49:46编辑过]