Quis Vibi Lab E\MLE
- Desai Form sbb:
- Logika dan ketentuan soal
-
Input nama
penumpang
-
Input
kelas
KELAS
|
KETERANGAN
|
1
|
EXECUTIVE
|
2
|
BISNIS
|
3
|
EKONOMI
|
-
Pilih
tujuan maka harga akan tampil
Tujuan
|
Kelas
|
Harga
|
JAKARTA-
SURABAYA
|
1
|
310000
|
2
|
250000
|
|
3
|
170000
|
|
JAKARTA-
SOLO
|
1
|
260000
|
2
|
210000
|
|
3
|
150000
|
|
JAKARTA-
YOGYAKARTA
|
1
|
230000
|
2
|
170000
|
|
3
|
120000
|
-
Input
Jumlah tiket maka Total akan tampil
TOTAL = harga
tiket * jumlah tiket
Private Sub CMDBERSIH_Click()
TXTNAMA.Text = ""
TXTKELAS.Text = ""
LBLKELAS.Caption = ""
TXTHARGA.Text = ""
TXTJUMLAH.Text = ""
TXTTOTAL.Text = ""
OPTYOGYA.Value = False
OPTSOLO.Value = False
OPTSBY.Value = False
TXTNAMA.SetFocus
End Sub
Private Sub TXTKELAS_Change()
If TXTKELAS.Text = "1" Then
LBLKELAS.Caption = "EXCLUSIVE"
ElseIf TXTKELAS.Text = "2" Then
LBLKELAS.Caption = "BISNIS"
ElseIf TXTKELAS.Text = "3" Then
LBLKELAS.Caption = "EKONOMI"
Else
LBLKELAS.Caption = "SALAH INPUT"
End If
End Sub
Private Sub OPTSBY_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 310000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 250000
Else
TXTHARGA.Text = 170000
End If
End Sub
Private Sub OPTSOLO_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 260000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 210000
Else
TXTHARGA.Text = 150000
End If
End Sub
Private Sub OPTYOGYA_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 230000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 170000
Else
TXTHARGA.Text = 120000
End If
End Sub
Private Sub TXTJUMLAH_Change()
TXTTOTAL.Text = Val(TXTHARGA.Text) * Val(TXTJUMLAH.Text)
End Sub
Private Sub CMDKELUAR_Click()
S = MsgBox("MAU KELUAR YAA...?", vbQuestion + vbYesNo, "INFORMASI")
If S = vbYes Then
End
End If
End Sub
Best Regard,TXTNAMA.Text = ""
TXTKELAS.Text = ""
LBLKELAS.Caption = ""
TXTHARGA.Text = ""
TXTJUMLAH.Text = ""
TXTTOTAL.Text = ""
OPTYOGYA.Value = False
OPTSOLO.Value = False
OPTSBY.Value = False
TXTNAMA.SetFocus
End Sub
Private Sub TXTKELAS_Change()
If TXTKELAS.Text = "1" Then
LBLKELAS.Caption = "EXCLUSIVE"
ElseIf TXTKELAS.Text = "2" Then
LBLKELAS.Caption = "BISNIS"
ElseIf TXTKELAS.Text = "3" Then
LBLKELAS.Caption = "EKONOMI"
Else
LBLKELAS.Caption = "SALAH INPUT"
End If
End Sub
Private Sub OPTSBY_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 310000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 250000
Else
TXTHARGA.Text = 170000
End If
End Sub
Private Sub OPTSOLO_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 260000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 210000
Else
TXTHARGA.Text = 150000
End If
End Sub
Private Sub OPTYOGYA_Click()
If TXTKELAS.Text = "1" Then
TXTHARGA.Text = 230000
ElseIf TXTKELAS.Text = "2" Then
TXTHARGA.Text = 170000
Else
TXTHARGA.Text = 120000
End If
End Sub
Private Sub TXTJUMLAH_Change()
TXTTOTAL.Text = Val(TXTHARGA.Text) * Val(TXTJUMLAH.Text)
End Sub
Private Sub CMDKELUAR_Click()
S = MsgBox("MAU KELUAR YAA...?", vbQuestion + vbYesNo, "INFORMASI")
If S = vbYes Then
End
End If
End Sub
0 comments:
Post a Comment
No Coment No Spam!!!