To find the original values versus the new values (current values) use something like this:
'-- Get the current value of the current row
' Note the use of the FieldNames enum (created for each BO)
Dim currValue As String = MyBo.CurrentRow.Item(MyBoFieldNames.MyField,DataRowVersion.Current)
'-- Get the original value of the current row
Dim orgValue As String = MyBo.CurrentRow.Item(MyBoFieldNames.MyField,DataRowVersion.Original)
'-- To loop through all the rows, checking if the row is dirty, then getting the original values.
For Each row As DataRow In MyBo.CurrentDataTable.Rows
'-- Get org Value if its dirty
If row.RowState <> DataRowState.Unchanged Then
'-- Get original values
' Note that the field name is just referenced by its name as a string here.
Dim orgValue2 As Integer = row.Item("intField",DataRowVersion.Original)
End If
Next
You will need to do this BEFORE the record is saved. When it is saved, the original values are reset to the current values. I'd also make sure to check AFTER the rules are checked, in case there are broken rules. Likely, I'd do the checking after the rules are checked, save away the results, then take action after the save actually works. I might also do it within a transaction, just in case...
Good luck!