Ventas medicas fuera de linea
This commit is contained in:
@@ -100,6 +100,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
|
||||
Dim DT_EstatusOS = New DataTable
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
|
||||
'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"}
|
||||
|
||||
@@ -140,6 +144,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim EsCoordinador As Boolean = False
|
||||
|
||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||
@@ -239,17 +245,24 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
|
||||
|
||||
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||
cevent.backgroundColor = "#025716"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
|
||||
cevent.backgroundColor = "#730505"
|
||||
Dim colorString As String = dr("BackgroundColorOS").ToString.Trim
|
||||
|
||||
If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then
|
||||
cevent.backgroundColor = $"#{colorString}"
|
||||
Else
|
||||
cevent.backgroundColor = "#006699"
|
||||
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||
cevent.backgroundColor = "#025716"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
|
||||
cevent.backgroundColor = "#730505"
|
||||
Else
|
||||
cevent.backgroundColor = "#006699"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'VERIFICAMOS SI TIENE O NO RECURRENCIA
|
||||
@@ -424,5 +437,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Function IsValidHtmlColor(colorString As String) As Boolean
|
||||
Try
|
||||
Dim color As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml(colorString)
|
||||
' Si no se produce una excepción, el color es válido
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' Se produce una excepción, el color no es válido
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user