Exemplo n.º 1
0
 public static void EndConnection()
 {
     try
     {
         if (SQLSConnection.State == ConnectionState.Open)
         {
             SQLSConnection.Close();
         }
     }
     catch (Exception)
     { throw; }
 }
Exemplo n.º 2
0
 public static void RollBackTransaction()
 {
     try
     {
         if (SQLSTransaction != null)
         {
             SQLSTransaction.Rollback();
             SQLSConnection.Close();
             SQLSTransaction = null;
         }
     }
     catch (Exception)
     {
         EndConnection();
         throw;
     }
 }
Exemplo n.º 3
0
 public static void CommitTransaction()
 {
     try
     {
         if (SQLSTransaction != null)
         {
             SQLSTransaction.Commit();
             SQLSConnection.Close();
             SQLSTransaction = null;
         }
     }
     catch (Exception)
     {
         EndConnection();
         throw;
     }
 }