private void SubmitButton_Click(object sender, EventArgs e) { string name = ""; string eventID = ""; // Check if the fields are blank then get the values if (NameText.Text != null) { name = NameText.Text; } // +1 the event ID because it starts at 1 if (EventDropDown.SelectedItem != null) { eventID = m_eventIds[EventDropDown.SelectedIndex].ToString() + makeBase1; } // Check if they have values, if so add them to the database if (name != "" && eventID != "") { if (m_teamsSignedUpForEvent < m_eventNumOfTeams[EventDropDown.SelectedIndex]) { m_teamController.AddData(name + "\n" + eventID); } } // Go back to the main menu this.Hide(); m_eventController.GoToMainMenu(); }
public void ReturnToMainMenu() { this.Hide(); // Stop displaying the current form m_dataController.GoToMainMenu(); // Show the main menu }