Wait For (Connect_) Complete (Success As Boolean)
If Success Then
Dim str="select * from k_cicliprod as cp left join k_produzione as p on cp.rowid = p.rowid where p.kid=? and cod_cdl=?"
' Dim sf As JdbcResultSet = mysql.ExecQuery2(str,Array As Int(cruscotto.idfase,cruscotto.cod_cdl ))
Dim sf As Object = mysql.ExecQueryAsync("mysql",str, Array As Int(cruscotto.idfase,cruscotto.cod_cdl ) )
Wait For (sf) mysql_QueryComplete (Success As Boolean, Crsr As JdbcResultSet)
If Success Then
Dim mypass As String
Do While Crsr.nextrow
Dim pp As StringFunctions2
Label2.text=cruscotto.operatore
Label4.Text=Crsr.GetString("descr_cdl")
Label6.Text=Crsr.GetString("numpreventivo")
Label31.Text=Crsr.GetString("descrizionecliente")
Label33.Text=Crsr.GetString("prodotto")
Label35.Text=Crsr.GetString("qta")
Label11.Text=Crsr.GetString("formato_carta")
Label12.Text=Crsr.GetString("grammi_carta")
Label14.Text=Crsr.GetString("tipo_carta")
Label24.Text=Crsr.GetString("resa_stampa")
Label18.Text=Crsr.GetString("fto_fustella")
Label17.Text=Crsr.GetString("descr_fustella")
Label16.text=Crsr.GetString("resa_fustella")
Label29.Text=Crsr.GetString("fto_cartone")
Label28.Text=Crsr.GetString("tipo_cartone")
datap=Crsr.GetString("datainizioreale")
dataf=Crsr.GetString("datafinereale")
idfaseprod=Crsr.GetString("id")
If datap=Null Then
Button1.Text="Inizia la lavorazione"
Label36.Visible=False
wip=False
Else
Button1.Text="chiudi la lavorazione"
Label36.Visible =True
wip=True
End If
If dataf=Null Then
Else
Label36.Visible=False
Button1.Enabled=False
Label37.Visible =True
wip=True
End If
Loop