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