cambio de clase de validación de usuario
This commit is contained in:
@@ -115,7 +115,6 @@ Partial Class LogIn
|
||||
Dim elapsedSpan As New TimeSpan(elapsedTicks)
|
||||
PnlLogin.Visible = False
|
||||
|
||||
|
||||
If elapsedSpan.Days < 3 Then
|
||||
|
||||
Dim Usr As New ClsSisUsuarios
|
||||
@@ -144,18 +143,12 @@ Partial Class LogIn
|
||||
Else
|
||||
Alert("El Usuario no existe", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Usr.Dispose()
|
||||
Else
|
||||
Alert("La Activación expiró", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
'TxtContraseña.Text = UrlParametros("CLAVE").ToString.Trim
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -206,25 +199,10 @@ Partial Class LogIn
|
||||
End If
|
||||
If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
||||
BtnLogIn_Clickenter = 1
|
||||
Dim tGrupoEmpresa As String = ""
|
||||
Dim NombreCadena As String = "Conexion"
|
||||
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||
|
||||
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tGrupoEmpresa = "EMD"
|
||||
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tGrupoEmpresa = "BDH"
|
||||
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tGrupoEmpresa = "ECONOLLANTAS" : NombreCadena = "ConexionEcono"
|
||||
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tGrupoEmpresa = "JAM"
|
||||
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tGrupoEmpresa = "CITRUS"
|
||||
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tGrupoEmpresa = "KINO"
|
||||
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tGrupoEmpresa = "VSH"
|
||||
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tGrupoEmpresa = "AJAM"
|
||||
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tGrupoEmpresa = "ALATEL"
|
||||
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tGrupoEmpresa = "SERVEC"
|
||||
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tGrupoEmpresa = "SMS"
|
||||
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tGrupoEmpresa = "VYA"
|
||||
If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tGrupoEmpresa = "GRUPODIAZ" : NombreCadena = "ConexionGDiaz"
|
||||
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||
Dim Usuario As Usuario = Nothing
|
||||
|
||||
Dim isgps As Boolean = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper())
|
||||
@@ -240,7 +218,7 @@ Partial Class LogIn
|
||||
If Usuario IsNot Nothing Then
|
||||
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
|
||||
|
||||
CreaObjetoEmpresa(Usuario, NombreCadena)
|
||||
'CreaObjetoEmpresa(Usuario, NombreCadena)
|
||||
ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
||||
|
||||
Dim x As New ADSSessionObj(Usuario.CveUsuario, Usuario.CveEmpresa)
|
||||
@@ -268,20 +246,7 @@ Partial Class LogIn
|
||||
Else
|
||||
'PLATAFORMA SIG
|
||||
CType(Session("UsuarioSIG"), Usuario).CvePlataforma = 1
|
||||
Using ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuariosEmpresas(Usuario.CveUsuario, Usuario.CveEmpresa) Then
|
||||
Dim dt As Data.DataTable = ObjUsuarios.DtResultados
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then
|
||||
Usuario.MultipleEmpresa = True
|
||||
End If
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario), False)
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End If
|
||||
End Using
|
||||
|
||||
End If
|
||||
|
||||
Dim cookie As HttpCookie = FormsAuthentication.GetAuthCookie(Usuario.CveUsuario.ToString, False)
|
||||
@@ -343,25 +308,25 @@ Partial Class LogIn
|
||||
End If
|
||||
|
||||
End Function
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario, Optional NombreCadena As String = "Conexion")
|
||||
'Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario, Optional NombreCadena As String = "Conexion")
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
' Dim ObjEmpresa As New ClsSisEmpresas(UsuarioActual:=UsuarioActual)
|
||||
' If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
' If ObjEmpresa.GetEmpresasFuncionalidades(UsuarioActual.CveEmpresa) Then
|
||||
' Dim dttmp As Data.DataTable = ObjEmpresa.DtResultados
|
||||
|
||||
Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
For Each Row As Data.DataRow In dttmp.Rows
|
||||
EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
Next
|
||||
ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
End If
|
||||
' Dim EmpresasFuncionalidades As New HybridDictionary
|
||||
' For Each Row As Data.DataRow In dttmp.Rows
|
||||
' EmpresasFuncionalidades.Add(Convert.ToInt32(Row("CveFuncionalidad")), Row("Valor").ToString)
|
||||
' Next
|
||||
' ObjEmpresa.Empresa.SetFuncionalidades(EmpresasFuncionalidades)
|
||||
' End If
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
Else
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
' UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
' Else
|
||||
' End If
|
||||
' ObjEmpresa.Dispose()
|
||||
'End Sub
|
||||
Dim BtnGuardar_Clickenter As Integer = 0
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
If BtnGuardar_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
||||
|
||||
Reference in New Issue
Block a user