private void saveChanges_Click(object sender, EventArgs e)
 {
     try
     {
         schoolContext.SaveChanges();
         MessageBox.Show("Changes saved to the database.");
         this.Refresh();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
Esempio n. 2
0
 private void saveChangesButton_Click(object sender, EventArgs e)
 {
     schoolContext.SaveChanges();
     MessageBox.Show("Change(s) saved to the database.");
     Refresh();
 }