mirror of
https://github.com/KeymonSoft/SoporteKeymonsoft.git
synced 2026-04-19 13:39:13 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0fd06fd908 | ||
| d6dd62a45b | |||
| b2af296b28 | |||
| 27093bd36e |
16
.gitattributes
vendored
Normal file
16
.gitattributes
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
|
||||
# linguist-language
|
||||
*.b4a linguist-language=B4X
|
||||
*.b4i linguist-language=B4X
|
||||
*.b4j linguist-language=B4X
|
||||
*.b4r linguist-language=B4X
|
||||
*.bas linguist-language=B4X
|
||||
|
||||
# linguist-detectable
|
||||
*.b4a linguist-detectable=true
|
||||
*.b4i linguist-detectable=true
|
||||
*.b4j linguist-detectable=true
|
||||
*.b4r linguist-detectable=true
|
||||
*.bas linguist-detectable=true
|
||||
@@ -7,8 +7,8 @@ Version=6.8
|
||||
'Class module
|
||||
Sub Class_Globals
|
||||
Private mTarget As Object
|
||||
Type DBResult (Tag As Object, Columns As Map, Rows As List)
|
||||
Type DBCommand (Name As String, Parameters() As Object)
|
||||
Type DBResult1 (Tag As Object, Columns As Map, Rows As List)
|
||||
Type DBCommand1 (Name As String, Parameters() As Object)
|
||||
Private link As String
|
||||
Private bc As ByteConverter
|
||||
Private T_NULL = 0, T_STRING = 1, T_SHORT = 2, T_INT = 3, T_LONG = 4, T_FLOAT = 5 _
|
||||
|
||||
Binary file not shown.
112
soporteKMS.b4a
112
soporteKMS.b4a
@@ -25,16 +25,17 @@ Library8=randomaccessfile
|
||||
Library9=runtimepermissions
|
||||
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: https://www.b4x.com/forum/showthread.php?p=78136~\n~AddManifestText(~\n~<uses-sdk android:minSdkVersion="5" android:targetSdkVersion="26"/>~\n~<supports-screens android:largeScreens="true" ~\n~ android:normalScreens="true" ~\n~ android:smallScreens="true" ~\n~ android:anyDensity="true"/>)~\n~SetApplicationAttribute(android:icon, "@drawable/icon")~\n~SetApplicationAttribute(android:label, "$LABEL$")~\n~CreateResourceFromFile(Macro, Themes.DarkTheme)~\n~'End of default text.~\n~SetActivityAttribute(main, android:windowSoftInputMode, adjustPan|stateHidden)
|
||||
Module1=DBRequestManager
|
||||
Module2=Starter
|
||||
Module3=Subs
|
||||
Module2=DBRequestManagerV2
|
||||
Module3=Starter
|
||||
Module4=Subs
|
||||
NumberOfFiles=6
|
||||
NumberOfLibraries=11
|
||||
NumberOfModules=3
|
||||
NumberOfModules=4
|
||||
Version=12.8
|
||||
@EndOfDesignText@
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Soporte Keymonsoft
|
||||
#VersionName: 5.05.25
|
||||
#VersionName: 5.08.28.1
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
@@ -80,12 +81,14 @@ Sub Process_Globals
|
||||
Dim prodsList As List
|
||||
' Dim buscarDonde As String = "Usuario"
|
||||
' Dim buscarQue As String = ""
|
||||
Type DBResult (Tag As Object, Columns As Map, Rows As List)
|
||||
Type DBCommand (Name As String, Parameters() As Object)
|
||||
End Sub
|
||||
|
||||
Sub Globals
|
||||
'These global variables will be redeclared each time the activity is created.
|
||||
'These variables can only be accessed from this module.
|
||||
Dim reqManager As DBRequestManager
|
||||
Dim reqManager, reqManager1781 As DBRequestManager
|
||||
Dim cmd As DBCommand
|
||||
Dim kb As IME
|
||||
Private WobbleMenu1 As WobbleMenu
|
||||
@@ -209,6 +212,7 @@ Sub Globals
|
||||
Dim empresaAA, almacenAA As String
|
||||
Dim cuantosAbrirAvion As Int = 0
|
||||
Private p_botonesAA As Panel
|
||||
Dim reqManagerT As DBRequestManagerV2
|
||||
End Sub
|
||||
|
||||
Sub Activity_Create(FirstTime As Boolean)
|
||||
@@ -236,8 +240,8 @@ Sub Activity_Create(FirstTime As Boolean)
|
||||
Do While Not(DBRChecked) ' Esperamos a que termine la prueba de conexion.
|
||||
Sleep(20)
|
||||
Loop
|
||||
et_usuario.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
et_usr.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
' et_usuario.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
' et_usr.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
et_almacen.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
et_ruta.InputType = Bit.Or(et_usuario.InputType, 4096) 'Esta linea es para que cuando se escriba en el campo, sea con mayusculas, para mas tipos vaya a: https://developer.android.com/reference/android/text/InputType.html#TYPE_TEXT_FLAG_CAP_CHARACTERS
|
||||
WobbleMenu1.SetTabTextIcon(1,"Guna", Chr(0xF0C0), Typeface.FONTAWESOME)
|
||||
@@ -311,7 +315,7 @@ End Sub
|
||||
|
||||
Sub Activity_Resume
|
||||
' reqManager.Initialize(Me, DBRS_1782)
|
||||
If Starter.mayusculasDesbloqueo = "1" Then cb_usrMayusc.Checked = True
|
||||
' If Starter.mayusculasDesbloqueo = "1" Then cb_usrMayusc.Checked = True
|
||||
Dim label1 As Label = lv_resultadosBusqueda.TwoLinesLayout.Label
|
||||
label1.TextSize = 13
|
||||
label1.TextColor = Colors.Black
|
||||
@@ -518,7 +522,7 @@ Private Sub b_desbloquea_Click
|
||||
cmd.Name = "update_usuario_guna"
|
||||
Dim tempUsr As String = et_usuario.Text
|
||||
tempUsr = tempUsr.Trim 'Quitamos espacios de antes y despues.
|
||||
If Starter.mayusculasDesbloqueo = "1" Then tempUsr = tempUsr.ToUpperCase 'Mandamos el usuario en mayusculas.
|
||||
' If Starter.mayusculasDesbloqueo = "1" Then tempUsr = tempUsr.ToUpperCase 'Mandamos el usuario en mayusculas.
|
||||
cmd.Parameters = Array As Object(tempUsr)
|
||||
Log("Mandamos DBRequest desbloqueo: " & tempUsr)
|
||||
usrDesbloqueo = tempUsr
|
||||
@@ -529,6 +533,27 @@ Private Sub b_desbloquea_Click
|
||||
kb.HideKeyboard
|
||||
End Sub
|
||||
|
||||
'Desbloquea el usuario de Intmex especificado en "et_usuario".
|
||||
Private Sub b_desbloqueaIntmex_Click
|
||||
If et_usuario.Text <> "" Then
|
||||
reqManager1781.Initialize(Me, DBRS_1781)
|
||||
cmd.Initialize
|
||||
cmd.Name = "desbloqueaUsuarioIntmex"
|
||||
Dim tempUsr As String = et_usuario.Text
|
||||
tempUsr = tempUsr.Trim 'Quitamos espacios de antes y despues.
|
||||
' If Starter.mayusculasDesbloqueo = "1" Then tempUsr = tempUsr.ToUpperCase 'Mandamos el usuario en mayusculas.
|
||||
cmd.Parameters = Array As Object(tempUsr)
|
||||
Log("Mandamos DBRequest desbloqueo: " & tempUsr)
|
||||
usrDesbloqueo = tempUsr
|
||||
reqManager1781.ExecuteCommand(cmd , "desbloqueaUsuario")
|
||||
Else
|
||||
Toast("Por favor ingrese el usuario a desbloquear. 🙄", 650)
|
||||
End If
|
||||
kb.HideKeyboard
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Sub s_almacen1_ItemClick (Position As Int, Value As Object)
|
||||
almacenGuna = spinnerGunaMap.Get(Value)
|
||||
almacenDeRuta = Value
|
||||
@@ -707,7 +732,7 @@ End Sub
|
||||
'Detectamos clics en actividad para poner en 'False' la variable 'atrasPresionado' y para ocultar el panel de opciones de desbloqueo.
|
||||
Sub activity_Click
|
||||
If atrasPresionado Then atrasPresionado = False
|
||||
If p_opcDesbloqueo.Visible Then p_opcDesbloqueo.Visible = False
|
||||
' If p_opcDesbloqueo.Visible Then p_opcDesbloqueo.Visible = False
|
||||
End Sub
|
||||
|
||||
Sub Activity_KeyPress (key As Int) As Boolean
|
||||
@@ -738,8 +763,8 @@ Sub JobDone(Job As HttpJob)
|
||||
' ToastMessageShow("Venta Eliminada.", False) 'El request de eliminar venta (Stored Procedure) siempre regresa error, asi que asumimos que SI se borro la venta.
|
||||
'/////////////////// Si hay error de conexion con keymon.lat nos cambiamos a 10.0.0.205 ///////////////////////
|
||||
else If Job.Tag = "pruebaConexion" And Job.ErrorMessage.IndexOf("Failed to connect to keymon.lat") = -1 Then
|
||||
DBRS_1782 = "http://10.0.0.205:1782"
|
||||
Dim DBRS_1781 As String = "http://10.0.0.205:1782"
|
||||
DBRS_1782 = "http://keymon.net:1782"
|
||||
Dim DBRS_1781 As String = "http://keymon.net:1782"
|
||||
' DBRS_1782 = "http://11.0.0.231:1783" 'Para pruebas locales
|
||||
reqManager.Initialize(Me, DBRS_1782)
|
||||
conexionDBRS = "interna"
|
||||
@@ -781,6 +806,10 @@ Sub JobDone(Job As HttpJob)
|
||||
'////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
Else
|
||||
DBRChecked = True 'Prueba de conexión finalizada.
|
||||
Log(1)
|
||||
If Job.Tag <> "testTraeConexion" Then
|
||||
Log(2)
|
||||
|
||||
LogColor("JobDone: '" & reqManager.HandleJob(Job).tag & "' - Registros: " & reqManager.HandleJob(Job).Rows.Size, Colors.Green) 'Mod por CHV - 211027
|
||||
If Job.JobName = "DBRequest" Then 'Para desbloquear un usuario Guna.
|
||||
Dim result As DBResult = reqManager.HandleJob(Job)
|
||||
@@ -788,13 +817,14 @@ Sub JobDone(Job As HttpJob)
|
||||
For Each records() As Object In result.Rows
|
||||
et_usuario.Text = ""
|
||||
Private pp As BClipboard
|
||||
pp.setText($"${Subs.generaSaludo}usuario *${usrDesbloqueo}* desbloqueado, por favor cerrar navegadores y reingresar."$) 'Copiamos el texto al portapapeles.
|
||||
pp.setText($"${Subs.generaSaludo}usuario *${usrDesbloqueo}* desbloqueado, por favor *cerrar* navegadores por completo y reingresar."$) 'Copiamos el texto al portapapeles.
|
||||
' ToastMessageShow("Mensaje copiado al portapapeles.", False)
|
||||
Log("Usuario desbloqueado! 🔓")
|
||||
Toast("Usuario desbloqueado 🔓", 0)
|
||||
Next
|
||||
End If
|
||||
End If
|
||||
Log(2)
|
||||
If Job.JobName = "DBRequest" Then 'Traemos info de soporte.
|
||||
Dim result As DBResult = reqManager.HandleJob(Job)
|
||||
If result.Tag = "pruebaConexion" Then 'query tag
|
||||
@@ -1341,6 +1371,29 @@ Sub JobDone(Job As HttpJob)
|
||||
|
||||
End If
|
||||
Job.Release
|
||||
Else
|
||||
Log("VERSION2")
|
||||
LogColor("JobDone: '" & reqManagerT.HandleJob(Job).tag & "' - Registros: " & reqManagerT.HandleJob(Job).Rows.Size, Colors.Green) 'Mod por CHV - 211027
|
||||
If Job.JobName = "DBRequest" Then 'Para desbloquear un usuario Guna.
|
||||
Dim resultado As DBResult = reqManagerT.HandleJob(Job)
|
||||
If resultado.Tag = "testTraeConexion" Then 'query tag
|
||||
Private n, r As String
|
||||
For Each records() As Object In resultado.Rows
|
||||
LogColor($"====== ${resultado.Tag} - REGISTROS = ${resultado.Rows.Size}"$, Colors.RGB(215,37,0))
|
||||
For Each k As String In resultado.Columns.Keys
|
||||
LogColor(k & " = " & records(resultado.Columns.Get(k)), Colors.RGB(215,37,0))
|
||||
If k = "CONEXION" Then
|
||||
n = "CONEXION"
|
||||
r = records(resultado.Columns.Get(k))
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
Toast($"${n}: ${r}"$, 0)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -1373,21 +1426,21 @@ End Sub
|
||||
|
||||
'Mostramos u ocultamos el panel de opciones de desbloqueo.
|
||||
Sub b_desbloquea_longClick
|
||||
If p_opcDesbloqueo.Visible Then
|
||||
p_opcDesbloqueo.Visible = False
|
||||
Else
|
||||
p_opcDesbloqueo.Visible = True
|
||||
End If
|
||||
' If p_opcDesbloqueo.Visible Then
|
||||
' p_opcDesbloqueo.Visible = False
|
||||
' Else
|
||||
' p_opcDesbloqueo.Visible = True
|
||||
' End If
|
||||
End Sub
|
||||
|
||||
'Si se modifica el checkbox de "Forzar mayusculas" de las opciones de desbloqueo, guardamos la configuración.
|
||||
Private Sub cb_usrMayusc_CheckedChange(Checked As Boolean)
|
||||
p_opcDesbloqueo.Visible = False
|
||||
Private cb As String = "0"
|
||||
If cb_usrMayusc.Checked Then cb = "1"
|
||||
Starter.mayusculasDesbloqueo = cb
|
||||
Starter.confMap.Put("mayusculasDesbloqueo", cb)
|
||||
Subs.escribreConf
|
||||
' p_opcDesbloqueo.Visible = False
|
||||
' Private cb As String = "0"
|
||||
' If cb_usrMayusc.Checked Then cb = "1"
|
||||
'' Starter.mayusculasDesbloqueo = cb
|
||||
' Starter.confMap.Put("mayusculasDesbloqueo", cb)
|
||||
' Subs.escribreConf
|
||||
End Sub
|
||||
|
||||
Private Sub et_usr_TextChanged (Old As String, New As String)
|
||||
@@ -1870,4 +1923,15 @@ Private Sub b_revisaAA_Click
|
||||
cmd.Name = $"revisaAvion_${empresaAA}"$
|
||||
cmd.Parameters = Array As Object(almacenAA, et_rutaAA.text)
|
||||
reqManager.ExecuteQuery(cmd, 0, $"revisaAvion_${empresaAA}"$, 0)
|
||||
End Sub
|
||||
|
||||
Private Sub Label1_LongClick
|
||||
Log("Clicked Global")
|
||||
' Private reqManagerT As DBRequestManagerV2
|
||||
Private cmd2 As DBCommand
|
||||
cmd2.Initialize
|
||||
' reqManagerT.Initialize(Me, "http://192.168.100.20:9000")
|
||||
reqManagerT.Initialize(Me, "http://keymon.net:9010/DB2")
|
||||
cmd2.Name = "traeConexion"
|
||||
reqManagerT.ExecuteQuery(cmd2 , 0, "testTraeConexion", 0)
|
||||
End Sub
|
||||
@@ -2,14 +2,17 @@
|
||||
ModuleBookmarks1=
|
||||
ModuleBookmarks2=
|
||||
ModuleBookmarks3=
|
||||
ModuleBookmarks4=
|
||||
ModuleBreakpoints0=
|
||||
ModuleBreakpoints1=
|
||||
ModuleBreakpoints2=
|
||||
ModuleBreakpoints3=
|
||||
ModuleBreakpoints4=
|
||||
ModuleClosedNodes0=2
|
||||
ModuleClosedNodes1=
|
||||
ModuleClosedNodes2=1
|
||||
ModuleClosedNodes3=1,9,11
|
||||
NavigationStack=Main,b_revisaAA_Click,1823,1,Main,Globals,174,6,Main,WobbleMenu1_Tab5Click,416,4,Main,b_abrirAvion_Click,1803,6,Main,s_empresaAA_ItemClick,1769,2,Main,s_almacenAA_ItemClick,1778,2,Main,b_borrarVentaBV_Click,1560,0,Main,JobDone,1281,6,Diseñador Visual,layout1.bal,-100,6,Main,Process_Globals,31,0
|
||||
ModuleClosedNodes2=
|
||||
ModuleClosedNodes3=1
|
||||
ModuleClosedNodes4=1,9,11
|
||||
NavigationStack=Starter,Process_Globals,10,0,Subs,procesaConfiguracion,140,0,Main,activity_Click,699,0,Main,b_desbloquea_longClick,1393,0,Main,cb_usrMayusc_CheckedChange,1402,0,Main,Globals,84,0,Main,et_login_TextChanged,1367,0,Main,JobDone,1363,0,Diseñador Visual,layout1.bal,-100,6,Main,Activity_Create,197,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=2,3,1
|
||||
VisibleModules=3,4,1,2
|
||||
|
||||
Reference in New Issue
Block a user