private void FormMenu_Load(object sender, EventArgs e) { // Get selectedTournament from FormTournament.cs formTournament = (FormTournament)this.Owner; selectedTournament = formTournament.selectedTournament; // Change selected tournament label with the proper one labelTournamentValue.Text = selectedTournament.Name; // Get info int totalTeam = Teams.CountTeams(selectedTournament); int totalPlayer = Players.CountPlayer(selectedTournament); listBoxInfo.Items.Add("Total participating teams: " + totalTeam); listBoxInfo.Items.Add("Total participating player: " + totalPlayer); // Get data from db teamList = Teams.Leaderboard(FormMenu.selectedTournament); // Show data to datagridteams ShowDataGridTeams(); }