Version 4.08.10.EP_d

Se le agregao la validacion para que los preventas no hagan trampa
This commit is contained in:
IsR0d
2024-08-13 14:05:21 -06:00
parent 633afc2c2f
commit 0e8ab30f53
12 changed files with 71 additions and 67 deletions

View File

@@ -67,7 +67,7 @@ Sub B4XPage_Appear
busca.Text = ""
entro ="2"
colonia = 0
c=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 ORDER BY CAT_CL_CODIGO")
c=B4XPages.MainPage.skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info2 where gestion = 0 ORDER BY CAT_CL_CODIGO")
ListView1.Clear
lfila.Text = "NOMBRE"
If c.RowCount>0 Then
@@ -92,7 +92,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
colonia = Value
End If
If entro = "2" Then
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_CALLE, CAT_CL_COLONIA, count(*) as cuantos from kmt_info where gestion = 0 and CAT_CL_COLONIA = ? GROUP BY CAT_CL_CALLE, CAT_CL_COLONIA order by CAT_CL_CALLE ", Array As String(Value))
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_CALLE, CAT_CL_COLONIA, count(*) as cuantos from kmt_info2 where gestion = 0 and CAT_CL_COLONIA = ? GROUP BY CAT_CL_CALLE, CAT_CL_COLONIA order by CAT_CL_CALLE ", Array As String(Value))
ListView1.Clear
lfila.text = "Calle"
If c2.RowCount>0 Then
@@ -103,7 +103,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
End If
entro = "3"
Else If entro = "3" Then
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where gestion = 0 and CAT_CL_CALLE = ? AND CAT_CL_COLONIA = ? order by CAT_CL_NOMBRE ", Array As String(Value, colonia))
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info2 where gestion = 0 and CAT_CL_CALLE = ? AND CAT_CL_COLONIA = ? order by CAT_CL_NOMBRE ", Array As String(Value, colonia))
ListView1.Clear
lfila.text = "Nombre"
If c2.RowCount>0 Then
@@ -145,7 +145,7 @@ End Sub
Sub BUSCA_TextChanged (Old As String, New As String)
q_buscar = "%" & busca.Text & "%"
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,q_buscar))
c2=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info2 where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ? OR CAT_CL_CALLE LIKE ?)and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,q_buscar))
ListView1.Clear
lfila.text = "Nombre y Calle"
If c2.RowCount>0 Then
@@ -175,10 +175,10 @@ End Sub
Sub sc_result(atype As String,Values As String)
CODIGO = Values
c2=B4XPages.MainPage.skmt.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
c2=B4XPages.MainPage.skmt.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info2 where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
c2.Position =0
If c2.GetString("ENCONTRADO") > 0 Then
s=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
s=B4XPages.MainPage.skmt.ExecQuery2("select CAT_CL_CODIGO from kmt_info2 where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
s.Position =0
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))