Selasa, 06 Oktober 2015

Form penjualan


 
  Pertama tama saya menugucap syukur pada kehadirat Tuhan YME, kedua Orang Tua saya, keluarga saya dan Sahabat-sahabat yang saya kasihi. Atas dukungan dan dorongannyaa, sehingga saya dapat menyelesaikan tugas tentang Program VB Net. OK........:)
kagak usah basa-basi lagi..... langsung ke intinya lah. 

Contoh Kode Program Transaksi Penjualan

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        kode.Items.Add("TV-01")
        kode.Items.Add("TV-02")
        kode.Items.Add("DV-01")
        kode.Items.Add("DV-02")
    End Sub



    Private Sub kode_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles kode.SelectedIndexChanged

        If kode.Text = "TV-01" Then
            nama.Text = "TV SAMSUNG 42 INCH"
            harga.Text = 4500000
        ElseIf kode.Text = "TV-02" Then
            nama.Text = "TV LG 42 INCH"
            harga.Text = 3500000
        ElseIf kode.Text = "DV-01" Then
            nama.Text = "DVD PLAYER SAMSUNG"
            harga.Text = 2000000
        ElseIf kode.Text = "DV-02" Then
            nama.Text = "DVD PLAYER MINIKOMPO"
            harga.Text = 250000
        End If
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnhapus.Click
        kode.Text = ""
        nama.Text = ""
        harga.Text = ""
        jumlah.Text = ""
        th.Text = ""
    End Sub

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

    Private Sub Btnproses_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Btnproses.Click
        th.Text = Val(harga.Text) * Val(jumlah.Text)
    End Sub

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

        If Asc(e.KeyChar) = 13 Then
            Btnproses_Click(sender, e)

        End If

    End Sub

    Private Sub jumlah_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jumlah.TextChanged

    End Sub

End Class

Postingan
By: Joe Perdo Nababan

Tidak ada komentar:

Posting Komentar