I have two scenarios where I need to save an object, when the form closes and when another object has been selected via a list box.
When another object has been selected via the list box I am executing the following code.
result =
MessageBox.Show(string.Format("Do you want to save changes", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Question); if (result == DialogResult.Yes)This example works fine. The same code is getting excuted when on the form's closing event.
But on the form closing event I get an error when the base.save() method is called. the error says the object is still being edited and can not be saved.
How can I avoid this issue?
MTmace
it is an object and I found the solution on another thread. Executing apply edit before the save solved my problem.
MTmace
Copyright (c) Marimer LLC