-- mejora en direccionamiento de conexion string
This commit is contained in:
@@ -92,7 +92,7 @@ Public Class ClsPaginas
|
||||
If HttpContext.Current.Session("UsuarioSIG") Is Nothing Then
|
||||
Return ""
|
||||
Else
|
||||
Return DirectCast(HttpContext.Current.Session("UsuarioSIG"), Usuario).Empresa.RutaDB
|
||||
Return DirectCast(HttpContext.Current.Session("UsuarioSIG"), Usuario).RutaDB
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Return ""
|
||||
|
||||
@@ -22,6 +22,7 @@ Public Class ClsSisUsuarios
|
||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||
'PARA REGISTRAR CONEXION
|
||||
Private CveConexion As Integer = 0
|
||||
Private ConnStr As String = ""
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -68,6 +69,7 @@ Public Class ClsSisUsuarios
|
||||
If TransaccionCompartida Is Nothing Then
|
||||
SqlConexion = New SqlConnection
|
||||
SqlConexion.ConnectionString = ConfigurationManager.ConnectionStrings(NombreCadena).ConnectionString
|
||||
ConnStr = ConfigurationManager.ConnectionStrings(NombreCadena).ConnectionString
|
||||
Try
|
||||
SqlConexion.Open()
|
||||
Catch ex As Exception
|
||||
@@ -235,6 +237,7 @@ Public Class ClsSisUsuarios
|
||||
Retorno.CodigoAutorizado = Data.Rows(0)("CodigoAutorizado").ToString()
|
||||
Dim autoip As String = Data.Rows(0)("AutorizadoxIP").ToString().ToUpper()
|
||||
Retorno.AutorizadoxIP = (autoip = "1" OrElse autoip = "TRUE")
|
||||
Retorno.RutaDB = ConnStr
|
||||
|
||||
' Esto es parta el punto de venta
|
||||
Retorno.CveSucursal = Data.Rows(0)("CveSubProyecto").ToString().ToEntero
|
||||
|
||||
@@ -97,8 +97,6 @@ Public Class Empresa
|
||||
Public Property Timbres As Integer
|
||||
Public Property _RutaArchivos As String
|
||||
Public Property ContaFormatoCuenta As String
|
||||
Public Property RutaDB As String
|
||||
|
||||
Public ReadOnly Property Ruta As String
|
||||
Get
|
||||
If Not String.IsNullOrEmpty(_RutaArchivos) AndAlso ClsPaginas.EsProduccion Then
|
||||
|
||||
@@ -50,23 +50,18 @@ Public Class Usuario
|
||||
Public Property ListaPersonalizacion As Hashtable
|
||||
Public Property Acceso As Integer
|
||||
Public Property TipoControl As Integer
|
||||
|
||||
Public Property CvePlataforma As Integer
|
||||
|
||||
Public Property DescuentoAutorizado As Double
|
||||
|
||||
Public Property AutorizadoxIP As Boolean
|
||||
Public Property CodigoAutorizado As String
|
||||
|
||||
Public Property UTCOffset As Integer
|
||||
Public Property PorcentajeMaximoAutorizacion As Decimal
|
||||
Public Property DiasMaximoAutorizacion As Integer
|
||||
|
||||
Public Property isLoginseted As Boolean = False
|
||||
|
||||
Public Property SesionBloqueada As Boolean = False
|
||||
Public Property ErrorDesbloqueo As Boolean = False
|
||||
Public Property MsgErrorDesbloqueo As String = ""
|
||||
Public Property MsgErrorDesbloqueo As String = ""
|
||||
Public Property RutaDB As String
|
||||
|
||||
Public ReadOnly Property FechaActualCliente As DateTime
|
||||
Get
|
||||
|
||||
@@ -79,6 +79,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
If UsuarioActual.Empresa.RutaDB = "" Then UsuarioActual.Empresa.RutaDB = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
@@ -358,7 +358,6 @@ Partial Class LogIn
|
||||
End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
If UsuarioActual.Empresa.RutaDB = "" Then UsuarioActual.Empresa.RutaDB = ConfigurationManager.ConnectionStrings(NombreCadena).ConnectionString
|
||||
Else
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user