public override AbsTransaction BeginTransaction()
 {
     if (_transaction != null && !_transaction.IsDisposed)
         throw new Exception("Transaction already in progress");
     SqlConnection cnn = new SqlConnection(_sConnectionString);
     cnn.Open();
     _transaction = new DBTransaction(cnn.BeginTransaction());
     return _transaction;
 }
Exemplo n.º 2
0
        public override AbsTransaction BeginTransaction()
        {
            if (_transaction != null && !_transaction.IsDisposed)
            {
                throw new Exception("Transaction already in progress");
            }
            SqlConnection cnn = new SqlConnection(_sConnectionString);

            cnn.Open();
            _transaction = new DBTransaction(cnn.BeginTransaction());
            return(_transaction);
        }
 public void Dispose()
 {
     if (!_bIsDisposed)
     {
         if (_transaction == null || _transaction.IsDisposed)
         {
             if (_connection != null && _connection.State != System.Data.ConnectionState.Closed)
                 _connection.Close();
         }
         _connection = null;
         _transaction = null;
         _bIsDisposed = true;
     }
 }
 public void Dispose()
 {
     if (!_bIsDisposed)
     {
         if (_transaction == null || _transaction.IsDisposed)
         {
             if (_connection != null && _connection.State != System.Data.ConnectionState.Closed)
             {
                 _connection.Close();
             }
         }
         _connection  = null;
         _transaction = null;
         _bIsDisposed = true;
     }
 }
 internal ConnectionWrapper(DBTransaction pTransaction)
 {
     _connection  = pTransaction.InnerTransaction.Connection;
     _transaction = pTransaction;
 }
 internal ConnectionWrapper(SqlConnection pConnection)
 {
     _connection  = pConnection;
     _transaction = null;
 }
 internal ConnectionWrapper(DBTransaction pTransaction)
 {
     _connection = pTransaction.InnerTransaction.Connection;
     _transaction = pTransaction;
 }
 internal ConnectionWrapper(SqlConnection pConnection)
 {
     _connection = pConnection;
     _transaction = null;
 }