mirror of
https://github.com/KeymonSoft/Salma_Picking.git
synced 2026-04-17 21:16:08 +00:00
113 lines
4.0 KiB
QBasic
113 lines
4.0 KiB
QBasic
B4A=true
|
|
Group=Default Group
|
|
ModulesStructureVersion=1
|
|
Type=Class
|
|
Version=9.85
|
|
@EndOfDesignText@
|
|
#Region Shared Files
|
|
#CustomBuildAction: folders ready, %WINDIR%\System32\Robocopy.exe,"..\..\Shared Files" "..\Files"
|
|
'Ctrl + click to sync files: ide://run?file=%WINDIR%\System32\Robocopy.exe&args=..\..\Shared+Files&args=..\Files&FilesSync=True
|
|
'###########################################################################################################
|
|
'###################### PULL #############################################################
|
|
'Ctrl + click ide://run?file=%WINDIR%\System32\cmd.exe&Args=/c&Args=git&Args=pull
|
|
'###########################################################################################################
|
|
'###################### PUSH #############################################################
|
|
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=github&Args=..\..\
|
|
'###########################################################################################################
|
|
'###################### PUSH TORTOISE GIT #########################################################
|
|
'Ctrl + click ide://run?file=%WINDIR%\System32\WindowsPowerShell\v1.0\powershell.exe&Args=TortoiseGitProc&Args=/command:commit&Args=/path:"./../../"&Args=/closeonend:2
|
|
'###########################################################################################################
|
|
#End Region
|
|
|
|
'Ctrl + click to export as zip: ide://run?File=%B4X%\Zipper.jar&Args=Project.zip
|
|
|
|
Sub Class_Globals
|
|
Private Root As B4XView
|
|
Private xui As XUI
|
|
Dim seleccion As C_seleccion
|
|
Dim picking As C_picking
|
|
Dim reqManager As DBRequestManager
|
|
Dim paso1 As String
|
|
Private Insesion As Button
|
|
Private Contraseña As EditText
|
|
Dim Usuario As EditText
|
|
Dim ID_ALMACEN As String
|
|
Dim user As String
|
|
End Sub
|
|
|
|
Public Sub Initialize
|
|
' B4XPages.GetManager.LogEvents = True
|
|
End Sub
|
|
|
|
'This event will be called once, before the page becomes visible.
|
|
Private Sub B4XPage_Created (Root1 As B4XView)
|
|
Root = Root1
|
|
Root.LoadLayout("MainPage")
|
|
seleccion.Initialize
|
|
B4XPages.AddPage("seleccion",seleccion)
|
|
picking.Initialize
|
|
B4XPages.AddPage("picking",picking)
|
|
reqManager.Initialize(Me, Starter.DBReqServer)
|
|
End Sub
|
|
|
|
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
|
|
|
|
|
|
|
Private Sub Insesion_Click
|
|
|
|
If Usuario.Text <> "" Then
|
|
|
|
Dim cmd As DBCommand
|
|
cmd.Initialize
|
|
cmd.Name = "select_usuario_picking_SALMA"
|
|
cmd.Parameters = Array As Object(Usuario.Text, Contraseña.Text)
|
|
reqManager.ExecuteQuery(cmd , 0, "usuario")
|
|
|
|
End If
|
|
|
|
End Sub
|
|
|
|
Sub JobDone(Job As HttpJob)
|
|
If Job.Success = False Then
|
|
|
|
ToastMessageShow("Error: " & Job.ErrorMessage, True)
|
|
|
|
Else
|
|
|
|
If Job.JobName = "DBRequest" Then
|
|
Dim result As DBResult = reqManager.HandleJob(Job)
|
|
If result.Tag = "usuario" Then 'query tag
|
|
For Each records() As Object In result.Rows
|
|
Dim name As String = records(result.Columns.Get("STATUS"))
|
|
ID_ALMACEN = records(result.Columns.Get("CAT_LO_AGENCIA"))
|
|
Dim IMEI_BASE As String = records(result.Columns.Get("CAT_LO_IDTELEFONO"))
|
|
user = records(result.Columns.Get("CAT_LO_USUARIO"))
|
|
Log(user)
|
|
Next
|
|
paso1 = 1
|
|
End If
|
|
End If
|
|
Job.Release
|
|
|
|
|
|
|
|
If paso1 = 1 Then
|
|
If name = "OKActivo" Then
|
|
' Starter.skmt.ExecNonQuery("delete from usuarioa")
|
|
' Starter.skmt.ExecNonQuery2("INSERT INTO USUARIOA VALUES (?,?)", Array As Object(Usuario.Text, Contraseña.Text))
|
|
' Starter.skmt.ExecNonQuery("delete from cat_almacen")
|
|
' Starter.skmt.ExecNonQuery2("INSERT INTO CAT_ALMACEN(ID_ALMACEN) VALUES (?)", Array As Object (ID_ALMACEN))
|
|
B4XPages.ShowPage ("Seleccion")
|
|
Else If name = "OKExpirado" Then
|
|
Msgbox("Usuario Expirado llamar al administrador","") 'ignore
|
|
Else If name = "OKCancelado" Then
|
|
Msgbox("Usuario Cancelado llamar al administrador","") 'ignore
|
|
Else
|
|
Msgbox("Usuario o password No validos","") 'ignore
|
|
End If
|
|
paso1 = 0
|
|
End If
|
|
|
|
End If
|
|
End Sub |