Sub Globals
Private btnOrden As Button
Private btnEntrega As Button
Private btnParametros As Button
Dim DBEstampa As MySQL
Dim CurOrden As Cursor
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Principal")
Ruta = File.DirRootExternal
If FirstTime Then
GPS1.Initialize("GPS")
End If
If File.Exists(Ruta,"estampa.s3db") = False Then
Msgbox("Se copia","Copiando...")
File.Copy(File.DirAssets,"estampa.s3db",Ruta,"estampa.s3db")
End If
DBOrden.Initialize(Ruta,"estampa.s3db",False)
DBEstampa.Initialize("MySQL","xxx.xxx.xxx.xxx","estampa","estampa01","molino",True,True)
End Sub
Sub Activity_Resume
If GPS1.GPSEnabled = False Then
ToastMessageShow("Please enable the GPS device.", True)
StartActivity(GPS1.LocationSettingsIntent) 'Will open the relevant settings screen.
Else
GPS1.Start(0, 0)
End If
End Sub
Sub Activity_Pause (UserClosed As Boolean)
GPS1.Stop
End Sub
Sub btnOrden_Click
Dim AuxMsg As Int
CurOrden = DBOrden.ExecQuery("Select * from Orden where Estado = 'Entregado'")
If CurOrden.RowCount <= 0 Then
StartActivity(Orden)
Else
AuxMsg = Msgbox2("No tiene Orden de Carga, desea Cargar una Nueva","Orden de Carga","SI",Null,"NO",Null)
If AuxMsg = DialogResponse.NEGATIVE Then
StartActivity(Orden)
Else
Msgbox("Nueva Orden en Progreso","Orden de Carga")
End If
End If
End Sub
Sub btnEntrega_Click
End Sub
Sub btnParametros_Click
StartActivity(Param)
End Sub