If e.DataCol.Name = "是否" AndAlso e.DataRow("是否") = True Then Dim count As Integer = DataTables("财务").compute("count(_Identify)", "付款方式 = '" & e.DataRow("付款方式") & "' and 编号 = '" & e.DataRow("编号") & "'") If count > 1 Then msgbox("不能新增")
return
End If
Dim nma() As String = {"派工id"} '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
End If