Esempio n. 1
0
        private void SaveTablesAndHands()
        {
            List <DBTable> dbTables = new List <DBTable>();
            List <DBHand>  dbHands  = new List <DBHand>();

            foreach (TableWithAll table in _tablesWithAll)
            {
                dbTables.Add(new DBTable(_tournament.TournamentId, table.roundId, table.tableId,
                                         table.player1Id, table.player2Id, table.player3Id, table.player4Id));

                for (int i = 1; i <= NUM_TABLE_HANDS; i++)
                {
                    dbHands.Add(new DBHand(_tournament.TournamentId, table.roundId, table.tableId, i));
                }
            }
            _db.AddTables(dbTables, dbHands);
        }