Exemplo n.º 1
0
        public void LeaveB_Click(object sender, EventArgs e)
        {
            Matches match = new Matches();

            match.leaveMatch(user_id, match_id);
            Response.Redirect("~/MatchRoom.aspx?match_id=" + match_id);
        }
Exemplo n.º 2
0
        public void LeaveA_Click(object sender, EventArgs e)
        {
            //DELETE FROM [ssm_mvc_demo1].[dbo].[matchesPlayers] WHERE matchesPlayers_matchesId = '24' and matchesPlayers_userId = '25'

            Matches match = new Matches();

            match.leaveMatch(user_id, match_id);
            Response.Redirect("~/MatchRoom.aspx?match_id=" + match_id);
        }
Exemplo n.º 3
0
        protected void JoinA_Click(object sender, EventArgs e)
        {
            Matches match = new Matches();

            if (!match.alreadyJoined(user_id, match_id)) // Not joined
            {
                match.joinMatch(user_id, match_id, 1);
            }
            else // Joined already = Leave then => Join
            {
                match.leaveMatch(user_id, match_id);
                match.joinMatch(user_id, match_id, 1);
            }

            Response.Redirect("~/MatchRoom.aspx?match_id=" + match_id);
        }