If e.DataCol.Name = "入库单号" Then Dim dh As DataRow dh = DataTables("库存材料表").Find("[入库单号] = '" & e.NewValue & "'") If dh IsNot Nothing Then Return End If End If If e.DataCol.Name = "审核" AndAlso e.DataRow("审核") = True Then Dim nma() As String = {"物料代码","物料名称","规格型号","仓库代码","仓库名称","常用计量单位","材料单价","入库数量","入库金额","入库日期","入库单号"} '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
|