- VERSION 4.06.30

- Se deshablilitó el boton de CARGAR cuando se hace click en el para evitar que se dupliquen los datos al cargar dia.
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-07-01 15:03:54 -06:00
parent d67e477581
commit 9add55313d
4 changed files with 15 additions and 7 deletions

View File

@@ -572,6 +572,7 @@ End Sub
Sub cargar_Click
'Para descargar el PDF de la carta porte /////////////////////////////////////////////////////////////////////////
cargar.Enabled = False
DateTime.DateFormat = "yyyyMMdd"
Dim hoy As String = DateTime.Date(DateTime.Now)
' If Logger Then Log(DateTime.Date(File.LastModified(File.DirInternal,"cartaPorte.pdf")) & " - " & hoy )
@@ -597,8 +598,12 @@ Sub cargar_Click
cartaPorteLista = True
If logger Then LogColor("Ya hay carta porte con fecha de hoy", Colors.Green)
Private MB As Int
MB = Msgbox2("¿Quiere descargarla nuevamente?", "YA SE DESCARGO LA CARTA PORTE", "Si", "", "No", Null) 'ignore
If MB = DialogResponse.Positive Then
Msgbox2Async("¿Quiere descargarla nuevamente?" , "YA SE DESCARGO LA CARTA PORTE", "Si", "", "No", LoadBitmap(File.DirAssets,"alert2.png"), False)
Wait For Msgbox_Result (resultado As Int)
If resultado = DialogResponse.POSITIVE Then
' MB = Msgbox2("¿Quiere descargarla nuevamente?", "YA SE DESCARGO LA CARTA PORTE", "Si", "", "No", Null) 'ignore
' If MB = DialogResponse.Positive Then
descargaCartaPorte
Do While Not(cartaPorteLista) 'Mientras no se termine de descargar la carta porte esperamos ...
Sleep(1000)
@@ -606,9 +611,9 @@ Sub cargar_Click
If detenerLoop Then Exit
detenerLoop = False
Loop
ELSE IF MB = DialogResponse.NEGATIVE Then
ELSE IF resultado = DialogResponse.POSITIVE Then
' descargaCartaPorte
ELSE IF MB = DialogResponse.CANCEL Then
ELSE IF resultado = DialogResponse.CANCEL Then
' VALIDAR_INFO
End If
End If
@@ -954,6 +959,7 @@ Sub JobDone(Job As HttpJob)
If Job.JobName = "DBRequest" Then
Dim RESULT As DBResult = reqManager.HandleJob(Job)
If RESULT.Tag = "kmt_datos" Then 'query tag
cargar.Enabled = True
If logger Then Log("TIEMPO kmt_datos : " & ((DateTime.Now-inicioContador)/1000))
S_CC.TEXT = "CARGANDO"
Starter.skmt.BeginTransaction
@@ -1176,6 +1182,7 @@ Sub JobDone(Job As HttpJob)
Dim RESULT As DBResult = reqManager.HandleJob(Job)
If RESULT.Tag = "gunaprod" Then 'query tag
' Subs.logJobDoneResultados(RESULT)
cargar.Enabled = True
If logger Then Log("TIEMPO gunaprod : " & ((DateTime.Now-inicioContador)/1000))
S_CP.Text = "CARGANDO"
Starter.skmt.BeginTransaction
@@ -1231,8 +1238,8 @@ Sub JobDone(Job As HttpJob)
If Job.JobName = "DBRequest" Then
Dim RESULT As DBResult = reqManager.HandleJob(Job)
If RESULT.Tag = "gunaprod2" Then 'query tag
cargar.Enabled = True
If logger Then Log("TIEMPO gunaprod2 : " & ((DateTime.Now-inicioContador)/1000))
Starter.skmt.ExecNonQuery("delete from cat_gunaprod2")
Starter.skmt.BeginTransaction
For Each records() As Object In RESULT.Rows
Dim CAT_GP_ID As String = records(RESULT.Columns.Get("CAT_GP_ID"))
@@ -2052,6 +2059,7 @@ End Sub
Sub connecta_Click
' wait for (kh.ping) Complete (Success As Boolean, ExitValue As Int, StdOut As String, StdErr As String)
cargar.Enabled = True
If Not(IsConnectedToInternet) Then
connecta.TextColor = Colors.Red
ToastMessageShow("No hay conexión a internet, por favor establecer una conexión y reintentar!!", True)

Binary file not shown.

View File

@@ -887,7 +887,7 @@ Version=12.8
#Region Project Attributes
#ApplicationLabel: Kelloggs Venta
#VersionCode: 3000
#VersionName: 4.06.29
#VersionName: 4.06.30
#SupportedOrientations: portrait
#CanInstallToExternalStorage: False
#BridgeLogger:true

View File

@@ -91,6 +91,6 @@ ModuleClosedNodes6=
ModuleClosedNodes7=
ModuleClosedNodes8=
ModuleClosedNodes9=
NavigationStack=C_Nota,lv_prodsDOE_ItemLongClick,510,0,kms_helperSubs,traeMaxClientesNuevos,908,0,Visual Designer,principal.bal,-100,1,kms_helperSubs,revisaImpresa,929,0,C_Principal,e_ruta_EnterPressed,2159,0,C_Principal,cargar_Click,654,0,C_Principal,JobDone,1228,0,Subs,traeTablaProds,1623,0,Subs,traeFechaDeBD,1620,0,B4XMainPage,B4XPage_Created,129,3
NavigationStack=B4XMainPage,B4XPage_Created,129,3,Main,Process_Globals,19,0,C_Cliente,B4XPage_Appear,619,0,C_Cliente,JobDone,4072,0,B4XMainPage,B4XPage_Appear,362,0,C_Principal,cargar_Click,568,6,C_Principal,Subir_Click,560,0,Visual Designer,principal.bal,-100,2,C_Principal,B4XPage_Appear,302,0,C_Principal,B_OK_PAS_Click,2267,0,C_Principal,JobDone,1220,3
SelectedBuild=0
VisibleModules=1,28,11,3,26,23,29,12,4,13,7