-- cambio de clase de validación de usuario
This commit is contained in:
@@ -95,24 +95,10 @@ Partial Class Sistemas_PopUpCambiaUsuario
|
||||
tContraseña = gvr.DataKey("Contraseña").ToString
|
||||
tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
|
||||
|
||||
Dim tGrupoEmpresa As String = ""
|
||||
Dim NombreCadena As String = "Conexion"
|
||||
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"
|
||||
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||
Dim Usuario As Usuario
|
||||
'Dim UsuarioAsignaciones As Usuario
|
||||
|
||||
@@ -127,8 +113,6 @@ Partial Class Sistemas_PopUpCambiaUsuario
|
||||
ADSSessionConfig.sessionUser.CvePlataforma = 3
|
||||
End If
|
||||
ADSSessionConfig.sessionDpage = False
|
||||
|
||||
|
||||
ADSSessionConfig.sessionUser.ModoSimulacion = True
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
@@ -137,36 +121,15 @@ Partial Class Sistemas_PopUpCambiaUsuario
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
ADSSessionConfig.sessionUser.CveEmpresa = Usuario.Empresa.CveEmpresa
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, Usuario.Empresa.CveEmpresa)
|
||||
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(tCveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
If ObjEmpresa.GetEmpresasFuncionalidades(tCveEmpresa) 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
|
||||
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
ADSSessionConfig.sessionUser.CveEmpresa = ObjEmpresa.Empresa.CveEmpresa
|
||||
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, ObjEmpresa.Empresa.CveEmpresa)
|
||||
Else
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
If UsuarioActual.CveCliente > 0 Then
|
||||
CargaZonasHorarias(UsuarioActual)
|
||||
End If
|
||||
End If
|
||||
|
||||
RegistraScript("gotourl();")
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
Private Sub CargaZonasHorarias(ByRef UsuarioActual As Usuario)
|
||||
|
||||
@@ -92,25 +92,11 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
|
||||
tUsuario = gvr.DataKey("Usuario").ToString
|
||||
tContraseña = gvr.DataKey("Contraseña").ToString
|
||||
tCveEmpresa = gvr.DataKey("CveEmpresa").ToString.ToEntero
|
||||
Dim tGrupoEmpresa As String = ""
|
||||
Dim NombreCadena As String = "Conexion"
|
||||
|
||||
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"
|
||||
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||
Dim Usuario As Usuario
|
||||
'Dim UsuarioAsignaciones As Usuario
|
||||
|
||||
@@ -130,7 +116,7 @@ Partial Class Sistemas_PopUpCambiaUsuarioEmpresa
|
||||
ADSSessionConfig.sessionUser.ModoSimulacion = False
|
||||
ADSSessionConfig.sessionUser.ModoSimulacionXEmpresa = True
|
||||
|
||||
UsuarioActual.Empresa = objempresa
|
||||
UsuarioActual.Empresa = Usuario.Empresa
|
||||
dt.Dispose()
|
||||
|
||||
If UsuarioActual.CveCliente > 0 Then
|
||||
|
||||
@@ -60,150 +60,136 @@ Partial Class PopUpSeleccionarEmpresa
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
If gvr IsNot Nothing Then
|
||||
Dim tGrupoEmpresa As String = ""
|
||||
Dim NombreCadena As String = "Conexion"
|
||||
Dim Usuario As Usuario = Nothing
|
||||
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"
|
||||
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
Dim Usuario As Usuario = Nothing
|
||||
Dim tGrupoEmpresa As String = ClsPaginas.GlobalGrupoEmpresa(Request.Url.Host.ToUpper())
|
||||
Dim NombreCadena As String = ClsPaginas.GlobalNombreCadenaConexionDominio(Request.Url.Host.ToUpper())
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarioAutenticacion(NombreCadena:=NombreCadena)
|
||||
Usuario = ObjUsuario.ValidaUsuario(gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"), CveEmpresa:=gvr.DataKey("CveEmpresa").ToEntero)
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
'Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
|
||||
Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
Usuario.ModoSimulacion = ModoSimulacion
|
||||
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
Dim CveEmpresa = e.CommandArgument.ToString().ToEntero()
|
||||
If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
Usuario.CvePlataforma = 1
|
||||
Usuario.CveEmpresa = CveEmpresa
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, CveEmpresa)
|
||||
CreaObjetoEmpresa(Usuario)
|
||||
RegistraScript("Ir3();")
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvPortalCliente_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalCliente.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
If gvr IsNot Nothing Then
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
Dim Usuario As Usuario = Nothing
|
||||
Usuario = ObjUsuario.ValidaUsuarioPortalCliente(gvr.DataKey("CveCliente").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
|
||||
Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
Usuario.ModoSimulacion = ModoSimulacion
|
||||
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
Usuario.CvePlataforma = 6
|
||||
UsuarioActual.CveEmpresa = gvr.DataKey("CveEmpresa").ToEntero()
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, UsuarioActual.CveEmpresa)
|
||||
CreaObjetoEmpresa(Usuario)
|
||||
'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
RegistraScript("Ir4();")
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
Usuario.MultipleEmpresa = True
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, e.CommandArgument.ToString().ToEntero())
|
||||
RegistraScript("Ir3();")
|
||||
'If dt IsNot Nothing Then
|
||||
' If dt.Rows.Count >= 1 Then
|
||||
' Dim CveEmpresa = e.CommandArgument.ToString().ToEntero()
|
||||
' If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
' Usuario.CvePlataforma = 1
|
||||
' Usuario.CveEmpresa = CveEmpresa
|
||||
' ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, CveEmpresa)
|
||||
' CreaObjetoEmpresa(Usuario)
|
||||
' RegistraScript("Ir3();")
|
||||
' End If
|
||||
'End If
|
||||
'dt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub GvPortalProveedor_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalProveedor.RowCommand
|
||||
If e.CommandName = "Cambia" Then
|
||||
Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
If gvr IsNot Nothing Then
|
||||
Dim tGrupoEmpresa As String = ""
|
||||
Dim NombreCadena As String = "Conexion"
|
||||
Dim Usuario As Usuario = Nothing
|
||||
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"
|
||||
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
'Protected Sub GvPortalCliente_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalCliente.RowCommand
|
||||
' If e.CommandName = "Cambia" Then
|
||||
' Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
Usuario = ObjUsuario.ValidaUsuarioPortalProveedor(gvr.DataKey("CveProveedor").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
' If gvr IsNot Nothing Then
|
||||
|
||||
ObjUsuario.Dispose()
|
||||
|
||||
If Usuario IsNot Nothing Then
|
||||
Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
' Dim ObjUsuario As New ClsSisUsuarios
|
||||
' Dim Usuario As Usuario = Nothing
|
||||
' Usuario = ObjUsuario.ValidaUsuarioPortalCliente(gvr.DataKey("CveCliente").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
|
||||
Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
Usuario.ModoSimulacion = ModoSimulacion
|
||||
ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
If dt IsNot Nothing Then
|
||||
If dt.Rows.Count >= 1 Then
|
||||
If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
Usuario.CvePlataforma = 7
|
||||
UsuarioActual.CveEmpresa = gvr.DataKey("CveEmpresa").ToEntero()
|
||||
ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, UsuarioActual.CveEmpresa)
|
||||
CreaObjetoEmpresa(Usuario)
|
||||
'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
RegistraScript("Ir5();")
|
||||
End If
|
||||
End If
|
||||
dt.Dispose()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
' ObjUsuario.Dispose()
|
||||
|
||||
' If Usuario IsNot Nothing Then
|
||||
' Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
|
||||
' Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
' Usuario.ModoSimulacion = ModoSimulacion
|
||||
' ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
' ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
' If dt IsNot Nothing Then
|
||||
' If dt.Rows.Count >= 1 Then
|
||||
' If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
' Usuario.CvePlataforma = 6
|
||||
' UsuarioActual.CveEmpresa = gvr.DataKey("CveEmpresa").ToEntero()
|
||||
' ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, UsuarioActual.CveEmpresa)
|
||||
' CreaObjetoEmpresa(Usuario)
|
||||
' 'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
' 'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
' RegistraScript("Ir4();")
|
||||
' End If
|
||||
' End If
|
||||
' dt.Dispose()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
'Protected Sub GvPortalProveedor_RowCommand(ByVal sender As Object, ByVal e As GridViewCommandEventArgs) Handles GvPortalProveedor.RowCommand
|
||||
' If e.CommandName = "Cambia" Then
|
||||
' Dim gvr As GridViewRow = DirectCast(DirectCast(e.CommandSource, LinkButton).BindingContainer, GridViewRow)
|
||||
|
||||
' If gvr IsNot Nothing Then
|
||||
' Dim tGrupoEmpresa As String = ""
|
||||
' Dim NombreCadena As String = "Conexion"
|
||||
' Dim Usuario As Usuario = Nothing
|
||||
' 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"
|
||||
' If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tGrupoEmpresa = "FERRETERA"
|
||||
|
||||
' Dim ObjUsuario As New ClsSisUsuarios(NombreCadena:=NombreCadena)
|
||||
' Usuario = ObjUsuario.ValidaUsuarioPortalProveedor(gvr.DataKey("CveProveedor").ToEntero(), gvr.DataKey("Usuario"), gvr.DataKey("Contraseña"))
|
||||
|
||||
' ObjUsuario.Dispose()
|
||||
|
||||
' If Usuario IsNot Nothing Then
|
||||
' Dim dt As Data.DataTable = GlobalDTUsuarios(Usuario.CveUsuario)
|
||||
|
||||
' Dim ModoSimulacion As Boolean = ADSSession.ADSSessionConfig.sessionUser.ModoSimulacion
|
||||
' Usuario.ModoSimulacion = ModoSimulacion
|
||||
' ADSSession.ADSSessionConfig.sessionUser = Usuario
|
||||
' ADSSession.ADSSessionConfig.sessionDpage = False
|
||||
|
||||
' If dt IsNot Nothing Then
|
||||
' If dt.Rows.Count >= 1 Then
|
||||
' If dt.Rows.Count > 1 Then Usuario.MultipleEmpresa = True
|
||||
' Usuario.CvePlataforma = 7
|
||||
' UsuarioActual.CveEmpresa = gvr.DataKey("CveEmpresa").ToEntero()
|
||||
' ADSSession.ADSSessionConfig.SessionManager(ADSSession.OpcionSession.CambiarEmpresa, Nothing, UsuarioActual.CveEmpresa)
|
||||
' CreaObjetoEmpresa(Usuario)
|
||||
' 'si la contraseña es la prederminada, pide la nueva contraseña
|
||||
' 'FormsAuthentication.RedirectFromLoginPage(Encripta(Usuario.CveUsuario.ToString), False)
|
||||
' RegistraScript("Ir5();")
|
||||
' End If
|
||||
' End If
|
||||
' dt.Dispose()
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End Sub
|
||||
|
||||
#Region "F U N C I O N E S"
|
||||
Protected Sub BtnSetWindows_Click(sender As Object, e As System.EventArgs) Handles BtnSetWindows.Click
|
||||
|
||||
@@ -21,45 +21,45 @@ Partial Class Sistemas_Usuarios
|
||||
End Property
|
||||
|
||||
#Region "Permisos"
|
||||
Private Property PermisoEditar As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoEditar"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PermisoEditar As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoEditar"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoEditar") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property PermisoModulos As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoModulos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoModulos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PermisoModulos As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoModulos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoModulos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property PermisoProcesos As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoProcesos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoProcesos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PermisoProcesos As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoProcesos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoProcesos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property PermisoRestablecerContraseña As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoProcesos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoProcesos") = value
|
||||
End Set
|
||||
End Property
|
||||
Private Property PermisoRestablecerContraseña As Boolean
|
||||
Get
|
||||
Return CType(ViewState("PermisoProcesos"), Boolean)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("PermisoProcesos") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
#End Region
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
|
||||
|
||||
@@ -67,12 +67,12 @@ Partial Class Sistemas_Usuarios
|
||||
ViewState("CveRol") = -1
|
||||
CargarEmpresa()
|
||||
CargaDatos()
|
||||
End If
|
||||
End Sub
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
Public Sub CargaDatos()
|
||||
|
||||
Dim Usuario As New ClsSisUsuarios
|
||||
Dim Usuario As New ClsSisUsuarios
|
||||
If Usuario.GetUsuarios(-1, -1, Estatus:=DdlEsatus.SelectedValue.ToEntero) Then
|
||||
If UsuarioActual.CveRol <> 1 Then
|
||||
DtUsuarios = Usuario.DtResultados.FiltraParametros(String.Format("CveEmpresa = {0} AND CveRol <> 1", DdlEmpresa.SelectedValue))
|
||||
@@ -84,13 +84,13 @@ Partial Class Sistemas_Usuarios
|
||||
GvDatos.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Usuario.Dispose()
|
||||
Usuario.Dispose()
|
||||
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
If ViewState("Orden").ToString() <> String.Empty Then
|
||||
CargaGrid(ViewState("Orden").ToString())
|
||||
Else
|
||||
CargaGrid("")
|
||||
End If
|
||||
|
||||
End Sub
|
||||
Protected Sub consultar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Reference in New Issue
Block a user