private void btnUpdate_Click(object sender, EventArgs e) { try { var confirmResult = MessageBox.Show("Are you sure you want to update this physician?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Warning); if (confirmResult == DialogResult.Yes) { //get the values string fName = txtFName.Text.Trim(); string mInit = txtMInit.Text.Trim(); string lName = txtLName.Text.Trim(); string office = txtOffice.Text.Trim(); string phoneNum = txtPhoneNum.Text.Trim(); int licenseNum = int.Parse(txtLicenseNum.Text.Trim()); //Send it throug the datatier PharmacyDataTier bPharm = new PharmacyDataTier(); DataSet ds2 = new DataSet(); ds2 = bPharm.UpdatePhysicians(myPhysicianID, fName, mInit, lName, office, phoneNum, licenseNum); MessageBox.Show("Physician succesfully updated.", "Completed", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { } } catch (Exception ex) { MessageBox.Show(ex.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }