Select Case e.DataCol.name Case "存货名称" Dim dr As DataRow = DataTables("盘点表").Find("存货名称 ='" & e.OldValue & "'") If dr Is Nothing Then dr = DataTables("盘点表").AddNew() dr("染料代号") = e.DataRow("染料代号") dr("存货名称") = e.DataRow("存货名称") dr("英文名称") = e.DataRow("英文名称") dr("单价") = e.DataRow("单价") Else dr("存货名称") = e.DataRow("存货名称") End If Case "染料代号","英文名称","单价" Dim dr As DataRow = DataTables("盘点表").Find("存货名称 ='" & e.DataRow("存货名称") & "'") If dr IsNot Nothing Then dr(e.DataCol.Name) = e.DataRow(e.DataCol.Name) End If End Select
|