-- mejora en visualización.
This commit is contained in:
@@ -41,10 +41,64 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
context.Response.Write(sJSON)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Exit Select
|
||||
Case "servicio_medicos"
|
||||
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
CveEmpresa = context.Request("E").ToEntero
|
||||
|
||||
Dim CveSubProyecto As Integer = If(context.Request("CveSubProyecto") IsNot Nothing, context.Request("CveSubProyecto").ToEntero, -1)
|
||||
Dim CveUsuarioPara As Integer = If(context.Request("CveUsuarioPara") IsNot Nothing, context.Request("CveUsuarioPara").ToEntero, -1)
|
||||
Dim FechaI As Date = context.Request("start").ToDate
|
||||
Dim FechaF As Date = context.Request("end").ToDate
|
||||
Dim Cvecliente As Integer = -1 'DdlClienteSucursalCliente()
|
||||
Dim CveClienteSucursal As Integer = -1 ' DdlClienteSucursalSucursal()
|
||||
Dim CveVendedor As Integer = -1
|
||||
Dim CveEstatus As Integer = -1
|
||||
Dim ObjOS As New ClsOS
|
||||
|
||||
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, CveVendedor, CveEstatus, CveUsuarioPara, -1, CveEmpresa,
|
||||
CveMedico:=-1, CveProcedimiento:=-1, CveEspecialidad:=-1,
|
||||
CveClienteSucursal:=CveClienteSucursal, CveUsuario:=CveUsuario) Then
|
||||
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
events = New List(Of CalendarEvent)
|
||||
For Each dr As DataRow In ObjOS.DtResultados.Rows
|
||||
Dim cevent As CalendarEvent = New CalendarEvent()
|
||||
cevent.id = dr("CveOS").ToString.ToEntero
|
||||
cevent.title = $" {dr("Tecnico")}-{dr("NombreCliente")}"
|
||||
cevent.description = $" {dr("Tecnico")} -{dr("NombreCliente")} OS# <a href ='/OS/OrdenesServicio.aspx?CveOS={dr("CveOS")}'>{dr("Folio")}</a>"
|
||||
cevent.start = String.Format("{0:s}", dr("FechaCita").ToString.ToDateTime)
|
||||
cevent.end = String.Format("{0:s}", dr("FechaCita").ToString.ToDateTime.AddHours(1))
|
||||
cevent.CveOS = dr("CveOS").ToString.ToEntero
|
||||
cevent.allDay = False
|
||||
If dr("EstatusOSGral").ToString.Contiene("Levantamiento") Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Surtido") Then
|
||||
cevent.backgroundColor = "#002699"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Asignado") Then
|
||||
cevent.backgroundColor = "#025716"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Finalizado") Then
|
||||
cevent.backgroundColor = "#730505"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Facturado") Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Cobrado") Then
|
||||
cevent.backgroundColor = "#007699"
|
||||
ElseIf dr("EstatusOSGral").ToString.Contiene("Cancelado") Then
|
||||
End If
|
||||
events.Add(cevent)
|
||||
Next
|
||||
|
||||
context.Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(events))
|
||||
End If
|
||||
End If
|
||||
ObjOS.Dispose()
|
||||
|
||||
End If
|
||||
Exit Select
|
||||
Case "contrato_transportes"
|
||||
|
||||
@@ -67,17 +121,12 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
context.Response.Write(sJSON)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
Exit Select
|
||||
Case Else
|
||||
Exit Select
|
||||
End Select
|
||||
|
||||
|
||||
|
||||
Else
|
||||
If context.Request("U").ToEntero > 0 Then
|
||||
CveUsuario = context.Request("U").ToEntero
|
||||
@@ -105,23 +154,19 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
|
||||
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 As Boolean = False
|
||||
Dim CveEmpresaCRM As Integer = 0
|
||||
|
||||
Dim DT_SubProyectos As New System.Data.DataTable
|
||||
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
|
||||
Dim DT_EstatusOS As New DataTable
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
'son 26
|
||||
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
|
||||
|
||||
|
||||
If CveOS = -2 Then
|
||||
|
||||
Dim objSub As New ClsSubProyectos
|
||||
@@ -135,8 +180,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
Dim ColorIndex As Integer = 0
|
||||
|
||||
|
||||
|
||||
If DtTempSubproyectos.Rows.Count > 0 Then
|
||||
For Each drow As DataRow In DtTempSubproyectos.Rows
|
||||
|
||||
@@ -164,9 +207,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
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
|
||||
@@ -447,8 +487,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
|
||||
|
||||
If ObjContratos.GetContratos(-1, usuarioActual_.CveEmpresa, TipoContrato:=34) Then
|
||||
|
||||
If ObjContratos.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user