Sub carinama(Nama As String) ' This The first Source that show table in custom list view
Dim req As DBRequestManager=CreateRequest
Dim cmd As DBCommand=CreateCommand("getbarangnamalengkap", Array(spngroup.SelectedItem, Nama&"%"))
Wait for (req.ExecuteQuery(cmd,0,Null)) JobDone(j As HttpJob)
If j.Success Then
clv1.Clear
req.HandleJobAsync(j,"req")
wait for (req) req_result(res As DBResult)
req.PrintTable(res)
Log(res.Columns)
For Each row() As Object In res.Rows
Dim TD As TestData
TD.Initialize
TD.txtnama= row(2) & " " & ":" & " "& row(8)
TD.txtorder= ""
Dim Pnl As B4XView = XUI.CreatePanel(Null)
Pnl.Color = XUI.Color_Gray
Pnl.SetLayoutAnimated(0, 0, 0, clv1.AsView.Width, 50dip)
clv1.Add(Pnl,TD)
Next
If Status="OB" Then
Else
getGroup
End If
Else
Log("ERROR: " &j.ErrorMessage)
End If
j.Release
End Sub
Sub InsertOrder(id_sales As Int, nosalesorder As Int, kodepelanggan As String, namapelanggan As String, kodebarang As String, namabarang As String, hargabarang As Double, jumlahbarang As Int) ' This for Insert To Table Mysql
Dim req As DBRequestManager=CreateRequest
Dim cmd As DBCommand=CreateCommand("insertorder", Array(id_sales,nosalesorder,kodepelanggan,namapelanggan,kodebarang,namabarang,hargabarang,jumlahbarang))
Wait for (req.ExecuteQuery(cmd,0,Null)) JobDone(j As HttpJob)
If j.Success Then
ToastMessageShow("Orderan sudah dikirim.... !", False)
End If
j.Release
End Sub
Sub btnorder_Click
InsertOrder(.......... ???? ) ' Where I can get the all the data that shown in panel xcustomlist view ???
End sub