Northwind Refresh Orders

Posts   
 
    
Posts: 6
Joined: 30-Apr-2007
# Posted on: 01-May-2007 20:55:05   

I am looking at the Northwind example I downloaded and was looking at it for an example of detecting changes, but noticed an issue. On the customer manager form, if you try to refresh the orders, it checks for changes and gives a message if there is something that has not been saved. This works if you change a value for an order, but does not for the order detail. I'm trying to do the same thing - detect when the detail has changed. How can you do this?

Also, is there a way to check for the dirty state against the original value? Currently it says its dirty if I have a value thats 1, change it to 2, then back to 1. I realize it was changed (technically) but do not want to waste resources updating values that were not actually changed. My manager makes us mark any field that is different than the original with a blue background so that the users can see what is different.

Thanks for any help!

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 02-May-2007 08:25:38   

I'm trying to do the same thing - detect when the detail has changed. How can you do this?

You may loop through the orders, with another loop for the details and check the IsDirty flag of the details.

is there a way to check for the dirty state against the original value?

Compare the CurrentValue of the EntityField with the DBValue?