Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
kode.Items.Add("MB1")
kode.Items.Add("MB2")
kode.Items.Add("MB3")
kode.Items.Add("MB4")
Dim A As Integer
For A = 1 To 10 Step 1
jumlahbeli.Items.Add(A)
Next A
For A = 2001 To 2010 Step 1
tahunpembuatan.Items.Add(A)
Next A
For A = 2010 To 2020 Step 1
lamakredit.Items.Add(A)
Next
End Sub
Sub ISITABEL()
Dim isi As New ListViewItem
LV.Columns.Add("K0DE BARANG ", 80, HorizontalAlignment.Left)
LV.Columns.Add("JENIS MOBIL", 80, HorizontalAlignment.Left)
LV.Columns.Add("KONDISI MOBIL", 80, HorizontalAlignment.Left)
LV.Columns.Add("HARGA MOBIL", 80, HorizontalAlignment.Left)
LV.Columns.Add("JUMLAH", 80, HorizontalAlignment.Center)
LV.Columns.Add("TAHUN PEMBUATAN", 80, HorizontalAlignment.Center)
LV.Columns.Add("LAMA KREDIT", 80, HorizontalAlignment.Center)
LV.Columns.Add("UANG MUKA", 80, HorizontalAlignment.Center)
LV.Columns.Add("KOMISI SALES", 80, HorizontalAlignment.Center)
LV.Columns.Add("ANSURN PERBULAN", 80, HorizontalAlignment.Right)
LV.Columns.Add("TOTAL HARGA", 80, HorizontalAlignment.Right)
End Sub
Sub TABEL()
End Sub
Private Sub kode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kode.SelectedIndexChanged
kondisi.Items.Clear()
If kondisi.Text = "MB1" Then
jenismobil.Text = "avanza"
ElseIf kode.Text = "MB2" Then
jenismobil.Text = "toyota"
ElseIf kode.Text = "MB3" Then
jenismobil.Text = "yaris"
ElseIf kode.Text = "MB4" Then
jenismobil.Text = "jezz"
End If
kondisi.Items.Add("BARU")
kondisi.Items.Add("BEKAS")
End Sub
Private Sub jumlahbeli_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jumlahbeli.SelectedIndexChanged
kondisi.Items.Clear()
kondisi.Items.Add("BARU")
kondisi.Items.Add("BEKAS")
End Sub
Private Sub kondisi_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kondisi.SelectedIndexChanged
If kondisi.Text = "BARU" And jenismobil.Text = "avanza" Then
hargamobil.Text = 5000000000
ElseIf kondisi.Text = "BEKAS" And jenismobil.Text = "avanza" Then
hargamobil.Text = 200000000
ElseIf kondisi.Text = "BARU" And jenismobil.Text = "toyota" Then
hargamobil.Text = 600000000
ElseIf kondisi.Text = "BEKAS" And jenismobil.Text = "toyota" Then
hargamobil.Text = 150000000
ElseIf kondisi.Text = "BARU" And jenismobil.Text = " yaris" Then
hargamobil.Text = 400000000
ElseIf kondisi.Text = "BEKAS" And jenismobil.Text = "yaris" Then
hargamobil.Text = 250000000
ElseIf kondisi.Text = "BERU" And jenismobil.Text = "jezz" Then
hargamobil.Text = 370000000
ElseIf kondisi.Text = "BEKAS" And jenismobil.Text = "jezz" Then
hargamobil.Text = 225000000
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PROSES.Click
jumlahbeli.Items.Clear()
If jumlahbeli.Text = "" Then
If MessageBox.Show("ISIKAN DATA", "", MessageBoxButtons.OK) Then
End If
Else
angsuranperbulan.Text = (lamakredit.Text) * (0.03 * lamakredit.Text + lamakredit.Text) / lamakredit.Text
totalharga.Text = jumlahbeli.Text * hargamobil.Text
uangmuka.Text = 0.3 * totalharga.Text
komisisales.Text = 0.2 * jumlahbeli.Text * uangmuka.Text
End If
jumlahbeli.Focus()
End Sub
Private Sub lamakredit_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lamakredit.SelectedIndexChanged
End Sub
Private Sub HAPUS_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HAPUS.Click
kode.Text = ""
jenismobil.Text = ""
kondisi.Text = ""
hargamobil.Text = ""
jumlahbeli.Text = ""
tahunpembuatan.Text = ""
lamakredit.Text = ""
uangmuka.Text = ""
komisisales.Text = ""
angsuranperbulan.Text = ""
totalharga.Text = ""
End Sub
Private Sub KELUAR_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KELUAR.Click
Me.Close()
End Sub
End Class
hasil:
Tidak ada komentar:
Posting Komentar