Beispiel #1
0
 public static Maintenance Create(int id)
 {
     if (id == 1)
         return null;
     else
     {
         if (mnt == null)
         {
             mnt = new Maintenance(id);
         }
         return mnt;
     }
 }
Beispiel #2
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!updated)
     {
         if (DialogResult.No == MessageBox.Show("You haven't updated the changes you made to the database. If you exit now they will be lost.\nDo you still want to exit?", "Database not Updated", MessageBoxButtons.YesNo, MessageBoxIcon.Warning))
         {
             e.Cancel = true;
         }
         else
         {
             mnt = null;
         }
     }
     else
     {
         mnt = null;
     }
 }
Beispiel #3
0
 private void Form1_FormClosing(object sender, FormClosingEventArgs e)
 {
     if (!updated)
     {
         if (DialogResult.No == MessageBox.Show("You haven't updated the changes you made to the database. If you exit now they will be lost.\nDo you still want to exit?", "Database not Updated", MessageBoxButtons.YesNo,MessageBoxIcon.Warning))
             e.Cancel = true;
         else
             mnt = null;
     }
     else
         mnt = null;
 }