Minggu, 02 Juni 2013

PENJUALAN TV. SONY



Desain Lah Form Berikut Di VB 2008 :


Ketikkan Listing Program Berikut :

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Kodebrg.Items.Add("11A")
        Kodebrg.Items.Add("11B")
        Kodebrg.Items.Add("11C")
        Kodebrg.Items.Add("11D")
        For i = 1 To 5
            Jmljual.Items.Add(i)
        Next i

    End Sub


    Private Sub Kodebrg_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Kodebrg.SelectedIndexChanged
        If Kodebrg.Text = "11A" Then
            Namabrg.Text = "Sony LED"
            Harga.Text = "1600000"
        ElseIf Kodebrg.Text = "11B" Then
            Namabrg.Text = "Sony BRAVIA"
            Harga.Text = "2000000"
        ElseIf Kodebrg.Text = "11C" Then
            Namabrg.Text = "Sony TRINITRON"
            Harga.Text = "1300000"
        ElseIf Kodebrg.Text = "11D" Then
            Namabrg.Text = "Sony LCD 3D"
            Harga.Text = "2400000"
        Else
            Namabrg.Text = "Tidak Diketahui"
        End If
    End Sub

    Private Sub Jmljual_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Jmljual.SelectedIndexChanged
        TotHarga.Text = Harga.Text * Jmljual.Text
    End Sub

    Private Sub btnProses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProses.Click
        If TotHarga.Text >= 2500000 Then
            Diskon.Text = 0.01 * TotHarga.Text
        Else
            Diskon.Text = 0
        End If
        Totpembayaran.Text = Val(TotHarga.Text) - Val(Diskon.Text)

    End Sub

    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        Kodebrg.Text = ""
    End Sub

    Private Sub btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnkeluar.Click
        End
    End Sub
End Class

Hasil akhir : 


Terkait

Description: PENJUALAN TV. SONY Rating: 4.5 Reviewer: annajmin zega ItemReviewed: PENJUALAN TV. SONY
Al
Mbah Qopet Updated at: 6/02/2013 05:27:00 AM

0 komentar :

Poskan Komentar