老师好,这个代码怎样终止。
If e.DataCol.Name = "收/支"
If e.DataRow("收/支") = "支出" Then
'===========================================================================================
'If e.DataCol.Name = "审核"
' If e.DataRow("审核") = True Then
Dim nma() As String = {"交易时间","交易类型","交易对方","商品","收/支","金额(元)","支付方式","当前状态","交易单号","商户单号","备注" } 'A表数据来源列
Dim nmb() As String = {"交易时间","交易类型","交易对方","商品","收/支","金额(元)","支付方式","当前状态","交易单号","商户单号","备注" } 'B表数据接收列
e.DataRow.save
Dim dr2 As DataRow = DataTables("支出账单").Find("编号 = '" & e.DataRow("编号") & "'") '找到指定返回的行
If dr2 Is Nothing Then
Dim dr3 As DataRow = DataTables("支出账单").AddNew
For i As Integer = 0 To nma.Length - 1
dr3(nmb(i)) = e.DataRow(nma(i))
Next
' dr3("来源") = "采购" '入库表就改为"采购",其他表改为"其它"
'End If
Else
DataTables("支出账单").deletefor("编号 = '" & e.DataRow("编号") & "'")
'End If
End If
' 对支出表的操作
ElseIf e.DataRow("收/支") = "收入" Then
Dim nma() As String = {"交易时间","交易类型","交易对方","商品","收/支","金额(元)","支付方式","当前状态","交易单号","商户单号","备注" } 'A表数据来源列
Dim nmb() As String = {"交易时间","交易类型","交易对方","商品","收/支","金额(元)","支付方式","当前状态","交易单号","商户单号","备注" } 'B表数据接收列
e.DataRow.save
Dim dr2 As DataRow = DataTables("收入账单").Find("编号 = '" & e.DataRow("编号") & "'") '找到指定返回的行
If dr2 Is Nothing Then
Dim dr3 As DataRow = DataTables("收入账单").AddNew
For i As Integer = 0 To nma.Length - 1
dr3(nmb(i)) = e.DataRow(nma(i))
Next
' dr3("来源") = "采购" '入库表就改为"采购",其他表改为"其它"
'End If
Else
DataTables("收入账单").deletefor("编号 = '" & e.DataRow("编号") & "'")
'End If
End If
' 对收入表的操作
Else
' 输入其它值的操作
End If
End If