If e.DataRow("车型") <> "售后" Then 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("车型") 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 End If
|