private void btnSave_Click(object sender, EventArgs e) { string oldParty; if (party != null) { oldParty = party.Abbreviation; } else { oldParty = tbAbbreviation.Text; } party = new Party(tbPartyName.Text, tbAbbreviation.Text, (Politician)cbLeadCandidate.SelectedItem, 0); sql.UpdateParty(party, oldParty); MessageBox.Show("De partij is succesvol opgeslagen."); this.Close(); }