Ejemplo n.º 1
0
 private void LanguageForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (IsModified(_selectedRecord)) {
         DialogResult select = DisplayHelper.QuestionYesNo(this, "There are unsaved changes. Are you sure want to exit?");
         if (select == DialogResult.Yes) {
             e.Cancel = false;
             _context.Dispose();
             Dispose();
         }
         else
             e.Cancel = true;
     }
     else {
         e.Cancel = false;
         _context.Dispose();
         Dispose();
     }
 }
Ejemplo n.º 2
0
 private void InvMaint_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!BarToggleSwitchItemBuild.Checked && IsModified(_selectedRecord))
     {
         DialogResult select = DisplayHelper.QuestionYesNo(this, "There are unsaved changes. Are you sure want to exit?");
         if (select == DialogResult.Yes)
         {
             e.Cancel = false;
             _context.Dispose();
             Dispose();
         }
         else
         {
             e.Cancel = true;
         }
     }
     else
     {
         e.Cancel = false;
         _context.Dispose();
         Dispose();
     }
 }
Ejemplo n.º 3
0
 private void MGMRatesImportForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     _sys.Dispose();
     _context.Dispose();
 }