Select Case e.DataCol.name
Case "付款方式","业务途径","收款"
e.DataRow("是否") = Not( e.DataRow.Isnull("付款方式") OrElse e.DataRow.Isnull("业务途径") OrElse e.DataRow.Isnull("收款"))
End Select
If e.DataCol.Name = "是否" AndAlso e.DataRow("是否") = True Then
Dim count As Integer = DataTables("表B").compute("count(派单id)", "[派单id] = '" & e.DataRow("派单id") & "' and 截止日期 = #" & e.DataRow("截止日期") & "# and 付款方式 = '" & e.DataRow("付款方式") & "'")
If count > 0 Then
msgbox("财务收款添加,不能新增!2请核对!")
Return
End If
Dim nma() As String = {"派单id","截止日期","收款","付款方式","业务途径"} 'A表数据来源列
Dim nmb() As String = {"派单id","截止日期","应收款","付款方式","业务途径"} '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
请问以上代码,怎么添加。判定 后台sql数据库里已添加了的对应子行只是没有加载进来,而不再添加呢?
[此贴子已经被作者于2019/3/29 11:25:17编辑过]