private void TransferButton_Click(object sender, EventArgs e) { //transfer int p_id = Int32.Parse(textBox3.Text); if (comboBoxTransfer.SelectedIndex == -1) { MessageBox.Show("TEAM FOR TRANSFER MUST BE CHOSEN!\nClick on the team to chose it\n", "", MessageBoxButtons.OK); return; } int p_team = comboBoxTransfer.SelectedIndex + 1; PersonTable.Prestup(p_id, p_team); this.Close(); }