If e.DataCol.Name = "加入台帐" Then If e.DataRow("加入台帐") = True Then Dim nma() As String = {"记录编号","巡查日期","巡查项目","巡查线路","发现违法情况","备注"} 'A表数据来源列 Dim nmb() As String = {"记录编号","巡查日期","巡查内容","巡查路线","发现违法情况","备注"} 'B表数据接收列 Dim dr As DataRow = DataTables("巡查台帐").AddNew For i As Integer = 0 To nma.Length - 1 dr(nmb(i)) = e.DataRow(nma(i)) Next Else DataTables("巡查台帐").deletefor("记录编号='" & e.DataRow("记录编号") & "'") End If End If
|