Select Case e.DataCol.Name Case "条码", "供应商", "单价" Dim dr As DataRow = e.DataRow Dim pr As DataRow Dim filter As String filter = "供应商 = '" & dr("供应商") & "' And 条码 = '" & dr("条码") & "'" pr = DataTables("供应商").Find(filter) If pr IsNot Nothing Then dr("是否有商品") = True If pr("单价") <> dr("单价") Then dr("价格变更") = True Else dr("价格变更") = False End If Else dr("是否有商品") = False End If End Select
|