private void btnRemoveMember_Click(object sender, EventArgs e) { if (txtRemoveId.Text == "") { MessageBox.Show("Please select a Member to remove by clicking their row in the table.", "No Member Selected"); } else { //Instantiate Member variables Members removeMember = new Members(); removeMember.setMemberID(Convert.ToInt32(txtRemoveId.Text)); removeMember.setMemberStatus("Removed"); //Update database removeMember.removeMember(); //ASK USER IF THEY WANT TO VIEW MEMBERS AFTER UPDATING A MEMBER if (MessageBox.Show("Member Removed! Would you like to view all members?", "View Members?", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No) { frmRemoveMember refresh = new frmRemoveMember(); this.Close(); refresh.Show(); } else { frmViewMembers viewMembers = new frmViewMembers(); this.Close(); viewMembers.Show(); } } }
private void removeMemberToolStripMenuItem_Click(object sender, EventArgs e) { frmRemoveMember removeMember = new frmRemoveMember(); this.Hide(); removeMember.Show(); }