mirror of
https://github.com/KeymonSoft/DBCheck.git
synced 2026-04-17 19:37:09 +00:00
6/11/23 - Codigo para validar venta en servidor con panel de resultados
This commit is contained in:
@@ -75,6 +75,11 @@ Sub Class_Globals
|
||||
Dim c, d As Cursor
|
||||
Dim foto1() As Byte
|
||||
Private b_valida As Button
|
||||
Private l_version As Label
|
||||
Private p_validacion As Panel
|
||||
Private l_vProds2 As Label
|
||||
Private l_vPedidos2 As Label
|
||||
Private l_vNoVenta2 As Label
|
||||
End Sub
|
||||
|
||||
Public Sub Initialize
|
||||
@@ -85,9 +90,12 @@ End Sub
|
||||
Sub B4XPage_Created (Root1 As B4XView)
|
||||
Root = Root1
|
||||
Root.LoadLayout("MainPage")
|
||||
l_version.Text = Application.VersionName
|
||||
p_principal.Width = Root.Width : p_principal.Height = Root.Height
|
||||
Subs.centraPanel(p_datos, Root.Width)
|
||||
reqManager.Initialize(Me, "http://keymon.lat:1782")
|
||||
Subs.centraPanel(p_validacion, Root.Width)
|
||||
p_validacion.Top = l_diasVenta.Top
|
||||
reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||
B4XPages.SetTitle(Me, "Revisión de BD")
|
||||
Subs.centraPanel(p_progressDialog, Root.Width)
|
||||
Subs.centraPanel(p_editaRuta, Root.Width)
|
||||
@@ -95,9 +103,10 @@ Sub B4XPage_Created (Root1 As B4XView)
|
||||
Subs.centraPanel(p_editaUsuario, Root.Width)
|
||||
Subs.centraPanel(p_clientes, Root.Width)
|
||||
ime.Initialize("ime")
|
||||
lv_DBRServer.AddSingleLine("http://keymon.lat:1781")
|
||||
lv_DBRServer.AddSingleLine("http://keymon.lat:1782")
|
||||
lv_DBRServer.AddSingleLine("http://40.123.36.38:1782")
|
||||
et_server.Text = "http://keymon.lat:1782"
|
||||
et_server.Text = "http://keymon.lat:1781"
|
||||
B_SERVER.Left = (Root.Width / 2) - (B_SERVER.Width / 2) 'Centramos B_SERVER
|
||||
et_server.Left = (Root.Width / 2) - (et_server.Width / 2) 'Centramos et_server
|
||||
lv_DBRServer.Left = (Root.Width / 2) - (lv_DBRServer.Width / 2) 'Centramos lv_DBRServer
|
||||
@@ -292,6 +301,7 @@ Sub JobDone(Job As HttpJob)
|
||||
If resultado.Tag = "valida_pedido" Then 'query tag
|
||||
For Each records() As Object In resultado.Rows
|
||||
Dim CUANTOSP As Int = records(resultado.Columns.Get("CUANTOSP"))
|
||||
l_vProds2.Text = $"${CUANTOSP}/${cuantos_pedido}"$
|
||||
If cuantos_pedido <= CUANTOSP Then
|
||||
ToastMessageShow("INFO OK", True)
|
||||
Else
|
||||
@@ -305,8 +315,8 @@ Sub JobDone(Job As HttpJob)
|
||||
If resultado.Tag = "valida_pedidoc" Then 'query tag
|
||||
For Each records() As Object In resultado.Rows
|
||||
Dim CUANTOSC As Int = records(resultado.Columns.Get("CUANTOSC"))
|
||||
If cuantos_pedidosc = CUANTOSC Then
|
||||
|
||||
l_vPedidos2.Text = $"${CUANTOSC}/${cuantos_pedidosc}"$
|
||||
If cuantos_pedidosc <= CUANTOSC Then
|
||||
Else
|
||||
ToastMessageShow($"No se cargo bien la info de pedido_cliente.${CRLF}Envíe nuevamente: "$ & CUANTOSC & "/" & cuantos_pedidosc, True)
|
||||
Log("No se cargo bien la info de pedido_cliente. Envíe nuevamente: " & CUANTOSC & "/" & cuantos_pedidosc)
|
||||
@@ -317,8 +327,8 @@ Sub JobDone(Job As HttpJob)
|
||||
If resultado.Tag = "valida_noventa" Then 'query tag
|
||||
For Each records() As Object In resultado.Rows
|
||||
Dim CUANTOSN As Int = records(resultado.Columns.Get("CUANTOSN"))
|
||||
If cuantos_noventa = CUANTOSN Then
|
||||
|
||||
l_vNoVenta2.Text = $"${CUANTOSN}/${cuantos_noventa}"$
|
||||
If cuantos_noventa <= CUANTOSN Then
|
||||
Else
|
||||
ToastMessageShow($"No se cargo bien la info de NoVenta.${CRLF}Envíe nuevamente: "$ & CUANTOSN & "/" & cuantos_noventa, True)
|
||||
Log("No se cargo bien la info de NoVenta. Envíe nuevamente:" & CUANTOSN & "/" & cuantos_noventa)
|
||||
@@ -430,6 +440,7 @@ Sub p_principal_Click
|
||||
p_editaAlmacen.Visible = False
|
||||
p_editaRuta.Visible = False
|
||||
p_clientes.Visible = False
|
||||
p_validacion.Visible = False
|
||||
ime.HideKeyboard
|
||||
End Sub
|
||||
|
||||
@@ -987,6 +998,11 @@ End Sub
|
||||
|
||||
Sub valida(identificador As String)
|
||||
Log("Validamos " & identificador)
|
||||
If empresa.ToUpperCase = "GUNA" Then
|
||||
reqManager.Initialize(Me, "http://keymon.lat:1782")
|
||||
Else
|
||||
reqManager.Initialize(Me, "http://keymon.lat:1781")
|
||||
End If
|
||||
d = skmt.ExecQuery("SELECT COUNT(*) AS CUANTOS_NOVENTA FROM NOVENTA")
|
||||
d.Position = 0
|
||||
Dim cuantos_noventa As String = d.GetString("CUANTOS_NOVENTA")
|
||||
@@ -1019,10 +1035,13 @@ Sub valida(identificador As String)
|
||||
End Sub
|
||||
|
||||
Private Sub p_empresa_Click
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub b_valida_Click
|
||||
l_vPedidos2.Text = ""
|
||||
l_vProds2.Text = ""
|
||||
l_vNoVenta2.Text = ""
|
||||
p_validacion.Visible = True
|
||||
If empresa.ToUpperCase = "MARIANA" Then
|
||||
valida("MARDS")
|
||||
else if empresa.ToUpperCase = "GUNA" Then
|
||||
@@ -1030,4 +1049,11 @@ Private Sub b_valida_Click
|
||||
else if empresa.ToUpperCase = "INTMEX" Then
|
||||
valida("INTMEX")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub p_engrane_Click
|
||||
End Sub
|
||||
|
||||
Private Sub p_validacion_Click
|
||||
p_validacion.Visible = False
|
||||
End Sub
|
||||
Reference in New Issue
Block a user