Se agregaron las categorias de los productos y se configuro el engrane para que solo se vea con KMTS1

This commit is contained in:
2024-02-14 16:34:43 -06:00
parent 3fea2efa9e
commit 4d02d524a4
10 changed files with 579 additions and 392 deletions

View File

@@ -45,6 +45,7 @@ Sub Class_Globals
Private p_botones As Panel
Private Label3 As Label
Private p_server As Panel
dim atrasPresionado as Boolean = False
End Sub
Public Sub Initialize
@@ -90,10 +91,9 @@ Private Sub B4XPage_CloseRequest As ResumableSub
p_configuracion.Visible = False
Return False
Else
' If logger Then Log("Saliendo")
' B4XPages.ClosePage(Me)
' Subs.cierraActividades
' Return True
If atrasPresionado Then ExitApplication 'Solo salimos de la aplicación si se presiona 'Atras' 2 veces seguidas.
ToastMessageShow("Presiona 'Atras' nuevamente para salir de la aplicación.", False)
atrasPresionado = True
End If
Return False
End Sub
@@ -186,7 +186,7 @@ Sub JobDone(Job As HttpJob)
Starter.skmt.ExecNonQuery("delete from cat_gunaprod")
Starter.skmt.BeginTransaction
For Each records() As Object In result.Rows
Log($"ID: ${records(result.Columns.Get("CAT_GP_ID"))}, NOM: ${records(result.Columns.Get("CAT_GP_NOMBRE"))}"$)
' Log($"ID: ${records(result.Columns.Get("CAT_GP_ID"))}, NOM: ${records(result.Columns.Get("CAT_GP_NOMBRE"))}"$)
Dim CAT_GP_ID As String = records(result.Columns.Get("CAT_GP_ID"))
Dim CAT_GP_NOMBRE As String = records(result.Columns.Get("CAT_GP_NOMBRE"))
Dim CAT_GP_PRECIO As String = records(result.Columns.Get("CAT_GP_PRECIO"))
@@ -206,7 +206,7 @@ Sub JobDone(Job As HttpJob)
Starter.skmt.ExecNonQuery("delete from CAT_MESAS")
Starter.skmt.BeginTransaction
For Each records() As Object In result.Rows
Log($"ID: ${records(result.Columns.Get("M_ID"))}, NOM: ${records(result.Columns.Get("M_NOMBRE"))}"$)
' Log($"ID: ${records(result.Columns.Get("M_ID"))}, NOM: ${records(result.Columns.Get("M_NOMBRE"))}"$)
Dim M_ID As String = records(result.Columns.Get("M_ID"))
Dim M_NOMBRE As String = records(result.Columns.Get("M_NOMBRE"))
Dim M_NUMERO As String = records(result.Columns.Get("M_NUMERO"))
@@ -222,7 +222,7 @@ Sub JobDone(Job As HttpJob)
Starter.skmt.ExecNonQuery("delete from CAT_MESEROS")
Starter.skmt.BeginTransaction
For Each records() As Object In result.Rows
Log($"ID: ${records(result.Columns.Get("MS_ID"))}, NOM: ${records(result.Columns.Get("MS_NOMBRE"))}"$)
' Log($"ID: ${records(result.Columns.Get("MS_ID"))}, NOM: ${records(result.Columns.Get("MS_NOMBRE"))}"$)
Dim MS_ID As String = records(result.Columns.Get("MS_ID"))
Dim MS_NOMBRE As String = records(result.Columns.Get("MS_NOMBRE"))
Dim MS_MESAS_ASIGNADAS As String = records(result.Columns.Get("MS_MESAS_ASIGNADAS"))
@@ -230,13 +230,19 @@ Sub JobDone(Job As HttpJob)
Next
Starter.skmt.TransactionSuccessful 'Si no se pone TransactionSuccessful no se escribe NADA!!
Starter.skmt.EndTransaction
B4XPages.MainPage.principal.cb_mesero.SetItems(Subs.traeMeserosLista)
If B4XPages.MainPage.principal.cb_mesero.IsInitialized Then B4XPages.MainPage.principal.cb_mesero.SetItems(Subs.traeMeserosLista)
End If
End If
End If
ToastMessageShow("¡Información cargada!", False)
Job.Release
End Sub
Private Sub b_entrar_LongClick
' Dim a As Int = "a"
' Subs.alineaDerecha(NumberFormat2(1450, 1, 2, 2, True), 30, ".")
End Sub
Private Sub user_TextChanged (Old As String, New As String)
If New = "KMTS1" Then i_conf.Visible = True Else i_conf.Visible = False
End Sub