Select Case e.DataCol.Name
Case "调拨单号"
Dim fdr As DataRow = DataTables("入库明细").Find("入库单号 = '" & e.DataRow("调拨单号") & "'")
If fdr Is Nothing Then
fdr = DataTables("入库明细").AddNew
fdr("商品编号") = e.DataRow("商品编号")
fdr("商品名称") = e.DataRow("商品名称")
fdr("规格型号") = e.DataRow("规格型号")
fdr("单位") = e.DataRow("单位")
fdr("单价") = e.DataRow("单价")
fdr("数量") = e.DataRow("数量")
fdr("备注") = e.DataRow("备注")
fdr("入库单号") = e.DataRow("调拨单号")
End If
Case "商品编号","商品名称","规格型号","单位","单价","数量","备注"
Dim fdr As DataRow = DataTables("入库明细").Find("入库单号 = '" & e.DataRow("调拨单号") & "'")
If fdr IsNot Nothing Then
fdr("商品编号") = e.DataRow("商品编号")
fdr("商品名称") = e.DataRow("商品名称")
fdr("规格型号") = e.DataRow("规格型号")
fdr("单位") = e.DataRow("单位")
fdr("单价") = e.DataRow("单价")
fdr("数量") = e.DataRow("数量")
fdr("备注") = e.DataRow("备注")
End If
End Select
Select Case e.DataCol.Name
Case "调拨单号"
Dim fdr As DataRow = DataTables("出库明细").Find("出库单号 = '" & e.DataRow("调拨单号") & "'")
If fdr Is Nothing Then
fdr = DataTables("出库明细").AddNew
fdr("商品编号") = e.DataRow("商品编号")
fdr("商品名称") = e.DataRow("商品名称")
fdr("规格型号") = e.DataRow("规格型号")
fdr("单位") = e.DataRow("单位")
fdr("单价") = e.DataRow("单价")
fdr("数量") = e.DataRow("数量")
fdr("备注") = e.DataRow("备注")
fdr("出库单号") = e.DataRow("调拨单号")
End If
Case "商品编号","商品名称","规格型号","单位","单价","数量","备注"
Dim fdr As DataRow = DataTables("出库明细").Find("出库单号 = '" & e.DataRow("调拨单号") & "'")
If fdr IsNot Nothing Then
fdr("商品编号") = e.DataRow("商品编号")
fdr("商品名称") = e.DataRow("商品名称")
fdr("规格型号") = e.DataRow("规格型号")
fdr("单位") = e.DataRow("单位")
fdr("单价") = e.DataRow("单价")
fdr("数量") = e.DataRow("数量")
fdr("备注") = e.DataRow("备注")
End If
End Select