Esempio n. 1
0
        protected void btnStartMatch_Click(object sender, EventArgs e)
        {
            phBtnReset.Visible = false;
            btnStartMatch.Visible = false;

            using (FIFADataContext db = new FIFADataContext()) {
                Match match = new Match {
                    Player1 = CurrentUser.ID,
                    Player1Team = GetTeamGuid(ddlPlayer1Team, txtPlayer1NewTeam),
                    Player1Formation = GetFormationGuid(ddlPlayer1Formation, txtPlayer1NewFormation),
                    Player2 = GetPlayerGuid(),
                    Player2Team = GetTeamGuid(ddlPlayer2Team, txtPlayer2NewTeam),
                    Player2Formation = GetFormationGuid(ddlPlayer2Formation, txtPlayer2NewFormation)
                };

                if (match != null) {
                    db.Matches.InsertOnSubmit(match);
                    db.SubmitChanges();
                }

                CurrentMatchGuid = match.ID.ToString();
            }

            btnStopMatch.Visible = true;
        }
Esempio n. 2
0
 partial void DeleteMatch(Match instance);
Esempio n. 3
0
 partial void InsertMatch(Match instance);
Esempio n. 4
0
 partial void UpdateMatch(Match instance);
Esempio n. 5
0
		private void detach_Matches1(Match entity)
		{
			this.SendPropertyChanging();
			entity.Formation1 = null;
		}
Esempio n. 6
0
		private void attach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.Formation = this;
		}
Esempio n. 7
0
		private void detach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Esempio n. 8
0
		private void attach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Esempio n. 9
0
		private void attach_Matches1(Match entity)
		{
			this.SendPropertyChanging();
			entity.Team1 = this;
		}