From 2be66abbb9b9c3fc5fa80c80797fa55e0da946a6 Mon Sep 17 00:00:00 2001 From: cheveguerra Date: Tue, 5 Sep 2023 15:05:32 -0600 Subject: [PATCH] Para que guarde app info en CAT_VARIABLES --- durakelo.b4a | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/durakelo.b4a b/durakelo.b4a index 4b75080..9cd38a1 100644 --- a/durakelo.b4a +++ b/durakelo.b4a @@ -772,12 +772,12 @@ Module9=fila NumberOfFiles=357 NumberOfLibraries=30 NumberOfModules=24 -Version=12.2 +Version=11.5 @EndOfDesignText@ #Region Project Attributes #ApplicationLabel: Durakelo-Venta #VersionCode: 1 - #VersionName: 2.58Gi + #VersionName: 3.09.05 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False @@ -873,6 +873,7 @@ Sub Activity_Create(FirstTime As Boolean) If Logger Then Log("kmt en 0, copiamos kmt.db") End If skmt.Initialize(ruta,"kmt.db", True) + guardaAppInfo(skmt) 'c=skmt.ExecQuery2("select COUNT(*) AS CUANTOS from CAT_CODIGOS where CAT_CO_PONDERACION =1 AND CAT_CO_ACCION = ?", Array As String("SERVER")) 'c.Position =0 @@ -1348,4 +1349,12 @@ Sub copiaDB Else ToastMessageShow("Sin permisos", True) End If +End Sub + + +'Guarda la empresa y version de la app en CAT_VARIABLES. +Sub guardaAppInfo(skmt2 As SQL) + skmt2.ExecNonQuery("delete from CAT_VARIABLES where CAT_VA_DESCRIPCION = 'EMPRESA' or CAT_VA_DESCRIPCION = 'APP_VERSION'") + skmt2.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('EMPRESA', '${Application.LabelName}')"$) + skmt2.ExecNonQuery($"insert into CAT_VARIABLES (CAT_VA_DESCRIPCION, CAT_VA_VALOR) values ('APP_VERSION', '${Application.VersionName}')"$) End Sub \ No newline at end of file