Public Class Form1
Private Sub Form1_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
KODEBARANG.Items.Add("SM001")
KODEBARANG.Items.Add("SM002")
KODEBARANG.Items.Add("DG001")
KODEBARANG.Items.Add("DG002")
End Sub
Private Sub KODEBARANG_SelectedIndexChanged(ByVal sender As
System.Object, ByVal e As
System.EventArgs) Handles
KODEBARANG.SelectedIndexChanged
Dim
XKODE As String
XKODE =
Microsoft.VisualBasic.Left(KODEBARANG.Text, 2)
Select Case XKODE
Case
"SM"
MERK.Text = "SAMSUNG"
Case
"DG"
MERK.Text = "DIGITEC"
End Select
XKODE = Microsoft.VisualBasic.Right(KODEBARANG.Text,
3)
Select
XKODE
Case
"001"
NAMA.Text = "TV 21 inc"
HARGA.Text = 3670000
Case
"002"
NAMA.Text = "TV 32 inc"
HARGA.Text = 7500000
End Select
End Sub
Private Sub BTNHAPUS_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNHAPUS.Click
NOPENJUAL.Text = ""
KODEBARANG.Text = ""
NAMA.Text = ""
MERK.Text = ""
HARGA.Text = ""
JUMLAH.Text = ""
TOTAL.Text = ""
NOPENJUAL.Focus()
End Sub
Private Sub BTNPROSES_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNPROSES.Click
TOTAL.Text = HARGA.Text * JUMLAH.Text
End Sub
Private Sub BTNKELUAR_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles BTNKELUAR.Click
Me.Close()
End Sub
End Class
Tidak ada komentar:
Posting Komentar