mirror of
https://github.com/KeymonSoft/Kelloggs_v4.git
synced 2026-04-17 18:26:11 +00:00
cambio db a skmt y bitacora
This commit is contained in:
@@ -44,7 +44,7 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
entro ="2"
|
||||
ruta = File.DirInternal
|
||||
qr.initialize
|
||||
c=Starter.db.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("MACIMP"))
|
||||
c.Position =0
|
||||
MAC_IMPRESORA = c.GetString("CAT_VA_VALOR")
|
||||
Starter.MAC_IMPRESORA = MAC_IMPRESORA
|
||||
@@ -58,12 +58,12 @@ Sub B4XPage_Appear
|
||||
' If Logger Then Log(Me)
|
||||
' If Logger Then LogColor("Ultima actividad guardada=" & Subs.traeUltimaActividadBD, Colors.Blue)
|
||||
' If Subs.traeUltimaActividadBD <> "colonia" Then Subs.iniciaActividad(Subs.traeUltimaActividadBD)
|
||||
c=Starter.db.ExecQuery2("select count(*) AS CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SEMANA"))
|
||||
c=Starter.skmt.ExecQuery2("select count(*) AS CUANTOS from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SEMANA"))
|
||||
c.Position =0
|
||||
SEMANA = c.GetString("CUANTOS")
|
||||
c.Close
|
||||
If SEMANA > 0 Then
|
||||
c=Starter.db.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SEMANA"))
|
||||
c=Starter.skmt.ExecQuery2("select CAT_VA_VALOR from CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?", Array As String ("SEMANA"))
|
||||
c.Position =0
|
||||
SEMANA = c.GetString("CAT_VA_VALOR")
|
||||
c.Close
|
||||
@@ -73,7 +73,7 @@ Sub B4XPage_Appear
|
||||
busca.Text = ""
|
||||
entro ="2"
|
||||
colonia = 0
|
||||
c=Starter.db.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) and CAT_CL_CODIGO not in (select NV_CLIENTE from NOVENTA) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA",SEMANA, "SEMANAL"))
|
||||
c=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) and CAT_CL_CODIGO not in (select NV_CLIENTE from NOVENTA) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA",SEMANA, "SEMANAL"))
|
||||
ListView1.Clear
|
||||
lfila.Text = "NOMBRE"
|
||||
If c.RowCount>0 Then
|
||||
@@ -108,7 +108,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
colonia = Value
|
||||
End If
|
||||
If entro = "2" Then
|
||||
c2=Starter.db.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=Starter.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))
|
||||
ListView1.Clear
|
||||
lfila.text = "Calle"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -119,7 +119,7 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
End If
|
||||
entro = "3"
|
||||
Else If entro = "3" Then
|
||||
c2=Starter.db.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=Starter.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))
|
||||
ListView1.Clear
|
||||
lfila.text = "Nombre"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -130,8 +130,8 @@ Sub ListView1_ItemClick (Position As Int, Value As Object)
|
||||
End If
|
||||
entro = "4"
|
||||
Else If entro = "4" Then
|
||||
Starter.db.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.db.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(Value))
|
||||
Subs.iniciaActividad("Cliente")
|
||||
End If
|
||||
End Sub
|
||||
@@ -148,7 +148,7 @@ End Sub
|
||||
|
||||
Sub BUSCA_TextChanged (Old As String, New As String)
|
||||
q_buscar = "%" & busca.Text & "%"
|
||||
c2=Starter.db.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ?) and CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,"DIA_VISITA"))
|
||||
c2=Starter.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 ?) and CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar,"DIA_VISITA"))
|
||||
ListView1.Clear
|
||||
lfila.text = "Nombre y Calle"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -181,13 +181,13 @@ Sub sc_result(atype As String,Values As String)
|
||||
'If Logger Then Log("Type : " & atype)
|
||||
'If Logger Then Log("Value : " & Values)
|
||||
CODIGO = Values
|
||||
c2=Starter.db.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
c2=Starter.skmt.ExecQuery2("select COUNT(*) AS ENCONTRADO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
c2.Position =0
|
||||
If c2.GetString("ENCONTRADO") > 0 Then
|
||||
s=Starter.db.ExecQuery2("select CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
s=Starter.skmt.ExecQuery2("select CAT_CL_CODIGO from kmt_info where CAT_CL_NUM_SERIEFISICO = ? order by CAT_CL_NOMBRE ", Array As String(CODIGO))
|
||||
s.Position =0
|
||||
Starter.db.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.db.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))
|
||||
Starter.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
Starter.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(s.GetString("CAT_CL_CODIGO")))
|
||||
s.Close
|
||||
b_qr.Visible = False
|
||||
Subs.iniciaActividad("Cliente")
|
||||
@@ -217,7 +217,7 @@ End Sub
|
||||
|
||||
Sub b_bdd_Click
|
||||
q_buscar = "%" & busca.Text & "%"
|
||||
c2=Starter.db.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO from kmt_info where (CAT_CL_NOMBRE like ? OR CAT_CL_CODIGO LIKE ?) and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar))
|
||||
c2=Starter.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 ?) and gestion = 0 order by CAT_CL_NOMBRE ", Array As String(q_buscar,q_buscar))
|
||||
ListView1.Clear
|
||||
lfila.text = "Nombre y Calle"
|
||||
If c2.RowCount>0 Then
|
||||
@@ -245,7 +245,7 @@ Sub B_IMP_Click
|
||||
' ToastMessageShow("Conectando impresora ...", False)
|
||||
' End If
|
||||
' Try
|
||||
' c=Starter.db.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA",SEMANA, "SEMANAL"))
|
||||
' c=Starter.skmt.ExecQuery2("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO, CAT_CL_NUM_SERIEFISICO from kmt_info where CAT_CL_DIAS_VISITA = (SELECT CAT_VA_VALOR FROM CAT_VARIABLES WHERE CAT_VA_DESCRIPCION = ?) and gestion = 0 and cat_cl_codigo not in (select pe_cliente from pedido) and cat_cl_codigo <> 0 AND CAT_CL_TIPO_RUTA IN (?,?) ORDER BY CAT_CL_NUM_SERIEFISICO", Array As String("DIA_VISITA",SEMANA, "SEMANAL"))
|
||||
'' c=skmt.ExecQuery("select CAT_CL_NOMBRE, CAT_CL_CALLE, CAT_CL_CODIGO,CAT_CL_DIAS_VISITA from kmt_info where gestion = 0 and cat_cl_codigo <> 0 ORDER BY CAT_CL_CODIGO")
|
||||
' If c.RowCount>0 Then
|
||||
' For i=0 To c.RowCount -1
|
||||
|
||||
Reference in New Issue
Block a user