Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
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
|
||||
@@ -1232,14 +1232,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function GETUMSAT(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTPSATUM") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetSATUnidadMedida Then context.Application("GlobalDTPSATUM") = ObjGrales.DtResultados.AsEnumerable() Else context.Application("GlobalDTPSATUM") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
|
||||
Dim DTUM = ClsPaginas.GlobalDTPSATUM 'DirectCast(context.Application("GlobalDTPSATUM"), EnumerableRowCollection(Of DataRow))
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
@@ -1271,14 +1264,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function GETSATMaterialPeligroso(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTMaterialPeligroso") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetMaterialPeligroso Then context.Application("GlobalDTMaterialPeligroso") = ObjGrales.DtResultados Else context.Application("GlobalDTMaterialPeligroso") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTMaterialPeligroso"), DataTable).AsEnumerable
|
||||
Dim DTUM = DirectCast(ClsPaginas.GlobalDTMaterialPeligroso, DataTable).AsEnumerable
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
@@ -1308,14 +1294,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function GETSATEmbalajes(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
|
||||
If context.Application("GlobalDTEmbalajes") Is Nothing Then
|
||||
Dim ObjGrales As New ClsGenerales
|
||||
If ObjGrales.GetEmbalajes Then context.Application("GlobalDTEmbalajes") = ObjGrales.DtResultados Else context.Application("GlobalDTEmbalajes") = Nothing
|
||||
ObjGrales.Dispose()
|
||||
End If
|
||||
|
||||
Dim DTUM = DirectCast(context.Application("GlobalDTEmbalajes"), DataTable).AsEnumerable
|
||||
Dim DTUM = DirectCast(ClsPaginas.GlobalDTEmbalajes, DataTable).AsEnumerable
|
||||
Dim DtPSRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
@@ -1349,7 +1328,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState
|
||||
Private Function GetFraccionArancelaria(ByVal context As HttpContext) As String
|
||||
Dim retorno As String = ""
|
||||
|
||||
Dim DT = DirectCast(context.Application("GlobalDTFraccionArancelaria"), EnumerableRowCollection(Of DataRow))
|
||||
Dim DT = ClsPaginas.GlobalDTFraccionArancelaria
|
||||
Dim DtRetorno As DataTable
|
||||
|
||||
Dim Name = IfNull(context.Request("Name"), "-1").ToString
|
||||
|
||||
Reference in New Issue
Block a user