If e.DataCol.Name = "单价" Then '如果正在输入的是单价列
If e.newvalue IsNot Nothing Then '如果已经输入内容
Dim dr As DataRow = DataTables("采购明细").Find("[型号] = '" & e.Datarow("型号") & "'")
Dim v As Double = Val(e.newValue)
If v <> dr("单价") Then '将输入的内容与以往同名产品价格做比较.
MessageBox.Show("此价格与历往价格有差异,确定要修改,请在价格较低的型号后加"特价"两字,否则系统将无法区分!", "警告", MessageBoxButtons.OK, MessageBoxIcon.Information)
e.Cancel = True '则取消输入
End If
End If
End If
此段代码在DATACOLCHANGING中,现在价格中输入与原来一样的价格,他也说价格有差异,为什么