- cambios en login de acceso
This commit is contained in:
@@ -189,16 +189,12 @@ Public Class ClsSisUsuarios
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function ValidaUsuario(Usuario As String, Password As String, tIMEI As String, Optional CveEmpresa As Integer = -1, Optional GrupoEmpresa As String = "", Optional CvePlataforma As Integer = -1) As Usuario
|
Public Function ValidaUsuario(Usuario As String, Password As String, Optional CveEmpresa As Integer = -1, Optional GrupoEmpresa As String = "") As Usuario
|
||||||
Dim Retorno As Usuario = Nothing
|
Dim Retorno As Usuario = Nothing
|
||||||
DataAdapter("PA_Sis_UsuariosGet")
|
DataAdapter("PA_Sis_UsuarioValidacionGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = -1
|
|
||||||
.Add("@CveRol", SqlDbType.Int).Value = -1
|
|
||||||
.Add("@Usuario", SqlDbType.VarChar).Value = Usuario
|
.Add("@Usuario", SqlDbType.VarChar).Value = Usuario
|
||||||
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
||||||
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
|
|
||||||
.Add("@EsLogIn", SqlDbType.Bit).Value = 1
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@GrupoEmpresa", SqlDbType.VarChar).Value = GrupoEmpresa
|
.Add("@GrupoEmpresa", SqlDbType.VarChar).Value = GrupoEmpresa
|
||||||
End With
|
End With
|
||||||
|
|||||||
@@ -3531,7 +3531,7 @@ Public Class ClsVentas
|
|||||||
CveVentasError.Add(PCveVenta.ToEntero)
|
CveVentasError.Add(PCveVenta.ToEntero)
|
||||||
Continue For
|
Continue For
|
||||||
End If
|
End If
|
||||||
Usuario = ObjUsuario.ValidaUsuario(Nombre, Contraseña, IMEI)
|
Usuario = ObjUsuario.ValidaUsuario(Nombre, Contraseña)
|
||||||
|
|
||||||
If ObjEmpresa.GetEmpresas(pCveEmpresa, "-1", "-1", "-1", "-1") Then
|
If ObjEmpresa.GetEmpresas(pCveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
Usuario.Empresa = ObjEmpresa.Empresa
|
Usuario.Empresa = ObjEmpresa.Empresa
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ Namespace SIG
|
|||||||
Dim Retorno As List(Of String) = Nothing
|
Dim Retorno As List(Of String) = Nothing
|
||||||
If continuar Then
|
If continuar Then
|
||||||
Using objuser As New ClsSisUsuarios
|
Using objuser As New ClsSisUsuarios
|
||||||
Dim user As Usuario = objuser.ValidaUsuario(username, Extensiones.ModExtensiones.Encripta(password), "-1", CveEmpresastr.ToEntero())
|
Dim user As Usuario = objuser.ValidaUsuario(username, Extensiones.ModExtensiones.Encripta(password), CveEmpresa:=CveEmpresastr.ToEntero())
|
||||||
|
|
||||||
Dim OjEmpresa As Empresa = Nothing
|
Dim OjEmpresa As Empresa = Nothing
|
||||||
If user IsNot Nothing Then
|
If user IsNot Nothing Then
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ Public Class WsSIGWeb
|
|||||||
|
|
||||||
If ObjUsuario.GetUsuarios(CveUsuario, -1, -1) Then
|
If ObjUsuario.GetUsuarios(CveUsuario, -1, -1) Then
|
||||||
Contraseña = ObjUsuario.DtResultados.Rows(0)("Contraseña").ToString
|
Contraseña = ObjUsuario.DtResultados.Rows(0)("Contraseña").ToString
|
||||||
Usuario = ObjUsuario.ValidaUsuario(Nombre, Contraseña, IMEI)
|
Usuario = ObjUsuario.ValidaUsuario(Nombre, Contraseña)
|
||||||
|
|
||||||
If ObjEmpresa.GetEmpresas(pCveEmpresa, "-1", "-1", "-1", "-1") Then
|
If ObjEmpresa.GetEmpresas(pCveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||||
Usuario.Empresa = ObjEmpresa.Empresa
|
Usuario.Empresa = ObjEmpresa.Empresa
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ Public Class wsSIG
|
|||||||
Dim ttDato As Usuario
|
Dim ttDato As Usuario
|
||||||
Dim tUsuario As New ClsSisUsuarios
|
Dim tUsuario As New ClsSisUsuarios
|
||||||
|
|
||||||
ttDato = tUsuario.ValidaUsuario(Usuario, Encripta(Contrasenia), IMEI)
|
ttDato = tUsuario.ValidaUsuario(Usuario, Encripta(Contrasenia))
|
||||||
|
|
||||||
If ttDato IsNot Nothing Then
|
If ttDato IsNot Nothing Then
|
||||||
Retorno = New UsuarioWs
|
Retorno = New UsuarioWs
|
||||||
@@ -92,7 +92,7 @@ Public Class wsSIG
|
|||||||
|
|
||||||
Dim ttDato As Usuario = Nothing
|
Dim ttDato As Usuario = Nothing
|
||||||
Using tUsuario As New ClsSisUsuarios()
|
Using tUsuario As New ClsSisUsuarios()
|
||||||
ttDato = tUsuario.ValidaUsuario(Usuario, Encripta(Contrasenia), IMEI, CveEmpresa)
|
ttDato = tUsuario.ValidaUsuario(Usuario, Encripta(Contrasenia), CveEmpresa:=CveEmpresa)
|
||||||
End Using
|
End Using
|
||||||
If validatesubproyecto Then
|
If validatesubproyecto Then
|
||||||
|
|
||||||
@@ -693,7 +693,7 @@ Public Class wsSIG
|
|||||||
Dim ttDato As Usuario
|
Dim ttDato As Usuario
|
||||||
Dim tUsuario As New ClsSisUsuarios
|
Dim tUsuario As New ClsSisUsuarios
|
||||||
|
|
||||||
ttDato = tUsuario.ValidaUsuario(objuser.Usuario, Encripta(objuser.Contrasenia), IMEI)
|
ttDato = tUsuario.ValidaUsuario(objuser.Usuario, Encripta(objuser.Contrasenia))
|
||||||
|
|
||||||
If ttDato IsNot Nothing Then
|
If ttDato IsNot Nothing Then
|
||||||
Retorno = New UsuarioWs
|
Retorno = New UsuarioWs
|
||||||
|
|||||||
Reference in New Issue
Block a user