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); } }
private void saveChangesButton_Click(object sender, EventArgs e) { schoolContext.SaveChanges(); MessageBox.Show("Change(s) saved to the database."); Refresh(); }