/// <summary> /// Stores values from the selected game into a Game instance. /// </summary> private Game StoreOldGameValues() { Game oldGame = null; try { oldGame = new Game { ID = 0, Week = SelectedGame.Week, Guest = SelectedGame.Guest, GuestScore = SelectedGame.GuestScore, GuestAdjustedScore = SelectedGame.GuestAdjustedScore, Host = SelectedGame.Host, HostScore = SelectedGame.HostScore, HostAdjustedScore = SelectedGame.HostAdjustedScore, IsDistrictGame = SelectedGame.IsDistrictGame, IsPlayoffGame = SelectedGame.IsPlayoffGame, IsForfeit = SelectedGame.IsForfeit, Notes = SelectedGame.Notes }; oldGame.DecideWinnerAndLoser(); } catch ( Exception ex ) { Globals.ShowExceptionMessage(ex); } return oldGame; }
/// <summary> /// Stores values from the data entry controls into a Game instance. /// </summary> /// <returns></returns> private Game StoreNewGameValues() { Game newGame = null; try { newGame = new Game { ID = 0, Week = this.Week, Guest = this.Guest, GuestScore = this.GuestScore, GuestAdjustedScore = this.GuestAdjustedScore, Host = this.Host, HostScore = this.HostScore, HostAdjustedScore = this.HostAdjustedScore, IsDistrictGame = this.IsDistrictGame, IsPlayoffGame = this.IsPlayoffGame, IsForfeit = this.IsForfeit, Notes = this.Notes }; newGame.DecideWinnerAndLoser(); } catch ( Exception ex ) { Globals.ShowExceptionMessage(ex); } return newGame; }