Kamis, 25 Oktober 2012

PROM PENJUALAN BARANG



Selahkan ketik rumus dibawah ini.
dan lalu lihat hasil ny dengan tkan f5
Public Class penjualan

    Private Sub penjualan_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        tipe.Items.Add("NOKIA")
        tipe.Items.Add("SAMSUNG")
        tipe.Items.Add("SIEMEN")
        tipe.Items.Add("MOTOROLA")

        kondisi.Items.Add("BARU")
        kondisi.Items.Add("SECOND")

        harga.Text = 0

    End Sub

    Private Sub btnhapus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnhapus.Click
        tipe.Text = ""
        seri.Text = ""
        kondisi.Text = ""
        harga.Text = ""
        jumlah.Text = ""
        total_harga.Text = ""
    End Sub

    Private Sub tipe_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tipe.SelectedIndexChanged
        seri.Items.Clear()

        If tipe.Text = "NOKIA" Then
            seri.Items.Add("N70")
            seri.Items.Add("N73")
        End If
        If tipe.Text = "SAMSUNG" Then
            seri.Items.Add("SIII")
            seri.Items.Add("GYOUNG")
        End If
        If tipe.Text = "SEIMEN" Then
            seri.Items.Add("C55")
            seri.Items.Add("M55")
        End If
        If tipe.Text = "MOTOROLA" Then
            seri.Items.Add("MX31")
            seri.Items.Add("XM31")
        End If

    End Sub

    Private Sub Btnkeluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnkeluar.Click
        End
    End Sub

    Private Sub kondisi_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kondisi.SelectedIndexChanged
        harga.Text = 0
        If seri.Text = "N70" And kondisi.Text = "BARU" Then
            harga.Text = 1950000
        ElseIf seri.Text = "N70" And kondisi.Text = "SECOND" Then
            harga.Text = 1000000
        ElseIf seri.Text = "N73" And kondisi.Text = "BARU" Then
            harga.Text = 1850000
        ElseIf seri.Text = "N73" And kondisi.Text = "SECOND" Then
            harga.Text = 1200000
        ElseIf seri.Text = "SIII" And kondisi.Text = "BARU" Then
            harga.Text = 1750000
        ElseIf seri.Text = "SIII" And kondisi.Text = "SECOND" Then
            harga.Text = 1400000

        ElseIf seri.Text = "GYOUNG" And kondisi.Text = "BARU" Then
            harga.Text = 1550000
        ElseIf seri.Text = "GYOUNG" And kondisi.Text = "SECOND" Then
            harga.Text = 14300000
        ElseIf seri.Text = "C55" And kondisi.Text = "BARU" Then
            harga.Text = 2000000
        ElseIf seri.Text = "C55" And kondisi.Text = "SECOND" Then
            harga.Text = 1850000
        End If

    End Sub

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

        If e.KeyChar = Chr(13) Then
            total_harga.Text = harga.Text * jumlah.Text
        End If
    End Sub

    Private Sub btn_proses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_proses.Click

    End Sub
End Class

Tidak ada komentar:

Posting Komentar