Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -39,7 +39,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
FI = context.Request("start").ToDate
|
||||
FF = context.Request("end").ToDate
|
||||
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2, CveUsuarioPara:=CveUsuarioPara, CveSubProyecto:=CveSubProyecto) Then
|
||||
If Not GetEventos(CveUsuario, CveEmpresa, FI, FF, CveOS:=-2, CveUsuarioPara:=CveUsuarioPara, CveSubProyecto:=CveSubProyecto, context:=context) Then
|
||||
'Convierte el objeto de Eventos en JSON
|
||||
'Dim oSerializer As System.Web.Script.Serialization.JavaScriptSerializer = New System.Web.Script.Serialization.JavaScriptSerializer
|
||||
Dim sJSON As String = Newtonsoft.Json.JsonConvert.SerializeObject(events)
|
||||
@@ -90,7 +90,7 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End Property
|
||||
|
||||
|
||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||
Private Function GetEventos(CveUsuario As Integer, CveEmpresa As Integer, pFI As Date, pFF As Date, Optional CveOS As Integer = -1, Optional CveUsuarioPara As Integer = -1, Optional CveSubProyecto As Integer = -1, Optional context As HttpContext = Nothing) As Boolean
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
Dim ErrorEventos = False
|
||||
Dim CveEmpresaCRM As Integer = 0
|
||||
@@ -137,7 +137,20 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
End If
|
||||
|
||||
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuarioPara, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF, CveSubProyecto:=CveSubProyecto) Then
|
||||
|
||||
Dim EsCoordinador As Boolean = False
|
||||
|
||||
If context IsNot Nothing AndAlso CveOS = -2 Then
|
||||
Dim usuario As Usuario = UsuarioActual(context)
|
||||
If usuario.TienePermisoProceso(348) Then
|
||||
EsCoordinador = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If ObjEventos.GetEventos(-1, -1, -1, "-1", "-1", -1, CveUsuario, CveUsuarioPara, -1, -1, -1, "-1", -1, -1, -1, -1, CveOS, -1, -1, -1, -1, -1, CveUsuario, CveUsuario, CveUsuario, CveEmpresa, pFI, pFF, CveSubProyecto:=CveSubProyecto, EsCoordinador:=EsCoordinador) Then
|
||||
|
||||
If ObjEventos.DtResultados.Rows.Count > 0 Then
|
||||
events = New List(Of CalendarEvent)
|
||||
@@ -372,5 +385,11 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Return ErrorEventos
|
||||
End Function
|
||||
|
||||
ReadOnly Property UsuarioActual(ByVal context As HttpContext) As Usuario
|
||||
Get
|
||||
UsuarioActual = DirectCast(context.Session("UsuarioSIG"), Usuario)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
|
||||
End Class
|
||||
Reference in New Issue
Block a user