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