Dim dr As DataRow = e.DataRow
If e.DataCol.Name = "单价" Andalso e.NewValue > 0 Then
Dim str As String
str = "[编号] = '" & dr("编号") & "' And [颜色] = '" & dr("颜色") & "' And [单位] = '" & dr("单位") & "' And [单价] Is Not Null"
Dim dr2 As DataRow = DataTables("报价").Find(Str)
If dr2 IsNot Nothing Andalso dr("_Identify") <> dr2("_Identify") Then
MessageBox.Show( “编号:" & dr2("编号") & " 颜色:" & dr2("颜色") & " 单价:" & dr2("单价") & " 已经有此报价了","提示")
e.Cancel = True
Else
If e.NewValue < dr("价格_厂价") * 1.3 Andalso dr("价格_允许") = False Then
e.Cancel = True
End If
End If
End If
[此贴子已经被作者于2010-9-6 15:55:10编辑过]