-- cambio de clase de validación de usuario
This commit is contained in:
@@ -474,7 +474,7 @@ Public Class WSSIGApp
|
||||
If Not IsNothing(Entrada) Then
|
||||
If IsCurrentDate(Entrada.Ticks) Then
|
||||
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
Dim ObjUsuarios As New ClsSisUsuarioAutenticacion
|
||||
Dim UsuarioActual = ObjUsuarios.ValidaUsuario(Entrada.Usuario, Encripta(Entrada.Contrasenia), IMEI)
|
||||
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
@@ -491,8 +491,8 @@ Public Class WSSIGApp
|
||||
|
||||
Dim UsuariosModulos As New List(Of WsModulos)
|
||||
Dim Empresas As New List(Of WsEmpresa)
|
||||
|
||||
If ObjUsuarios.GetUsuariosModulos(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
Dim objUsr As New ClsSisUsuarios(UsuarioActual:=UsuarioActual)
|
||||
If objUsr.GetUsuariosModulos(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
Dim dttmp As DataTable = ObjUsuarios.DtResultados.FiltraParametros("CvePlataforma = 4")
|
||||
For Each Row As DataRow In dttmp.Rows
|
||||
UsuariosModulos.Add(New WsModulos With {.CveModulo = Row("CveModulo").ToString.ToEntero, .CvePadre = Row("CvePadre").ToString.ToEntero, .CvePlataforma = 4, .Estilo = Row("Estilo").ToString, .Liga = Row("Liga").ToString, .Modulo = Row("Modulo").ToString})
|
||||
@@ -511,7 +511,7 @@ Public Class WSSIGApp
|
||||
' End If
|
||||
'End If
|
||||
|
||||
If ObjUsuarios.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
If objUsr.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
For Each Row As DataRow In ObjUsuarios.DtResultados.FiltraParametros("", "", {"CveEmpresa", "CveEncuestaCRM", "Empresa", "Tipo_CentroCosto"}).Rows
|
||||
Empresas.Add(New WsEmpresa With {
|
||||
.CveEmpresa = Row("CveEmpresa").ToString.ToEntero(),
|
||||
@@ -523,7 +523,7 @@ Public Class WSSIGApp
|
||||
|
||||
Salida.Empresas = Empresas
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
objUsr.Dispose()
|
||||
retorno = Encripta(JsonConvert.SerializeObject(Salida), "AES")
|
||||
End If
|
||||
End If
|
||||
@@ -548,7 +548,7 @@ Public Class WSSIGApp
|
||||
Dim Salida As WSUSER = Nothing
|
||||
Try
|
||||
|
||||
Dim tUsuario As New ClsSisUsuarios
|
||||
Dim tUsuario As New ClsSisUsuarioAutenticacion
|
||||
Dim UsuarioActual = tUsuario.ValidaUsuario(Usuario, Encripta(Contrasenia), IMEI)
|
||||
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
@@ -565,18 +565,20 @@ Public Class WSSIGApp
|
||||
|
||||
Dim UsuariosModulos As New List(Of WsModulos)
|
||||
Dim Empresas As New List(Of WsEmpresa)
|
||||
If tUsuario.GetUsuariosModulos(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
Dim objUsr As New ClsSisUsuarios(UsuarioActual:=UsuarioActual)
|
||||
If objUsr.GetUsuariosModulos(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
Dim dttmp As DataTable = tUsuario.DtResultados.FiltraParametros("CvePlataforma = 4")
|
||||
For Each Row As DataRow In dttmp.Rows
|
||||
UsuariosModulos.Add(New WsModulos With {.CveModulo = Row("CveModulo").ToString.ToEntero, .CvePadre = Row("CvePadre").ToString.ToEntero, .CvePlataforma = 4, .Estilo = Row("Estilo").ToString, .Liga = Row("Liga").ToString, .Modulo = Row("Modulo").ToString})
|
||||
Next
|
||||
End If
|
||||
Salida.Modulos = UsuariosModulos
|
||||
If tUsuario.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
If objUsr.GetUsuariosEmpresas(Salida.CveUsuario, Salida.CveEmpresa) Then
|
||||
For Each Row As DataRow In tUsuario.DtResultados.Rows
|
||||
Empresas.Add(New WsEmpresa With {.CveEmpresa = Row("CveEmpresa").ToString.ToEntero, .Empresa = Row("Empresa").ToString})
|
||||
Next
|
||||
End If
|
||||
objUsr.Dispose()
|
||||
Salida.Empresas = Empresas
|
||||
retorno = JsonConvert.SerializeObject(Salida)
|
||||
End If
|
||||
@@ -603,7 +605,7 @@ Public Class WSSIGApp
|
||||
Dim Ent = JsonConvert.DeserializeAnonymousType(decripParams, Estructura)
|
||||
|
||||
If IsCurrentDate(Ent.Ticks) Then
|
||||
Dim tUsuario As New ClsSisUsuarios
|
||||
Dim tUsuario As New ClsSisUsuarioAutenticacion
|
||||
Dim UsuarioActual = tUsuario.ValidaUsuario(Ent.Usuario, Ent.Contrasenia, IMEI)
|
||||
tUsuario.Dispose()
|
||||
|
||||
@@ -1784,15 +1786,15 @@ Public Class WSSIGApp
|
||||
Public Function AddVentas(TipoDocto As String, CveCliente As Integer, CveSubProyecto As Integer, CveUsuario As Integer, SubTotal As Decimal, IVA As Decimal, CveMoneda As Integer, Observaciones As String, Productos As String) As String
|
||||
Dim Retorno = New Modelos.Factura.MMensajeFactura()
|
||||
Try
|
||||
Dim ObjUsuarios As New ClsSisUsuarios()
|
||||
Dim UsuarioActual As Usuario = Nothing
|
||||
If ObjUsuarios.GetUsuarios(CveUsuario) Then
|
||||
Dim ObjUsuarios As New ClsSisUsuarioAutenticacion
|
||||
Dim UsuarioActual As Usuario = ObjUsuarios.GetUsuarioDetalle(CveUsuario)
|
||||
If UsuarioActual IsNot Nothing Then
|
||||
Dim Usuario = ObjUsuarios.DtResultados.Rows(0)("Usuario").ToString()
|
||||
Dim Contrasenia = ObjUsuarios.DtResultados.Rows(0)("Contraseña").ToString()
|
||||
|
||||
If ObjUsuarios.DtResultados.Rows.Count = 1 Then
|
||||
UsuarioActual = ObjUsuarios.ValidaUsuario(Usuario, Contrasenia, IMEI)
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
' CreaObjetoEmpresa(UsuarioActual)
|
||||
End If
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
|
||||
Reference in New Issue
Block a user