private void tsbSave_Click(object sender, EventArgs e) { string IntegratedSecurity = ""; if (!DoValidation()) { return; } try { if (cIntegratedSecurity.Checked) { IntegratedSecurity = "Y"; } else { IntegratedSecurity = "N"; } using (DataStuff sn = new DataStuff()) { sn.SaveServer(cbServerName.Text, tUserName.Text, tPassword.Text, IntegratedSecurity, UserID); MessageBox.Show("Server saved.", "Server Settings", MessageBoxButtons.OK, MessageBoxIcon.Information); } } catch (Exception ex) { MessageBox.Show("There was an error saving the server settings - " + ex.Message, "Server Settings", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }