mirror of
https://github.com/KeymonSoft/Mariana_Censos.git
synced 2026-04-20 22:29:13 +00:00
Correccion para que al entrar a un cliente nuevo desde el mapa nos cargue los datos ya guardados
This commit is contained in:
@@ -98,11 +98,7 @@ Sub B4XPage_Appear
|
||||
et_atiende.Text = ""
|
||||
et_telefono.Text = ""
|
||||
et_email.Text = ""
|
||||
sTime=DateTime.Time(DateTime.Now)
|
||||
no_cliente= "NC" & sTime & no_ruta
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(no_cliente))
|
||||
Log(no_cliente)
|
||||
|
||||
Log($"CargarCliente: ${cargarCliente}"$)
|
||||
reqManager.Initialize(Me, Starter.server)
|
||||
If Not(Starter.gps.GPSEnabled) Then
|
||||
@@ -116,8 +112,10 @@ Sub B4XPage_Appear
|
||||
cb_giro.SetItems(losGiros)
|
||||
B_FOTO.Enabled = True
|
||||
If cargarCliente Then
|
||||
Log("Cargamos cliente")
|
||||
Private cf As Cursor = B4XPages.MainPage.skmt.ExecQuery($"select * from HIST_FOTO_CLIENTE where codigo In (Select cuenta from cuentaa)"$)
|
||||
Private cc As Cursor = B4XPages.MainPage.skmt.ExecQuery("select * from kmt_info where CAT_CL_CODIGO In (Select cuenta from cuentaa)")
|
||||
Log(cc.RowCount)
|
||||
If cc.RowCount > 0 Then
|
||||
cc.Position = 0
|
||||
fototomada = ""
|
||||
@@ -135,6 +133,12 @@ Sub B4XPage_Appear
|
||||
Log($"${losGiros.IndexOf(cc.GetString("CAT_CL_GIRO"))}, ${losGiros}, ${cc.GetString("CAT_CL_GIRO")}"$)
|
||||
cb_giro.SelectedIndex = losGiros.IndexOf(cc.GetString("CAT_CL_GIRO"))
|
||||
End If
|
||||
Else
|
||||
sTime=DateTime.Time(DateTime.Now)
|
||||
no_cliente= "NC" & sTime & no_ruta
|
||||
B4XPages.MainPage.skmt.ExecNonQuery("delete from CUENTAA")
|
||||
B4XPages.MainPage.skmt.ExecNonQuery2("INSERT INTO CUENTAA VALUES (?)", Array As Object(no_cliente))
|
||||
Log(no_cliente)
|
||||
End If
|
||||
b_ubicacion.Text = "Buscando ubicación ..."
|
||||
b_guardar.Visible = False
|
||||
|
||||
Reference in New Issue
Block a user