表事件
供应商管理_DataColChanging
If e.DataCol.Name = "供应商代码" Then
If e.NewValue > "" then
Dim dr As DataRow = e.DataRow
dr = e.DataTable.Find("供应商代码 = '" & e.NewValue & "'","[_Identify] <> " & e.NewValue)
If dr IsNot Nothing Then
MessageBox.Show("此供应商代码已经存在!")
e.Cancel = True
End If
end if
End If
供应商管理_DataColChanged
If e.DataCol.Name = "供应商代码" Then
If e.NewValue > "" then
Dim dr As DataRow = e.DataRow
dr("供应商代码") = CStr(e.NewValue).ToUpp
end if
end if