Berikut saya ada cara atau codingan untuk menyimpan data di listview vb.net
simpan listview vb.net |
call opendb()
Dim xKODE As String = ""
Dim xNAMA As String = ""
Dim xHARGA As Double = 0
Dim xJUMLAH As Double = 0
Dim xSUBTOTAL As Double = 0
Dim MM As Integer = 0
For MM = 0 To Me.lvpesen.Items.Count - 1
'lvpesen nama listview nya
xKODE = lvpesen.Items(MM).Text
xNAMA = lvpesen.Items(MM).SubItems(1).Text
xHARGA = lvpesen.Items(MM).SubItems(2).Text
xJUMLAH = lvpesen.Items(MM).SubItems(3).Text
xSUBTOTAL = lvpesen.Items(MM).SubItems(4).Text
Dim KK As String = ""
KK = " INSERT INTO dpesenmakan " & _
"(no_pesen " & _
" ,nama_makanan " & _
" ,harga " & _
" ,jumlah " & _
" ,kode_makanan " & _
" ,subtotal)" & _
" VALUES " & _
" ('" & txtnopesen.Text & "' " & _
" ,'" & xNAMA & "' " & _
" ,'" & xHARGA & "' " & _
" ,'" & xJUMLAH & "' " & _
" ,'" & xKODE & "' " & _
" ,'" & xSUBTOTAL & "') "
cmd = New OleDb.OleDbCommand(KK, conn)
cmd.ExecuteNonQuery()
cmd.Dispose()
Next
end sub
Update Contact :
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email : Fajarudinsidik@gmail.com
No Wa/Telepon (puat) : 085267792168
No Wa/Telepon (fajar) : 085369237896
Email: Fajarudinsidik@gmail.com
atau Kirimkan Private messanger melalui email dengan klik tombol order dibawah ini :