Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net

Kasus Pemrograman : Praktikum PENJUALAN KREDIT MOBIL

Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net


Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        KodeMobil.Items.Add("CAR1")
        KodeMobil.Items.Add("CAR2")
        KodeMobil.Items.Add("CAR3")
        KodeMobil.Items.Add("CAR4")

        Kondisi.Items.Add("Baru")
        Kondisi.Items.Add("Bekas")

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

        JumlahBeli.Items.Add("1")
        JumlahBeli.Items.Add("2")
        JumlahBeli.Items.Add("3")

        LamaKredit.Items.Add("12")
        LamaKredit.Items.Add("24")
        LamaKredit.Items.Add("32")
        LamaKredit.Items.Add("48")
    End Sub

    Private Sub KodeMobil_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KodeMobil.SelectedIndexChanged
        If KodeMobil.Text = "CAR1" Then
            NamaMobil.Text = "Toyota Avanza"
        ElseIf KodeMobil.Text = "CAR2" Then
            NamaMobil.Text = "Daihatsu Xenia"
        ElseIf KodeMobil.Text = "CAR3" Then
            NamaMobil.Text = "Honda Jazz"
        ElseIf KodeMobil.Text = "CAR4" Then
            NamaMobil.Text = "Toyota Yaris"
        End If
    End Sub

    Private Sub Tahun_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tahun.SelectedIndexChanged
        If KodeMobil.Text = "CAR1" And Kondisi.Text = "Baru" And Tahun.Text = "2012" Then
            Harga.Text = "175"
        ElseIf KodeMobil.Text = "CAR1" And Kondisi.Text = "Baru" And Tahun.Text = "2013" Then
            Harga.Text = "195"
        ElseIf KodeMobil.Text = "CAR1" And Kondisi.Text = "Baru" And Tahun.Text = "2014" Then
            Harga.Text = "208"
        ElseIf KodeMobil.Text = "CAR1" And Kondisi.Text = "Bekas" And Tahun.Text = "2012" Then
            Harga.Text = "120"
        ElseIf KodeMobil.Text = "CAR1" And Kondisi.Text = "Bekas" And Tahun.Text = "2013" Then
            Harga.Text = "130"
        ElseIf KodeMobil.Text = "CAR1" And Kondisi.Text = "Bekas" And Tahun.Text = "2014" Then
            Harga.Text = "170"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Baru" And Tahun.Text = "2012" Then
            Harga.Text = "185"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Baru" And Tahun.Text = "2013" Then
            Harga.Text = "205"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Baru" And Tahun.Text = "2014" Then
            Harga.Text = "258"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Bekas" And Tahun.Text = "2012" Then
            Harga.Text = "150"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Bekas" And Tahun.Text = "2013" Then
            Harga.Text = "180"
        ElseIf KodeMobil.Text = "CAR2" And Kondisi.Text = "Bekas" And Tahun.Text = "2014" Then
            Harga.Text = "218"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Baru" And Tahun.Text = "2012" Then
            Harga.Text = "130"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Baru" And Tahun.Text = "2013" Then
            Harga.Text = "140"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Baru" And Tahun.Text = "2014" Then
            Harga.Text = "150"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Bekas" And Tahun.Text = "2012" Then
            Harga.Text = "90"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Bekas" And Tahun.Text = "2013" Then
            Harga.Text = "100"
        ElseIf KodeMobil.Text = "CAR3" And Kondisi.Text = "Bekas" And Tahun.Text = "2014" Then
            Harga.Text = "120"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Baru" And Tahun.Text = "2012" Then
            Harga.Text = "150"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Baru" And Tahun.Text = "2013" Then
            Harga.Text = "170"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Baru" And Tahun.Text = "2014" Then
            Harga.Text = "190"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Bekas" And Tahun.Text = "2012" Then
            Harga.Text = "130"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Bekas" And Tahun.Text = "2013" Then
            Harga.Text = "150"
        ElseIf KodeMobil.Text = "CAR4" And Kondisi.Text = "Bekas" And Tahun.Text = "2014" Then
            Harga.Text = "170"
        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
    End Sub

    Private Sub TotalHarga_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TotalHarga.TextChanged
        UangMuka.Text = 0.3 * TotalHarga.Text
    End Sub

    Private Sub UangMuka_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UangMuka.TextChanged
        KomisiSales.Text = 0.2 * JumlahBeli.Text * UangMuka.Text
    End Sub

    Private Sub KomisiSales_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KomisiSales.TextChanged
        TotalKredit.Text = TotalHarga.Text - UangMuka.Text
    End Sub

    Private Sub LamaKredit_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LamaKredit.SelectedIndexChanged
        Angsuran.Text = (((TotalKredit.Text) * (0.03 * LamaKredit.Text)) + TotalKredit.Text) / LamaKredit.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

Yuk! Belajar Pemrograman Visual Basic dot Net Di Mesran.Net

Previous
Next Post »

3 komentar

Click here for komentar
Unknown
admin
7 Desember 2014 pukul 08.27 ×

saya sudah pernah merasakan VB 6.0 tapi kalau VB Net belum lama banget saya merasakan mas, jadi agak dikit-dikit meraba

Reply
avatar
seru2banget
admin
8 Desember 2014 pukul 04.21 ×

ooh, sebenerny ni syarat quis online sob, makanya langsung ke kasus aja gada basa basi atau penjelasan detilenya wkwk

Reply
avatar
Tutarni
admin
9 Februari 2015 pukul 06.00 ×

Hi : Terima kasih atas tutorialnya, semoga bisa menjadi referensi untuk membuat program dengan Visual Basic

Reply
avatar

Mau Blogwalking?
Silahkan Berkomentar yang relevan, dan tunggu kunjungan balik dari kami. ^_^

ConversionConversion EmoticonEmoticon

Thanks for your comment