.NET Framework 版本:2.0.50727.5485
Foxtable 版本:2017.10.26.1
错误所在事件:OA公告通告管理_Table2,CurrentChanged
详细错误信息:
列“_Identify”不属于表 OA公告通告管理_Table2。
Dim tb As Table = Tables(e.Form.Name & "_Table2")
Dim DT As DataTable = TB.DataTable
'~~~~~~~~~~~~~~清空所有列
For i As Integer = tb.Cols.Count - 1 To 0 Step - 1
dt.DataCols.Delete(tb.Cols(i).Name)
Next
'~~~~~~~~~~~~~~~~~~~~生成新列表
Dim cn() As String = {"单据编号","当前状态","权限","流程主题","发起部门","发起人","发起时间"}
For i As Integer = 0 To cn.Length - 1
If dt.DataCols.Contains(cn(i)) = False Then
If cn(i).Contains("时间") Then
dt.DataCols.Add(cn(i), Gettype(Date))
Else
dt.DataCols.Add(cn(i), Gettype(String),255)
End If
End If
Next
dt.DataRows.Clear
Dim tb1 As Table = Tables(e.Form.Name & "_Table1")
'Dim tb2 As Table = Tables(e.Form.Name & "_Table2")
For i As Integer = 0 To tb1.Rows.Count - 1
Dim r As Row = tb1.Rows(i)
Dim nr As Row = tb.AddNew
nr("单据编号") = r("单据编号")
nr("发起人") = r("发起人")
nr("发起时间") = r("发起时间")
Next