Usuario de norson para rastreo solo en inicio
This commit is contained in:
@@ -91,6 +91,25 @@ Public Class WSGPSApp
|
||||
End Set
|
||||
End Property
|
||||
#End Region
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
|
||||
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 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
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
|
||||
<SoapHeader("Credentials")>
|
||||
<WebMethod>
|
||||
Public Function Login(params As String) As String
|
||||
@@ -134,15 +153,22 @@ Public Class WSGPSApp
|
||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||
Next
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) OrElse UsuarioActual.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCA PARA EL RASTREO SOLO INICIO
|
||||
If UsuarioRetorno.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
|
||||
UsuarioRetorno.Clientes = Clientes
|
||||
DtClientes.Dispose()
|
||||
DtClientes = Nothing
|
||||
@@ -201,18 +227,25 @@ Public Class WSGPSApp
|
||||
Clientes.Add(New WsClientePortalGPS With {.CveCliente = Row("CveCliente").ToString.ToEntero, .Cliente = Row("Cliente").ToString})
|
||||
Next
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioActual.CveCliente <= 0 AndAlso Clientes.Any() Then
|
||||
UsuarioRetorno.CveCliente = Clientes.FirstOrDefault().CveCliente
|
||||
If UsuarioRetorno.CveCliente > 0 Then
|
||||
CreaObjetoEmpresa(UsuarioActual)
|
||||
If UsuarioActual.Empresa.Funcionalidad(704).Contiene(UsuarioRetorno.CveCliente.ToString()) OrElse UsuarioActual.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
'MARCA PARA EL RASTREO SOLO INICIO
|
||||
If UsuarioRetorno.CveUsuario = 3612 Then
|
||||
UsuarioRetorno.RastreoSoloInicio = True
|
||||
End If
|
||||
|
||||
UsuarioRetorno.Clientes = Clientes
|
||||
DtClientes.Dispose()
|
||||
DtClientes = Nothing
|
||||
@@ -1005,13 +1038,6 @@ Public Class WSGPSApp
|
||||
End Function
|
||||
|
||||
#Region "F U N C I O N E S"
|
||||
Private Sub CreaObjetoEmpresa(ByRef UsuarioActual As Usuario)
|
||||
Dim ObjEmpresa As New ClsSisEmpresas()
|
||||
If ObjEmpresa.GetEmpresas(UsuarioActual.CveEmpresa, "-1", "-1", "-1", "-1") Then
|
||||
UsuarioActual.Empresa = ObjEmpresa.Empresa
|
||||
End If
|
||||
ObjEmpresa.Dispose()
|
||||
End Sub
|
||||
Private Function CargarEventos(CveCliente As Integer, FechaI As DateTime, FechaF As DateTime) As MWSDashboard2
|
||||
Dim ObjGPS As New ClsGPS
|
||||
Dim dash As New MWSDashboard2
|
||||
@@ -1139,7 +1165,7 @@ Namespace ADGPSModels
|
||||
Public Property Contrasenia As String
|
||||
|
||||
Public Property TienePermisoOC As Boolean
|
||||
Public Property TienePermisoPS As Boolean
|
||||
Public Property TienePermisoPS As Boolean
|
||||
Public Property RastreoSoloInicio As Boolean = False
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user