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
Dim dr As DataRow = DataTables("库存表").AddNew
For i As Integer = 0 To nma.Length - 1
dr(nmb(i)) = e.DataRow(nma(i))
Next
For Each dc As DataCol In DataTables("库存表").DataCols
If dc.name ="id" Then
dr("id") =e.DataRow("_identify")
Else
dr("商品类别") = e.DataRow("商品类别")
dr("商品名称") = e.DataRow("商品名称")
dr("商品代码") = e.DataRow("商品代码")
dr("规格") =e.DataRow("规格")
dr("等级") =e.DataRow("等级")
dr("单位") = e.DataRow("单位")
dr("商品名称") =e.DataRow("商品名称")
dr("仓位") =e.DataRow("仓位")
dr("日期") = e.DataRow("日期")
dr("进库_折扣") =e.DataRow("进库_折扣")
dr("进库_数量") =e.DataRow("进库_数量")
dr("进库_单价") = e.DataRow("进库_单价")
dr("进库_金额") = e.DataRow("进库_金额")
End If
Next
Else
Dim tr As DataRow =DataTables("库存表").find("id ="& e.DataRow("id"))
If tr IsNot Nothing Then
tr.delete()
End If
End If
End If
以上是表DataColChanged公式,"选择“列打算不要了
If e.DataCol.Name = "选择" Then
If e.DataRow("选择") = True Then
这两句去掉,我想直接在窗口的“保存”按钮把库存明细表的公式保存到库存表,同时如果明细表内容有变动,库存表同样发生相应变动,公式如何修改?