Exemplo n.º 1
0
        // считать всех игроков
        public BasketballTeams readPlayers()
        {
            BasketballTeams    datasetBasketballTeams = new BasketballTeams();
            AbstractConnection abstractConnection     = new AbstractConnection(ConnectionString);

            try
            {
                abstractConnection.openConnection();
                AbstractTransaction abstractTransaction = abstractConnection.openTransaction();
                try
                {
                    team.Read(abstractConnection, abstractTransaction, datasetBasketballTeams);
                    manager.Read(abstractConnection, abstractTransaction, datasetBasketballTeams);
                    player.Read(abstractConnection, abstractTransaction, datasetBasketballTeams);
                }
                finally
                {
                    abstractTransaction.rollback();
                }
            }
            finally
            {
                abstractConnection.closeConnection();
            }
            return(datasetBasketballTeams);
        }
Exemplo n.º 2
0
        // изменить информацию об игроке
        public void updatePlayer(BasketballTeams datasetBasketballTeams)
        {
            AbstractConnection abstractConnection = new AbstractConnection(ConnectionString);

            try
            {
                abstractConnection.openConnection();
                AbstractTransaction abstractTransaction = abstractConnection.openTransaction();
                try
                {
                    player.Update(abstractConnection, abstractTransaction, datasetBasketballTeams);
                    abstractTransaction.commit();
                }
                catch
                {
                    abstractTransaction.rollback();
                }
            }
            finally
            {
                abstractConnection.closeConnection();
            }
        }