If e.DataCol.Name = "逻辑列名" AndAlso e.DataRow("逻辑列名") = True Then
Dim nma() As String = {"A1","A2","A3","A4"} 'A表数据来源列
Dim nmb() As String = {"B1","B2","B3","B4"} 'B表数据接收列
Dim dr As DataRow = DataTables("表B").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
Next
End If在这个代码中,如果我想把a表逻辑列选择特定类型的行自动添加到b表,是不是只需要把 AndAlso e.DataRow("逻辑列名") = True Then,这行里面的true改成特定数值就行呢?
比如流水账中,我想把收支类型(逻辑列名)为“报销”的行自动增加到“报销”表中。我就把这个ture改成“报销”就行?望指教