Hello there and excuse my ignorance/inexpertise.
I'm developing a Winforms application using C# in .net 2.0 with version 2 of llblgen pro, Self-servicing scenario.
Some of my forms are fairly complex and involve, for instance, a combination of textboxes (to allow the user to edit the base entity) and lists/gridviews (to allow the user to edit associated entities).
The users want Apply and Undo buttons on the form. This is very easy to implement where edits are made to the main entity but where lists or gridviews are changed, I'm not too sure what the best approach is. I have tried using a transaction to wrap all edits to the form but this approach seems flawed - a user might have a form open for a long time with an open transaction. In any case, I couldn't get the approach to work, even with ReadUncommitted, because of locking issues.
My question is this: what is the best way of extending the Apply/Undo functionality to the whole form such that any change the user makes can be committed or rolled back?
Thanks for reading this.
Carl White
Example
As a contrived example, consider a form on which we edit details of a Person. The form might have a group of textboxes, comboboxes, etc. The form might also have, as a silly example, a list of favourite foods, which is added to and removed from by an additional form.