In my application I manage persons information, I have a listBox display list of persons and three buttons Add/Edit/Delete, When I select row and press edit button the application open a new window with person information and save to some database table (ModifyCheck) that this person modifying now if other user try to edit it. In this person window I have two button (Save/Cancel). all controls in this window binding with object property, When I make some modifying and press save I should remove the row from (ModifyCheck).
The Problem Is :
If I open the person window and modifying some information then press Cancel, I will update ModifyCheck table by using SaveChange. In this case all the information that I modifyting will updated although I pressed Cancel.
How Can I apply SaveChanges() for ModifyCheck only ?