Hi,
I read this topic, and i also have the same issue
What if data is updated immediately after you get it from server?
The better way could be:
-Get user changes.
-Lock record
-Compare server data with pre-updated data on your GUI.
-If there is no change, update on server.
-If server data is different than your copy of pre-updated data, update GUI with server data and prompt user to enter his/her data again.
-Unlock
This seems a good approach to me.
But in my approach there are two states, booked and not booked, so if I try to book a record than has a change (a change means than had been booked) I get an exception because a record booked cannot be booked again, only can be pass to not booked state. (Yes, it applies only to update to book a record). What do you think about that approach?