PublicClass Form2
PrivateSub
Button1_Click(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
Button1.Click
End
EndSub
PrivateSub
Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
tipe.Items.Add("Nokia")
tipe.Items.Add("SAMSUNG")
tipe.Items.Add("SIEMENS")
tipe.Items.Add("MOTOROLA")
kondisi.Items.Clear()
kondisi.Items.Add("BARU")
kondisi.Items.Add("SECOND")
EndSub
PrivateSub
tipe_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
tipe.SelectedIndexChanged
seri.Items.Clear()
SelectCase tipe.Text
Case"Nokia"
seri.Items.Add("N70")
seri.Items.Add("N73")
Case"SAMSUNG"
seri.Items.Add("SIII")
seri.Items.Add("Gyoung")
Case"SIEMENS"
seri.Items.Add("c55")
seri.Items.Add("M55")
Case"MOTOROLA"
seri.Items.Add("MX31")
seri.Items.Add("XM31")
EndSelect
EndSub
PrivateSub
kondisi_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
kondisi.SelectedIndexChanged
harga.Text = 0
SelectCase
kondisi.Text
Case"BARU"
SelectCase seri.Text
Case"N70" : harga.Text = 1950000
Case"N73" : harga.Text = 1000000
Case"SIII" : harga.Text = 3000000
Case"Gyoung" : harga.Text = 4000000
Case"c55" : harga.Text = 2300000
Case"M55" : harga.Text = 5500000
Case"MX31" : harga.Text = 9000000
Case"XM31" : harga.Text = 23400000
EndSelect
Case"SECOND"
SelectCase seri.Text
Case"N70" : harga.Text = 900000
Case"N73" : harga.Text = 800000
Case"SIII" : harga.Text = 700000
Case"Gyoung" : harga.Text = 940000
Case"c55" : harga.Text = 245000
Case"M55" : harga.Text = 745000
Case"MX31" : harga.Text = 5645000
Case"XM31" : harga.Text = 2245000
EndSelect
EndSelect
EndSub
PrivateSub
seri_SelectedIndexChanged(ByVal sender As System.Object, ByVal
e As System.EventArgs) Handles
seri.SelectedIndexChanged
EndSub
PrivateSub
jumlah_KeyPress(ByVal sender AsObject, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles jumlah.KeyPress
If e.KeyChar
= Chr(13) Then
total.Text = harga.Text *
jumlah.Text
EndIf
EndSub
PrivateSub
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.Text = ""
EndSub
EndClass
Tidak ada komentar:
Posting Komentar