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; }
partial void DeleteMatch(Match instance);
partial void InsertMatch(Match instance);
partial void UpdateMatch(Match instance);
private void detach_Matches1(Match entity) { this.SendPropertyChanging(); entity.Formation1 = null; }
private void attach_Matches(Match entity) { this.SendPropertyChanging(); entity.Formation = this; }
private void detach_Matches(Match entity) { this.SendPropertyChanging(); entity.User = null; }
private void attach_Matches(Match entity) { this.SendPropertyChanging(); entity.User = this; }
private void attach_Matches1(Match entity) { this.SendPropertyChanging(); entity.Team1 = this; }