Selasa, 09 Maret 2010

Program Jual Sepatu

Program ini dimulai dengan memilih merk dan tipe sepatu. setelah itu klik tombol beli.
saat tombol beli di klik. maka harga, diskon dan total yang harus di bayar.

bila tombol refresh di klik, maka program akan memulai seperti pertama kali.

















source code:





Public Class Form1


Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged
If RadioButton1.Checked = True Then
satu.Text = "F10"
dua.Text = "F5"
tiga.Text = "Adipure"
End If
End Sub

Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged
If RadioButton2.Checked = True Then
satu.Text = "Mercurial"
dua.Text = "T90"
tiga.Text = "Laser"
End If
End Sub

Private Sub RadioButton3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton3.CheckedChanged
If RadioButton3.Checked = True Then
satu.Text = "v1.10"
dua.Text = "v5.10"
tiga.Text = "Liga XL IT"
End If
End Sub

Private Sub Beli_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Beli.Click
hargasepatu.Enabled = True
diskon.Enabled = True
total.Enabled = True

If RadioButton1.Checked = True Then
If satu.Checked = True Then
hargasepatu.Text = "525000"
ElseIf dua.Checked = True Then
hargasepatu.Text = "400000"
ElseIf tiga.Checked = True Then
hargasepatu.Text = "625000"
Else
MsgBox("Pilih satu tipe", MsgBoxStyle.Exclamation, "Tipe")
End If
ElseIf RadioButton2.Checked = True Then
If satu.Checked = True Then
hargasepatu.Text = "650000"
ElseIf dua.Checked = True Then
hargasepatu.Text = "469000"
ElseIf tiga.Checked = True Then
hargasepatu.Text = "725000"
Else
MsgBox("Pilih satu tipe", MsgBoxStyle.Exclamation, "Tipe")
End If
ElseIf RadioButton3.Checked = True Then
If satu.Checked = True Then
hargasepatu.Text = "400000"
ElseIf dua.Checked = True Then
hargasepatu.Text = "445000"
ElseIf tiga.Text = True Then
hargasepatu.Text = "475000"
Else
MsgBox("Pilih satu tipe", MsgBoxStyle.Exclamation, "Tipe")
End If
Else
MsgBox("Pilih satu vendor", MsgBoxStyle.Exclamation, "Vendor")
End If

diskon.Text = 0.1 * hargasepatu.Text
total.Text = hargasepatu.Text - diskon.Text
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Me.Text = "PROGRAM JUAL SEPATU"
Beli.Focus()
End Sub

Private Sub ulang_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ulang.Click
hargasepatu.Text = ""
diskon.Text = ""
total.Text = ""
Beli.Focus()
End Sub
End Class
Tidak ada komentar:
Postingan Lebih Baru Postingan Lama Beranda