コード例 #1
0
ファイル: BoardGameEvent.cs プロジェクト: SimCitee/ProjetBD2
        public void RemoveBoardGameFromBoardGameList(BoardGame oldBoardGame, OracleConnection connection)
        {
            try {
                OracleCommand command = connection.CreateCommand();
                command.CommandText = String.Format(QRY_DELETE_BOARDGAME, oldBoardGame.Id, _id);

                connection.Open();

                command.ExecuteNonQuery();

                _boardGameList.Remove(oldBoardGame);
            }
            catch (OracleException e) {
                throw e;
            }
            finally {
                connection.Close();
            }
        }
コード例 #2
0
ファイル: BoardGameEvent.cs プロジェクト: SimCitee/ProjetBD2
        public void AddBoardGameToBoardGameList(BoardGame newBoardGame, OracleConnection connection)
        {
            try {
                OracleCommand command = connection.CreateCommand();
                command.CommandText = String.Format(QRY_INSERT_BOARDGAME, newBoardGame.Id, _id);

                connection.Open();

                command.ExecuteNonQuery();

                _boardGameList.Add(newBoardGame);
            }
            catch (OracleException e) {
                throw e;
            }
            finally {
                connection.Close();
            }
        }