public bool UpdateGameRoom(Logic.Game.GameRoom g) { bool ans = UpdateGameRoomPotSize(g.GetPotSize(), g.Id); ans = ans & _controller.UpdateGameRoom(g.Id, g.GetGameNum(), GameRoomToXElement(new GameRoomXML(g)), g.IsGameActive(), g.GetGameReplay()); return(ans); }
private bool InsertGamePref(Logic.Game.GameRoom v) { Database.LinqToSql.GameRoomPreferance toAdd = new GameRoomPreferance(); toAdd.GameId = v.GetGameNum(); toAdd.BuyInPolicy = v.GetBuyInPolicy(); toAdd.GameMode = _controller.GetGameModeValByName(v.GetGameMode().ToString()); toAdd.CanSpectate = v.IsSpectatable(); toAdd.League = _controller.GetLeagueValByName(v.GetLeagueName().ToString()); toAdd.MaxPlayers = v.GetMaxPlayer(); toAdd.MinPlayers = v.GetMinPlayer(); toAdd.Roomid = v.Id; toAdd.EnterGamePolicy = v.GetStartingChip(); toAdd.MinBet = v.GetMinBet(); toAdd.PotSize = v.GetPotSize(); return(_controller.InsertPref(toAdd)); }