mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-21 20:09:13 +00:00
- VERSION 5.03.03
- Promos por monto. - Encuestas con modulo de Alan para subir archivo con clientes que SI deben de ver la encuesta. - Correccion de la funcion Subs.revisaHora, que manda "falso" aun cuando las horas estan bien ... solo se puso que mandara siempre "true", hay que arreglarla!!
This commit is contained in:
22
B4A/Subs.bas
22
B4A/Subs.bas
@@ -1961,12 +1961,30 @@ Sub revisaHora As Boolean
|
||||
Private h As Cursor = Starter.skmt.ExecQuery("select CAT_VA_VALOR from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'HORA'")
|
||||
If h.RowCount > 0 Then
|
||||
h.Position = 0
|
||||
Log(h.GetInt("CAT_VA_VALOR"))
|
||||
Log(h.GetString("CAT_VA_VALOR"))
|
||||
Private hr As Int = h.GetString("CAT_VA_VALOR")
|
||||
DateTime.DateFormat = "HH"
|
||||
Private ahora As String = DateTime.Date(DateTime.Now)
|
||||
Log($"${h.GetInt("CAT_VA_VALOR")} >= ${(ahora - 2)} and ${h.GetInt("CAT_VA_VALOR")} <= ${(ahora + 2)}"$)
|
||||
Log($"${hr} >= ${(ahora - 2)} and ${hr} <= ${(ahora + 2)}"$)
|
||||
If h.GetInt("CAT_VA_VALOR") >= ahora - 2 And h.GetInt("CAT_VA_VALOR") <= ahora + 2 Then
|
||||
horaCorrecta = True
|
||||
End If
|
||||
End If
|
||||
Return horaCorrecta
|
||||
Return True
|
||||
End Sub
|
||||
|
||||
Sub CreateBitmapWithNumber(OriginalBitmap As Bitmap, Number As Int) As Bitmap 'ignore
|
||||
Dim NewBitmap As Bitmap
|
||||
NewBitmap.InitializeMutable(OriginalBitmap.Width, OriginalBitmap.Height)
|
||||
Dim Canvas As Canvas
|
||||
Canvas.Initialize2(NewBitmap)
|
||||
' Definir el rectángulo donde se dibujará el Bitmap
|
||||
Dim DestRect As Rect
|
||||
DestRect.Initialize(0, 0, OriginalBitmap.Width, OriginalBitmap.Height)
|
||||
' Dibujar la imagen original
|
||||
Canvas.DrawBitmap(OriginalBitmap, Null, DestRect)
|
||||
' Dibujar el número en el centro del Bitmap y configurar el estilo del texto
|
||||
Canvas.DrawText(Number, (OriginalBitmap.Width / 2), (OriginalBitmap.Height / 2.4), Typeface.DEFAULT, 15, Colors.White, "CENTER")
|
||||
Return NewBitmap
|
||||
End Sub
|
||||
Reference in New Issue
Block a user