-- conexion, si es compartida para registrar la bitacora de conexion
This commit is contained in:
@@ -21,6 +21,7 @@ Public Class ClsAF
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIÓN
|
'REGISTRAR CONEXIÓN
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -95,6 +96,7 @@ Public Class ClsAF
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -112,7 +114,7 @@ Public Class ClsAF
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Public Class ClsAcumuladores
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIÓN
|
'REGISTRAR CONEXIÓN
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
Private Sub SqlDataAdapter(StrSQL As String, Optional TipoComando As CommandType = CommandType.StoredProcedure)
|
||||||
With SqlAdapter.SelectCommand
|
With SqlAdapter.SelectCommand
|
||||||
@@ -62,6 +63,7 @@ Public Class ClsAcumuladores
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -70,7 +72,7 @@ Public Class ClsAcumuladores
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
SqlDataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ Public Class ClsCompProveedores
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIÓN
|
'REGISTRAR CONEXIÓN
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -170,6 +171,7 @@ Public Class ClsCompProveedores
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -187,7 +189,7 @@ Public Class ClsCompProveedores
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ Public Class ClsGPS
|
|||||||
|
|
||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIONES ABIERTAS
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -61,6 +62,7 @@ Public Class ClsGPS
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -78,7 +80,7 @@ Public Class ClsGPS
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ Public Class ClsGralFolios
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIONES ABIERTAS
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -72,6 +73,7 @@ Public Class ClsGralFolios
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -90,7 +92,7 @@ Public Class ClsGralFolios
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ Public Class ClsOC
|
|||||||
Private disposedValue As Boolean = False
|
Private disposedValue As Boolean = False
|
||||||
'PARA REGISTRAR CONEXION
|
'PARA REGISTRAR CONEXION
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -163,6 +164,7 @@ Public Class ClsOC
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
@@ -182,7 +184,7 @@ Public Class ClsOC
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||||
|
|
||||||
|
|||||||
@@ -75,6 +75,8 @@ Public Class ClsOIEventos
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'PARA REGISTRAR CONEXION
|
'PARA REGISTRAR CONEXION
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -164,6 +166,7 @@ Public Class ClsOIEventos
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
@@ -183,7 +186,7 @@ Public Class ClsOIEventos
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||||
|
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ Public Class ClsProductosServicios
|
|||||||
Private disposedValue As Boolean = False
|
Private disposedValue As Boolean = False
|
||||||
'PARA REGISTRAR CONEXION
|
'PARA REGISTRAR CONEXION
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -152,6 +152,7 @@ Public Class ClsProductosServicios
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -169,7 +170,7 @@ Public Class ClsProductosServicios
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -32,6 +32,7 @@ Public Class ClsSAT
|
|||||||
Private ContListado69B As Integer = 0
|
Private ContListado69B As Integer = 0
|
||||||
'PARA REGISTRAR CONEXION
|
'PARA REGISTRAR CONEXION
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -76,6 +77,7 @@ Public Class ClsSAT
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
SqlAdapter = New SqlDataAdapter("", SqlConexion)
|
||||||
@@ -95,7 +97,7 @@ Public Class ClsSAT
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
|
|
||||||
Try
|
Try
|
||||||
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
'DataAdapter(String.Format("INSERT INTO Sis_Conexiones (Clase,Modulo) VALUES ('ClsRH','{0}')", "RH/CatMotivosBaja"), CommandType.Text) ' pendiente de terminar parra registrar el cveconexion, falta el rarámetro de módulo
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ Public Class ClsVtaVendedores
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'PARA REGISTRAR CONEXION
|
'PARA REGISTRAR CONEXION
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Private EsTransaccionCompartida As Boolean = False
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
@@ -51,6 +52,7 @@ Public Class ClsVtaVendedores
|
|||||||
Else
|
Else
|
||||||
SqlConexion = TransaccionCompartida.Connection
|
SqlConexion = TransaccionCompartida.Connection
|
||||||
SqlTransacc = TransaccionCompartida
|
SqlTransacc = TransaccionCompartida
|
||||||
|
EsTransaccionCompartida = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
SqlCommand = New SqlCommand("", SqlConexion)
|
SqlCommand = New SqlCommand("", SqlConexion)
|
||||||
@@ -70,7 +72,7 @@ Public Class ClsVtaVendedores
|
|||||||
#Region "Conexiones"
|
#Region "Conexiones"
|
||||||
|
|
||||||
Private Sub ConexionAdd()
|
Private Sub ConexionAdd()
|
||||||
If ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then
|
||||||
Try
|
Try
|
||||||
DataAdapter("PA_Sis_RegistrarConexion")
|
DataAdapter("PA_Sis_RegistrarConexion")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
|||||||
Reference in New Issue
Block a user