Beispiel #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;
        }
Beispiel #2
0
 partial void DeleteMatch(Match instance);
Beispiel #3
0
 partial void InsertMatch(Match instance);
Beispiel #4
0
 partial void UpdateMatch(Match instance);
Beispiel #5
0
		private void detach_Matches1(Match entity)
		{
			this.SendPropertyChanging();
			entity.Formation1 = null;
		}
Beispiel #6
0
		private void attach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.Formation = this;
		}
Beispiel #7
0
		private void detach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.User = null;
		}
Beispiel #8
0
		private void attach_Matches(Match entity)
		{
			this.SendPropertyChanging();
			entity.User = this;
		}
Beispiel #9
0
		private void attach_Matches1(Match entity)
		{
			this.SendPropertyChanging();
			entity.Team1 = this;
		}