Para que guarde app info en CAT_VARIABLES

This commit is contained in:
2023-09-05 15:05:32 -06:00
parent ec48b616d2
commit 2be66abbb9

View File

@@ -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