Chapter 13. N-Level Undo

There are scenarios where an application requires the ability to undo changes made to an object. Data binding is one example because implementing the IEditableObject interface requires that an object be able to take a snapshot of its state, be edited, and then be able to return its state to that snapshot later. Another example is where the UI has a Cancel button that doesn't close the form or page, in which case the user expects that clicking Cancel will revert the form's data (and thus the business object) to a previous state.

Implementing an undo feature is challenging, especially when you consider parent-child object relationships. When undoing changes to an Invoice object, for example, it is necessary to remove all ...

Get Expert C# 2008 Business Objects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.