'Activity module
Sub Process_Globals
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim tabhost1 As TabHost
Dim PanelMenu As Panel
Dim spLote,spOrden,spLinea,spUbicacion,spTipo,spOrigen,spDefecto As Spinner
Dim Sx As Spinner
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'
If FirstTime Then
' spLinea.Initialize("")
' spLote.Initialize("")
' spOrden.Initialize("")
' spUbicacion.Initialize("")
' spTipo.Initialize("")
' spOrigen.Initialize("")
' spDefecto.Initialize("")
End If
'
Dim url As String
url=libcode.CreateUrl("2#" & Main.Prefer.IDcon)
'
Log("Url:" & url)
'
Dim jobA As HttpJob
jobA.Initialize("jobA", Me)
jobA.Download(url)
'
PanelMenu.Initialize("")
Activity.LoadLayout("menu")
Activity.Title=Main.Titulo
'
'Sx.Initialize("")
Sx.Add("Uno")
Sx.Add("Dos")
Sx.Add("Tres")
'
'tabhost1.AddTab("Datos Generales", "datosgenerales")
'tabhost1.AddTab("Defectos Encontrados", "defectosencontrados")
End Sub
'Ejecucion de los Webservices
Sub JobDone (Job As HttpJob)
Dim res As String
'
If Job.Success = True Then
res = Job.GetString
res= libcode.DesEncriptarCadena(res)
Log("res::" & res)
'
Select Job.JobName
Case "jobA" 'cargando todos los combos del sistema
InitSPData(res)
End Select
End If
Job.Release
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub InitSPData(resu As String)
Dim Tbl() As String
Dim Rec() As String
'
Tbl=Regex.Split("&",resu) 'Rompiendo tablas
'
'lineas de produccion
Rec=Regex.Split("@",Tbl(0)) '
spLinea.Add("Lineas")
For i=0 To Rec.Length-1
spLinea.Add(Rec(i))
Log("Linea "& i & Rec(i))
Next
'
'Lotes
Rec=Regex.Split("@",Tbl(1)) '
spLote.Add("Lotes")
For i=0 To Rec.Length-1
spLote.Add(Rec(i))
Log("Lotes " & i & Rec(i))
Next
'
'Ordenes Produccion
spOrden.Add("Ordenes")
Rec=Regex.Split("@",Tbl(2)) '
For i=0 To Rec.Length-1
spOrden.Add(Rec(i))
Next
'
'Ubicaciones
spUbicacion.Add("Ubicaciones")
Rec=Regex.Split("@",Tbl(3)) '
For i=0 To Rec.Length-1
spUbicacion.Add(Rec(i))
Next
'
'Especifcaciones defecto
spDefecto.Add("Especificaciones-Defecto")
Rec=Regex.Split("@",Tbl(4))
For i=0 To Rec.Length-1
spDefecto.Add(Rec(i))
Next
'
'Origen Defecto
spOrigen.Add("Origen Defecto")
Rec=Regex.Split("@",Tbl(5))
For i=0 To Rec.Length-1
spOrigen.Add(Rec(i))
Next
'
'Tipo Muestro
spTipo.Add("Tipo Muestreo")
Rec=Regex.Split("@",Tbl(6))
For i=0 To Rec.Length-1
spTipo.Add(Rec(i))
Next
End Sub
'Seleccionando la captura de muestra
Sub bmenu3_Click
'
Msgbox(spLinea.GetItem(0),"Error")
PanelMenu.Visible=False
Activity.LoadLayout("datosgenerales")
'
End Sub