mirror of
https://github.com/KeymonSoft/Intmex_Preventa.git
synced 2026-04-18 05:09:25 +00:00
Se agregó la función "guardaAppInfo" a Subs
This commit is contained in:
@@ -11,7 +11,6 @@ Version=9.85
|
||||
'Ctrl + click para sincronizar con Github Desktop ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=github&Args=..\..\
|
||||
#End Region
|
||||
|
||||
|
||||
Sub Class_Globals
|
||||
Private Root As B4XView
|
||||
Private xui As XUI
|
||||
@@ -128,8 +127,8 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
B4XPages.AddPage("Historico", historico)
|
||||
ruta = Starter.ruta
|
||||
Provider.Initialize
|
||||
Subs.borraArribaDe100Errores ' Para Websockets
|
||||
Subs.borraArribaDe600RenglonesBitacora ' Para Websockets
|
||||
' Subs.borraArribaDe100Errores ' Para Websockets
|
||||
' Subs.borraArribaDe600RenglonesBitacora ' Para Websockets
|
||||
If File.Exists(ruta, "kmt.db") = False Then
|
||||
File.Copy(File.DirAssets, "kmt.db", ruta, "kmt.db")
|
||||
LogColor("copiamos kmt.db de "&File.DirAssets & " a " & ruta,Colors.Green)
|
||||
@@ -137,6 +136,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
|
||||
Log(ruta)
|
||||
skmt.Initialize(ruta,"kmt.db", True)
|
||||
Subs.guardaAppInfo(skmt)
|
||||
skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_CUOTAS (HC_META6 TEXT, HC_META5 TEXT, HC_META4 TEXT, HC_META3 TEXT, HC_META2 TEXT, HC_META1 TEXT, HC_RUTA TEXT, HC_CUOTA1 TEXT, HC_CUOTA2 TEXT, HC_CUOTA3 TEXT, HC_CUOTA4 TEXT, HC_CUOTA5 TEXT, HC_CUOTA6 TEXT)")
|
||||
skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_GPS (HGDATE TEXT, HGLAT TEXT, HGLON TEXT)")
|
||||
skmt.ExecNonQuery("CREATE TABLE IF NOT EXISTS HIST_STAY_STORE (HSS_CODIGO TEXT, HSS_IN TEXT, HSS_OUT TEXT, HSS_TOT TEXT)")
|
||||
|
||||
@@ -1020,7 +1020,7 @@ Sub JobDone(Job As HttpJob)
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO HIST_STAY_STORE(HSS_CODIGO, HSS_IN , HSS_OUT , HSS_TOT) VALUES (?,0,0,0)", Array As Object (CAT_CL_CODIGO))
|
||||
Next
|
||||
Listo1 = 1
|
||||
S_CC.Text = "REVISANDO ..."
|
||||
S_CC.Text = "LISTO"
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Catalogo Clientes Actualizados." , True)
|
||||
If Listo1 =1 And Listo2 =1 And Listo3 = 1 And Listo4 = 1 Then
|
||||
B4XPage_Appear
|
||||
@@ -1085,7 +1085,7 @@ Sub JobDone(Job As HttpJob)
|
||||
' Msgbox("pasa","alo")
|
||||
Next
|
||||
Listo1 = 1
|
||||
S_CC.Text = "REVISANDO ..."
|
||||
S_CC.Text = "LISTO"
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Catalogo Resumen Actualizado." , True)
|
||||
End If
|
||||
End If
|
||||
@@ -1106,7 +1106,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB1.Progress = 60
|
||||
ELSE IF PB1.Progress = 60 Then
|
||||
PB1.Progress = 100
|
||||
S_CH.Text = "REVISANDO ..."
|
||||
S_CH.Text = "LISTO"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1153,7 +1153,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB1.Progress = 60
|
||||
ELSE IF PB1.Progress = 60 Then
|
||||
PB1.Progress = 100
|
||||
S_CH.Text = "REVISANDO ..."
|
||||
S_CH.Text = "LISTO"
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
@@ -1250,7 +1250,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB2.Progress = 60
|
||||
ELSE IF PB2.Progress = 60 Then
|
||||
PB2.Progress = 100
|
||||
S_CP.Text = "REVISANDO ..."
|
||||
S_CP.Text = "LISTO"
|
||||
End If
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Productos Actualizados." , True)
|
||||
If Listo1 =1 And Listo2 =1 And Listo3 = 1 And Listo4 = 1 Then
|
||||
@@ -1291,7 +1291,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB2.Progress = 60
|
||||
ELSE IF PB2.Progress = 60 Then
|
||||
PB2.Progress = 100
|
||||
S_CP.Text = "REVISANDO ..."
|
||||
S_CP.Text = "LISTO"
|
||||
End If
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Promociones Actualizados." , True)
|
||||
Listo4=1
|
||||
@@ -1335,7 +1335,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB2.Progress = 60
|
||||
ELSE IF PB2.Progress = 60 Then
|
||||
PB2.Progress = 100
|
||||
S_CP.Text = "REVISANDO ..."
|
||||
S_CP.Text = "LISTO"
|
||||
Log("3")
|
||||
End If
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Promociones especiales Actualizados." , True)
|
||||
@@ -1377,7 +1377,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB2.Progress = 60
|
||||
ELSE IF PB2.Progress = 60 Then
|
||||
PB2.Progress = 100
|
||||
S_CP.Text = "REVISANDO ..."
|
||||
S_CP.Text = "LISTO"
|
||||
End If
|
||||
Listo3 =1
|
||||
If Listo1 =1 And Listo2 =1 And Listo3 = 1 And Listo4 = 1 Then
|
||||
@@ -1411,7 +1411,7 @@ Sub JobDone(Job As HttpJob)
|
||||
PB1.Progress = 60
|
||||
ELSE IF PB1.Progress = 60 Then
|
||||
PB1.Progress = 100
|
||||
S_CH.Text = "REVISANDO ..."
|
||||
S_CH.Text = "LISTO"
|
||||
End If
|
||||
If Starter.marcaCel <> "Sony" Then ToastMessageShow("Venta historico Actualizado." , True)
|
||||
If Listo1 =1 And Listo2 =1 And Listo3 = 1 And Listo4 = 1 Then
|
||||
|
||||
@@ -17,7 +17,6 @@ Version=11
|
||||
' ToastMessageShow("¡BD importada!", False)
|
||||
' End Sub
|
||||
|
||||
|
||||
Sub Class_Globals
|
||||
#if B4A
|
||||
Private ion As Object
|
||||
|
||||
@@ -1317,4 +1317,11 @@ Sub logJobDoneResultados(resultado As DBResult)
|
||||
LogColor(k & " = " & records(resultado.Columns.Get(k)), Colors.RGB(215,37,0))
|
||||
Next
|
||||
Next
|
||||
End Sub
|
||||
|
||||
'Guarda la empresa y version de la app en CAT_VARIABLES.
|
||||
Sub guardaAppInfo(skmt As SQL)
|
||||
skmt.ExecNonQuery("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'EMPRESA' or CAT_VA_DESCRIPCION = 'APP_VERSION'")
|
||||
skmt.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('EMPRESA', 'Intmex')"$)
|
||||
skmt.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('APP_VERSION', '${Application.VersionName}')"$)
|
||||
End Sub
|
||||
Reference in New Issue
Block a user