private void btnEmployeeDataModify_Click(object sender, EventArgs e) { Employee objEmployeeMod = new Employee(); try { if (radioButtonModifiyEmployee.Checked == true) { objEmployeeMod.UpdEmployee(int.Parse(comboBoxENName.SelectedValue.ToString()), txtModifyEmployeeName.Text); } else if (radioButtonDeleteEmployee.Checked == true) { objEmployeeMod.DelEmployee(int.Parse(comboBoxENName.SelectedValue.ToString())); } else { MessageBox.Show("Please select an option to modify a employee name.", "Warning", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation); } } catch (Exception ev) { MessageBox.Show(ev.ToString()); } RefreshAll(); }