CONTOH PEMBUATAN PROGRAM FORM PENJUALAN MOBIL


 Public Class login

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If user.Text = "irwan" And password.Text = "irwan04" Then
            Form1.Show()
            Me.Hide()
        Else
            MsgBox("Login Anda Gagal !!")
        End If
    End Sub
End Class


 Public Class Form1

    Private Sub ProgramSayaToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgramSayaToolStripMenuItem.Click
        Form2.Show()
        Form2.MdiParent = Me
    End Sub

    Private Sub EXITToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EXITToolStripMenuItem.Click
        Me.Close()
    End Sub
End Class


Public Class Form2

    Private Sub Form2_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")

        tahun.Items.Add("2012")
        tahun.Items.Add("2013")
        tahun.Items.Add("2014")

        kondisi.Items.Add("baru")
        kondisi.Items.Add("bekas")

        For x = 1 To 10
            jumlahbeli.Items.Add(x)
        Next

        For i = 12 To 48
            lamakredit.Items.Add(i)
        Next

        Call settable()
    End Sub

    Sub settable()
        Lv.Columns.Add("KODE", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("MOBIL", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("TAHUN", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("KONDISI", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("HARGA", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("JUMLAH BELI", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("TOTAL HARGA", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("UANG MUKA", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("KOMISI SALES", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("TOTAL KREDIT", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("LAMA KREDIT", 100, HorizontalAlignment.Left)
        Lv.Columns.Add("ANGSURAN PER BULAN", 100, HorizontalAlignment.Left)

        Lv.View = View.Details
        Lv.GridLines = True
        Lv.FullRowSelect = True


    End Sub


    Private Sub kode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kode.SelectedIndexChanged
        Select Case kode.Text
            Case "MB1"
                mobil.Text = "Avanza Velos"
            Case "MB2"
                mobil.Text = "Avanja G"
            Case "MB3"
                mobil.Text = "Xenia G"
            Case "MB4"
                mobil.Text = "Yaris"
        End Select
    End Sub

    Private Sub kondisi_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kondisi.SelectedIndexChanged

        If kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2012" And kondisi.Text = "baru" Then
            harga.Text = 175
        ElseIf kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2012" And kondisi.Text = "bekas" Then
            harga.Text = 120
        ElseIf kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2013" And kondisi.Text = "baru" Then
            harga.Text = 195
        ElseIf kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2013" And kondisi.Text = "bekas" Then
            harga.Text = 130
        ElseIf kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2014" And kondisi.Text = "baru" Then
            harga.Text = 208
        ElseIf kode.Text = "MB1" And mobil.Text = "Avanza Velos" And tahun.Text = "2014" And kondisi.Text = "bekas" Then
            harga.Text = 170

        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2012" And kondisi.Text = "baru" Then
            harga.Text = 175
        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2012" And kondisi.Text = "bekas" Then
            harga.Text = 120
        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2013" And kondisi.Text = "baru" Then
            harga.Text = 195
        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2013" And kondisi.Text = "bekas" Then
            harga.Text = 130
        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2014" And kondisi.Text = "baru" Then
            harga.Text = 208
        ElseIf kode.Text = "MB2" And mobil.Text = "Avanja G" And tahun.Text = "2014" And kondisi.Text = "bekas" Then
            harga.Text = 170


        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2012" And kondisi.Text = "baru" Then
            harga.Text = 145
        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2012" And kondisi.Text = "bekas" Then
            harga.Text = 115
        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2013" And kondisi.Text = "baru" Then
            harga.Text = 136
        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2013" And kondisi.Text = "bekas" Then
            harga.Text = 124
        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2014" And kondisi.Text = "baru" Then
            harga.Text = 167
        ElseIf kode.Text = "MB3" And mobil.Text = "Xenia G" And tahun.Text = "2014" And kondisi.Text = "bekas" Then
            harga.Text = 157

        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2012" And kondisi.Text = "baru" Then
            harga.Text = 207
        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2012" And kondisi.Text = "bekas" Then
            harga.Text = 200
        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2013" And kondisi.Text = "baru" Then
            harga.Text = 210
        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2013" And kondisi.Text = "bekas" Then
            harga.Text = 208
        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2014" And kondisi.Text = "baru" Then
            harga.Text = 220
        ElseIf kode.Text = "MB4" And mobil.Text = "Yaris" And tahun.Text = "2014" And kondisi.Text = "bekas" Then
            harga.Text = 218
        End If

    End Sub

    Private Sub jumlahbeli_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jumlahbeli.SelectedIndexChanged
        totalharga.Text = jumlahbeli.Text * harga.Text
        uangmuka.Text = 0.3 * totalharga.Text
        komisi.Text = 0.02 * jumlahbeli.Text * uangmuka.Text
        totalkredit.Text = totalharga.Text - uangmuka.Text
    End Sub

    Private Sub angsuran_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles angsuran.KeyPress

        If Asc(e.KeyChar) = 13 Then
            Call isitable()
        End If
    End Sub

    Sub isitable()
        Dim z As New ListViewItem
        z.Text = kode.Text
        z.SubItems.Add(mobil.Text)
        z.SubItems.Add(tahun.Text)
        z.SubItems.Add(kondisi.Text)
        z.SubItems.Add(harga.Text)
        z.SubItems.Add(jumlahbeli.Text)
        z.SubItems.Add(totalharga.Text)
        z.SubItems.Add(uangmuka.Text)
        z.SubItems.Add(komisi.Text)
        z.SubItems.Add(totalkredit.Text)
        z.SubItems.Add(lamakredit.Text)
        z.SubItems.Add(angsuran.Text)
        Lv.Items.Add(z)

    End Sub


    Private Sub angsuran_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles angsuran.TextChanged

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)

    End Sub
   
    Private Sub lamakredit_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lamakredit.SelectedIndexChanged
        angsuran.Text = Val(totalkredit) * Val(0.03 * lamakredit.Text) + Val(totalkredit.Text) / lamakredit.Text
    End Sub
End Class
CONTOH PEMBUATAN PROGRAM FORM PENJUALAN MOBIL CONTOH PEMBUATAN PROGRAM FORM PENJUALAN MOBIL Reviewed by Pak Gulo on Maret 26, 2015 Rating: 5

Tidak ada komentar:

Diberdayakan oleh Blogger.