SerialCoder
New member
- Joined
- Jun 26, 2023
- Messages
- 3
- Programming Experience
- 3-5
DialogResult Fires Twice:
if (ds.HasChanges() == true)
{
DialogResult userChoice = MessageBox.Show("Changes have been made to the current data.\n\n" +
"If you want to lose the changes and make another selection click 'OK'\n\n" +
"otherwise to save the changes click 'Cancel' and then click 'Save to Database' ",
"Save or Lose Changes",
MessageBoxButtons.OKCancel,
MessageBoxIcon.Question,
MessageBoxDefaultButton.Button1);
if (userChoice == DialogResult.OK)
{
ds.RejectChanges();
}
if(userChoice == DialogResult.Cancel)
{
cmbLettings.SelectedIndex = mLettingIndex;
return;
}
}