private void searchbtn_Click(object sender, EventArgs e) { LibrarianController lc = new LibrarianController(); if (typetb.Text != "" && discounttb.Text != "") { MessageBox.Show(lc.insertMembership(typetb.Text, int.Parse(discounttb.Text)), "Successful"); } else { MessageBox.Show("Please Fill Properly The Required Columns", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }