--Se hicieron descomentó propiedad de EstatusContratos por que se utilizaría en V&A y se modifican los métodos correspondientes. Se agrega código de color al método de GetContratos de CargaEvento.ashx dependiendo el estatus del contrato. Se agregan los datakey a GvContratos, la columna de estatus con el mismo código de color que en CargaEventos y se hace limpieza en VB .Se agrega al listado en calendario los textbox para elegir tipo de unidad y AF para el contrato y se ocultan los campos de costos en el modal.

This commit is contained in:
AbrahamCastilloV
2024-02-05 15:46:41 -07:00
parent c24b378b66
commit af7f9069b0
6 changed files with 572 additions and 537 deletions

View File

@@ -442,7 +442,6 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
Dim DT_EstatusOS As New DataTable
Dim usuarioActual_ As Usuario = UsuarioActual(context)
Dim ErrorEventos As Boolean = False
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"}
Dim tipoVista As String = context.Request("tipoVista")
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
DT_SubProyectos.Columns.Add("backgroundColor")
@@ -458,19 +457,31 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
For Each dr As DataRow In ObjContratos.DtResultados.Rows
Dim cevent As CalendarEvent = New CalendarEvent()
Dim estatus As Integer = dr("EstatusContrato").ToString.ToEntero
cevent.id = dr("CveContrato").ToString.ToEntero
cevent.title = dr("DescripcionContrato").ToString
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime)) 'Agregar una hora, fecha final como default
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.allDay = False
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveCliente = dr("CveCliente").ToString.ToEntero
cevent.CveActivoFijo = dr("CveTipoAF").ToString.ToEntero
cevent.CvePersonal = dr("CveChofer").ToString.ToEntero
cevent.Dolares = dr("Importe").ToString.ToDecimal
cevent.Pesos = dr("ImporteMax").ToString.ToDecimal
cevent.Anticipo = dr("ImporteMin").ToString.ToDecimal
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
Select Case estatus
Case 1
cevent.backgroundColor = "#45B6AF"
Case 2
cevent.backgroundColor = "#89C4F4"
Case 3
cevent.backgroundColor = "#F3565D"
End Select
If Not cevent.recurrenciatipo > 0 Then
@@ -554,24 +565,9 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
cevent.start = String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime)
cevent.end = If(tipoVista = "fecha", String.Format("{0:s}", dr("FechaInicial").ToString.ToDateTime.AddHours(1)), String.Format("{0:s}", dr("FechaFinal").ToString.ToDateTime))
cevent.NombreAcercamiento = dr("Ubicacion").ToString
cevent.CveActivoFijo = dr("CveAF").ToString.ToEntero
cevent.allDay = False
'cevent.CveEventoEstatus = dr("NumeroContrato").ToString.ToEntero
'cevent.CveEventoEstatus = dr("CveEventoEstatus").ToString.ToEntero
'cevent.cveagendatipo = dr("CveAgendaTipo").ToString
'cevent.prioridad = dr("CvePrioridad").ToString.ToEntero
'cevent.backgroundColor = dr("BackGroundColor").ToString
'cevent.recurrenciatipo = dr("RecurrenciaTipo").ToString.ToEntero
'cevent.frecuencia = dr("Frecuencia").ToString.ToEntero
'cevent.diassemana = dr("DiasSemana").ToString
'cevent.dia = dr("Dia").ToString.ToEntero
'cevent.mes = dr("Mes").ToString.ToEntero
'cevent.recurrenciafin = dr("RecurrenciaFin").ToString
'cevent.CveProspecto = dr("CveProspecto").ToString.ToEntero
'cevent.Prospecto = dr("Prospecto").ToString
'11/05/2018 - Evento Gasto Recurrente
'SI LA FECHA DEL EVENTO ES MENOR DE 6 MESES DE LA FECHA ACTUAL NO LO AGREGA