Program ini dimulai dengan memilih seri HP dan tipe HP. Setelah itu klik "Buat Pilihan". Setelah tombol itu di klik, maka data tipe yang dibeli serta detail pembayaran (tagihan) yang dibebankan kepada user.
code source:
Public Class Form1
Private Sub serie_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles serie.CheckedChanged
tipe1.Text = "E71"
tipe2.Text = "E72"
tipe3.Text = "E63"
End Sub
Private Sub serin_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles serin.CheckedChanged
tipe1.Text = "N97"
tipe2.Text = "N70"
tipe3.Text = "N82"
End Sub
Private Sub serieme_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles serieme.CheckedChanged
tipe1.Text = "5800"
tipe2.Text = "N73"
tipe3.Text = ""
End Sub
Private Sub keluar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles keluar.Click
End
End Sub
Private Sub buatpil_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles buatpil.Click
tipepil.Enabled = True
harga.Enabled = True
jmltghn.Enabled = True
diskon.Enabled = True
total.Enabled = True
If tipe1.Checked = True Then
tipepil.Text = tipe1.Text
ElseIf tipe2.Checked = True Then
tipepil.Text = tipe2.Text
ElseIf tipe3.Checked = True Then
tipepil.Text = tipe3.Text
Else
MsgBox("Belum ada pilihan", MsgBoxStyle.Critical, "TAK ADA PILIHAN")
End If
Select Case tipepil.Text
Case Is = "E63"
harga.Text = 2800000
Case Is = "E71"
harga.Text = 3500000
Case Is = "E72"
harga.Text = 3800000
Case Is = "N82"
harga.Text = 2750000
Case Is = "N97"
harga.Text = 5200000
Case Is = "N70"
harga.Text = 1250000
Case Is = "N73"
harga.Text = 1500000
Case Is = "5800"
harga.Text = 4325000
Case Else
End Select
jmltghn.Text = harga.Text
If jmltghn.Text >= 3500000 Then
diskon.Text = jmltghn.Text * 0.2
Else
diskon.Text = 0
End If
total.Text = jmltghn.Text - diskon.Text
End Sub
End Class
Tidak ada komentar:
Posting Komentar