Made sure the OK and Cancel buttons set the DialogResult just before closing the form

This commit is contained in:
2012-02-23 15:44:47 +00:00
parent 5649e60d69
commit 92e7711be0
3 changed files with 5 additions and 2 deletions

View File

@@ -60,7 +60,6 @@ namespace VEPROMS
private void ppBtnOK_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
procedureConfigBindingSource.EndEdit();
// Save Default settings for User
//
@@ -70,6 +69,7 @@ namespace VEPROMS
_ProcedureConfig.MyProcedure.Save().Dispose();
SaveText(ppProcTitleStpRTB);
SaveText(ppProcNumStpRTB);
DialogResult = DialogResult.OK;
this.Close();
}
public void SaveText(StepRTB myStepRTB)
@@ -88,6 +88,7 @@ namespace VEPROMS
private void ppBtnCancel_Click(object sender, EventArgs e)
{
procedureConfigBindingSource.CancelEdit();
this.DialogResult = DialogResult.Cancel;
this.Close();
}