public void checkIfFull()
        {
            Matches match = new Matches();

            string[] matchInfo = match.getMatchInfo(match_id);
            Courts   court     = new Courts();

            string[] courtInfo = court.getCourtInfo(Int32.Parse(matchInfo[3]));

            string courtLimit = courtInfo[2];
            int    teamLimit  = Int32.Parse(courtInfo[2]) / 2;


            // Check if team A is full:
            List <string> teamA = match.getTeam(match_id, 1);

            if (teamA.Count() == teamLimit)   // team A is full
            {
                if (!teamA.Contains(user_id)) // if not current user:
                {
                    JoinA.Visible     = false;
                    teamAfull.Visible = true;
                }
            }

            // Check if team B is full:
            List <string> teamB = match.getTeam(match_id, 2);

            if (teamB.Count() == teamLimit)   // team B is full
            {
                if (!teamB.Contains(user_id)) // if not current user:
                {
                    JoinB.Visible     = false;
                    teamBfull.Visible = true;
                }
            }
        }
        public void fillSlotsTeam2(string mid)
        {
            Matches       match = new Matches();
            List <string> teamA = match.getTeam(mid, 2);

            for (int i = 0; i < teamA.Count(); i++)
            {
                Users  user     = new Users();
                string username = user.getUsername(teamA[i]);

                switch (i)
                {
                case 0:
                    Div11.InnerText           = username;
                    Div11.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 1:
                    Div12.InnerText           = username;
                    Div12.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 2:
                    Div13.InnerText           = username;
                    Div13.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 3:
                    Div14.InnerText           = username;
                    Div14.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 4:
                    Div15.InnerText           = username;
                    Div15.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 5:
                    Div16.InnerText           = username;
                    Div16.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 6:
                    Div17.InnerText           = username;
                    Div17.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 7:
                    Div18.InnerText           = username;
                    Div18.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 8:
                    Div19.InnerText           = username;
                    Div19.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 9:
                    Div20.InnerText           = username;
                    Div20.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;

                case 10:
                    Div21.InnerText           = username;
                    Div21.Attributes["class"] = "row d-flex justify-content-end my-2";
                    break;
                }
            }
        }