public void BeginTransaction(IsolationLevel objIso) { try { using (var lTC = TransactionControler.GetObject(ConnectionString)) lTC.BeginTran(objIso); } catch (DALException ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_BeginTransaction, ex); } catch (BLLException) { throw; } catch (Exception ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_Geral, ex); } }
public virtual void RollbackTransaction() { try { using (var lTC = TransactionControler.GetObject(ConnectionString)) lTC.RollbackTran(); } catch (DALException ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_RollbackTransaction, ex); } catch (BLLException) { throw; } catch (Exception ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_Geral, ex); } }
public virtual bool IsTransactionStarted() { try { using (var lTC = TransactionControler.GetObject(ConnectionString)) return(lTC.IsTransactionStarted); } catch (DALException ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_CommitTransaction, ex); } catch (BLLException) { throw; } catch (Exception ex) { throw new BLLException(ex.Message, this.GetType().Name, MethodBase.GetCurrentMethod().Name, Properties.Mensagens.Erro_Geral, ex); } }