/// <summary> /// Finaliza la conexión establecida /// </summary> public void CerrarConexion() { if (conexion.State == ConnectionState.Open) { conexion.Close(); conexion.Dispose(); } }
public void Dispose() { try { if (Trans != null) { Trans.Dispose(); } if (Conn != null) { if (Conn.State == System.Data.ConnectionState.Open) { Conn.Close(); } Conn.Dispose(); } } catch (Exception) { throw; } }