diff --git a/DBRequestManager.bas b/DBRequestManager.bas index e0e2b63..3171894 100644 --- a/DBRequestManager.bas +++ b/DBRequestManager.bas @@ -227,6 +227,7 @@ Public Sub HandleJob(Job As HttpJob) As DBResult ' Log("HandleJob: " & (DateTime.Now - start))'Comentado por CHV - 211112 Return table End Sub + 'Reads a file and returns the file as a bytes array. Public Sub FileToBytes(Dir As String, FileName As String) As Byte() Dim out As OutputStream diff --git a/Durakelo_reparto.b4a b/Durakelo_reparto.b4a index ce6b5ec..c608563 100644 --- a/Durakelo_reparto.b4a +++ b/Durakelo_reparto.b4a @@ -67,16 +67,17 @@ Group=Default Group Library1=baqrcode Library10=gps Library11=javaobject -Library12=phone -Library13=randomaccessfile -Library14=reflection -Library15=runtimepermissions -Library16=serial -Library17=sql -Library18=togglelibrary -Library19=zxing_scanner +Library12=okhttputils2 +Library13=phone +Library14=randomaccessfile +Library15=reflection +Library16=runtimepermissions +Library17=serial +Library18=sql +Library19=togglelibrary Library2=batteryprogressview -Library20=okhttputils2 +Library20=zxing_scanner +Library21=ime Library3=bitmapcreator Library4=byteconverter Library5=camera @@ -84,7 +85,7 @@ Library6=core Library7=fusedlocationprovider Library8=googlemaps Library9=googlemapsextras -ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~~\n~)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~AddApplicationText(~\n~)~\n~AddManifestText(~\n~~\n~)~\n~AddApplicationText(~\n~~\n~ ~\n~)~\n~AddManifestText(~\n~~\n~)~\n~'''' para el teclado~\n~ SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)~\n~SetServiceAttribute(Tracker, android:foregroundServiceType, "location")~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~~\n~ +ManifestCode='This code will be applied to the manifest file during compilation.~\n~'You do not need to modify it in most cases.~\n~'See this link for for more information: http://www.basic4ppc.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~~\n~)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~AddApplicationText(~\n~)~\n~AddManifestText(~\n~~\n~)~\n~AddApplicationText(~\n~~\n~ ~\n~)~\n~AddManifestText(~\n~~\n~)~\n~'''' para el teclado~\n~ SetActivityAttribute(main, android:windowSoftInputMode, adjustResize|stateHidden)~\n~SetServiceAttribute(Tracker, android:foregroundServiceType, "location")~\n~~\n~SetApplicationAttribute(android:usesCleartextTraffic, "true")~\n~'Si al cargar un mapa de google manda este error "java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/ProtocolVersion". agregar la siguiente linea:~\n~AddApplicationText() Module1=BatteryUtilities Module10=gestion Module11=Historico @@ -107,14 +108,14 @@ Module7=detalle_promo Module8=fila Module9=foto NumberOfFiles=32 -NumberOfLibraries=20 +NumberOfLibraries=21 NumberOfModules=21 Version=12.5 @EndOfDesignText@ #Region Project Attributes #ApplicationLabel: Durakelo-Reparto #VersionCode: 1 - #VersionName: 3.11.06 + #VersionName: 3.11.16 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False diff --git a/Durakelo_reparto.b4a.meta b/Durakelo_reparto.b4a.meta index c77dc70..b57d987 100644 --- a/Durakelo_reparto.b4a.meta +++ b/Durakelo_reparto.b4a.meta @@ -64,6 +64,10 @@ ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8=3,6,8,17,18,19 ModuleClosedNodes9= +<<<<<<< HEAD NavigationStack=seleccion,JobDone,626,6,Main,Activity_Create,58,0,Starter,pe_BatteryChanged,43,0,colonia,Activity_Resume,64,5,colonia,ListView1_ItemClick,141,2,colonia,BUSCA_TextChanged,195,2,DiseƱador Visual,fila.bal,-100,2,Main,Process_Globals,30,0,Starter,ENVIA_ULTIMA_GPS,62,0,seleccion,cargar_Click,535,6 +======= +NavigationStack=Visual Designer,login.bal,-100,1,Visual Designer,mapa.bal,-100,2,Visual Designer,mapa_rutas.bal,-100,1,Visual Designer,nopago.bal,-100,2,Visual Designer,nuevocliente.bal,-100,2,Visual Designer,pedido.bal,-100,2,Visual Designer,seleccion.bal,-100,1,Visual Designer,tarjeta.bal,-100,2,Visual Designer,telefonos.bal,-100,1,seleccion,JobDone,935,6 +>>>>>>> 8fcae350507f27b4d1f396c01e70a8aad755cd6c SelectedBuild=0 -VisibleModules=18,21,10,9,12,8,4,14,11,2,17 +VisibleModules=18,21,4,17,6 diff --git a/Files/buscar.bal b/Files/buscar.bal index cdae851..fe47193 100644 Binary files a/Files/buscar.bal and b/Files/buscar.bal differ diff --git a/Files/detalle_promo.bal b/Files/detalle_promo.bal index 14ef3fb..0376a1d 100644 Binary files a/Files/detalle_promo.bal and b/Files/detalle_promo.bal differ diff --git a/Files/foto.bal b/Files/foto.bal index f34421f..563924d 100644 Binary files a/Files/foto.bal and b/Files/foto.bal differ diff --git a/Files/guardagestion.bal b/Files/guardagestion.bal index 41d52cf..b767f10 100644 Binary files a/Files/guardagestion.bal and b/Files/guardagestion.bal differ diff --git a/Files/info_gral.bal b/Files/info_gral.bal index 06d996e..0556929 100644 Binary files a/Files/info_gral.bal and b/Files/info_gral.bal differ diff --git a/Files/login.bal b/Files/login.bal index c2f6042..ac52a1e 100644 Binary files a/Files/login.bal and b/Files/login.bal differ diff --git a/Files/mapa.bal b/Files/mapa.bal index 11fdb87..3e807db 100644 Binary files a/Files/mapa.bal and b/Files/mapa.bal differ diff --git a/Files/nopago.bal b/Files/nopago.bal index 9b21cac..c1290e4 100644 Binary files a/Files/nopago.bal and b/Files/nopago.bal differ diff --git a/Files/nuevocliente.bal b/Files/nuevocliente.bal index 584381c..b46991c 100644 Binary files a/Files/nuevocliente.bal and b/Files/nuevocliente.bal differ diff --git a/Files/seleccion.bal b/Files/seleccion.bal index 0a2c9c7..5ce4736 100644 Binary files a/Files/seleccion.bal and b/Files/seleccion.bal differ diff --git a/Files/tarjeta.bal b/Files/tarjeta.bal index 0e756f7..5e9f881 100644 Binary files a/Files/tarjeta.bal and b/Files/tarjeta.bal differ diff --git a/Files/telefonos.bal b/Files/telefonos.bal index 1f048f6..7c1d382 100644 Binary files a/Files/telefonos.bal and b/Files/telefonos.bal differ diff --git a/seleccion.bas b/seleccion.bas index 4641def..285ef52 100644 --- a/seleccion.bas +++ b/seleccion.bas @@ -24,7 +24,7 @@ Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. Dim trabajar As Button - + dim ime as ime Dim c As Cursor Dim d As Cursor Dim b As Cursor @@ -93,6 +93,9 @@ Sub Globals Dim HORAINGRESO As String + Private p_cargando As Panel + Private p_cargando2 As Panel + Private l_cargando As Label End Sub Sub Activity_Create(FirstTime As Boolean) @@ -176,7 +179,7 @@ Sub Activity_Create(FirstTime As Boolean) skmt.ExecNonQuery2("INSERT INTO CAT_VARIABLES(CAT_VA_VALOR,CAT_VA_DESCRIPCION) VALUES (?,?)" , Array As String(DateTime.Time(DateTime.Now),"HoraIngreso")) End If DateTime.TimeFormat = "HH:mm:ss" - + p_cargando2.Left = (Activity.Width / 2) - (p_cargando2.Width / 2) End Sub Sub IsConnectedToInternet As Boolean @@ -195,6 +198,7 @@ End Sub Sub Activity_Resume + Log("eresume") c=skmt.ExecQuery("select noversion from version") c.Position=0 HORAINGRESO ="000000" @@ -221,6 +225,7 @@ Sub Activity_Resume Listo5 = 0 inve = 0 img2.Visible =False + p_cargando.Visible = False End If DateTime.DateFormat = "MM/dd/yyyy" fecha=DateTime.Date(DateTime.Now) @@ -474,7 +479,10 @@ Sub Subir_Click End Sub Sub cargar_Click - img2.Visible =True +' img2.Visible =True + p_cargando.Visible = True + p_cargando.Elevation = 100 + p_cargando.BringToFront EJECUTANDO = 1 'c=skmt.ExecQuery("CREATE TABLE kmt_info (pr_cd_credito NUMERIC,pr_cd_nombre TEXT,pr_cd_calle TEXT,pr_cd_numero TEXT,pr_cd_num_int TEXT,pr_cd_entrecalle1 TEXT,pr_cd_entrecalle2 TEXT,pr_cd_colonia TEXT,pr_cd_poblacion TEXT,pr_cd_edo TEXT,pr_cd_cp TEXT,pr_cd_zona TEXT,pr_cf_credito NUMERIC,pr_cf_saldotot NUMERIC,pr_cf_saldooper NUMERIC,pr_cf_saldof1 NUMERIC, pr_cf_penalizacion NUMERIC)") @@ -624,7 +632,9 @@ Sub cargar_Click 'cmd.Parameters = Array As Object(usuario) 'reqManager.ExecuteQuery(cmd , 0, "telefonos") ToastMessageShow("Se Actualizaran los datos, Este proceso podria tardar hasta un minuto, gracias" , True) + l_cargando.Text = $"Procesos pendientes: ${reqManager.reqsList.Size}"$ End Sub + Sub JobDone(Job As HttpJob) If reqManager.reqsList.IsInitialized Then 'Si tenemos lista de requests, la procesamos. If reqManager.reqsList.IndexOf(Job.tag) <> -1 Then @@ -668,6 +678,7 @@ Sub JobDone(Job As HttpJob) ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 End If End If @@ -697,6 +708,7 @@ Sub JobDone(Job As HttpJob) ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 End If End If @@ -726,11 +738,13 @@ Sub JobDone(Job As HttpJob) ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 Else If Listo4 = 1 And Listo3 = 1 And inve = 1 Then ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 End If End If @@ -763,6 +777,7 @@ Sub JobDone(Job As HttpJob) ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 End If End If @@ -773,7 +788,7 @@ Sub JobDone(Job As HttpJob) If RESULT.Tag = "punteo" Then 'query tag Log("punteo") For Each records() As Object In RESULT.Rows - Log("punteo2") +' Log("punteo2") Dim HV_CLIENTE As String = records(RESULT.Columns.Get("HV_CLIENTE")) Dim HV_LONG As String = records(RESULT.Columns.Get("HV_LONG")) Dim HV_LAT As String = records(RESULT.Columns.Get("HV_LAT")) @@ -811,6 +826,7 @@ Sub JobDone(Job As HttpJob) ToastMessageShow("Datos Actualizados." , True) Activity_Resume img2.Visible=False + p_cargando.Visible = False EJECUTANDO=0 End If End If @@ -929,6 +945,8 @@ Sub JobDone(Job As HttpJob) End If Job.Release End If + LogColor($"${reqManager.reqsList.Size}${CRLF}${list2text(reqManager.reqsList)}"$, Colors.Red) + l_cargando.Text = $"Procesos pendientes: ${reqManager.reqsList.Size}${CRLF}${CRLF}${list2text(reqManager.reqsList)}"$ End Sub Sub Activity_KeyPress (key As Int) As Boolean @@ -943,6 +961,7 @@ Sub Activity_KeyPress (key As Int) As Boolean End Sub Sub connecta_Click + ime.HideKeyboard imei = "" 'p.GetDeviceId conn = "1" Dim cmd As DBCommand @@ -986,6 +1005,7 @@ End Sub Sub inv_Click img2.Visible =True + p_cargando.Visible = True EJECUTANDO = 1 inve = 1 skmt.ExecNonQuery("delete from cat_gunaprod") @@ -1028,6 +1048,7 @@ Sub t1_tick cmd.Parameters = Array As Object(ALMACEN,l_ruta.text) reqManager.ExecuteQuery(cmd , 0, "valida_pedidoc") img2.Visible=False + p_cargando.Visible = False t1.Enabled = False End Sub @@ -1090,4 +1111,20 @@ Sub e_ruta_TextChanged (Old As String, New As String) Catch Log(LastException) End Try +End Sub + +Private Sub p_cargando_Click + +End Sub + +Sub list2text(a As List) + Private elTexto As String = "" + For i = 0 To a.Size - 1 + If i > 0 Then + elTexto = elTexto & ", " & a.Get(i) + Else + elTexto = elTexto & a.Get(i) + End If + Next + Return elTexto End Sub \ No newline at end of file