Listing Pogram Untuk Hotel BSI Palace
Private Sub cmdclear_Click()
txtnama.Text = ""
txtidentitas.Text = ""
txtkode.Text = ""
txtkamar.Text = ""
txtharga.Text = ""
Listsarapan.Clear
txtlama.Text = ""
txttotal.Text = ""
txtuang.Text = ""
txtsisa.Text = ""
txtjumlah.Text = ""
txtkembali.Text = ""
End Sub
Private Sub cmdproses_Click()
txtkembali.Text = Val(txtjumlah.Text) - Val(txtsisa.Text)
End Sub
Private Sub cmdquit_Click()
Unload Me
End Sub
Private Sub txtidentitas_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtkode.SetFocus
End If
End Sub
Private Sub txtjumlah_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtkembali.SetFocus
End If
End Sub
Private Sub txtjumlah_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Val(txtjumlah.Text) < Val(txtsisa.Text) Then
z = MsgBox("Maaf Duit yang dimasukkan Kurang, Silahkan isi Kembali", vbOKOnly, "Perhatian")
txtjumlah.Text = ""
txtjumlah.SetFocus
End If
End If
End Sub
Private Sub txtkembali_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtnama.SetFocus
End If
End Sub
Private Sub txtkode_Change()
If txtkode.Text = 1 Then
txtkamar.Text = "Executive"
txtharga.Text = 500000
Listsarapan.AddItem "Nasi Goreng Special"
Listsarapan.AddItem "Telor 1/2 matang"
Listsarapan.AddItem "Susu Murni"
ElseIf txtkode.Text = 2 Then
txtkamar.Text = "VIP"
txtharga.Text = 400000
Listsarapan.AddItem "Nasi Goreng "
Listsarapan.AddItem "Kerupuk"
Listsarapan.AddItem "Kopi Panas"
ElseIf txtkode.Text = 3 Then
txtkamar.Text = "Bisnis"
txtharga.Text = 300000
Listsarapan.AddItem "Nasi Uduk "
Listsarapan.AddItem "Oncom"
Listsarapan.AddItem "Teh Manis"
Else
txtkamar.Text = "Economi"
txtharga.Text = 200000
Listsarapan.AddItem "Nasi Putih + Telor "
Listsarapan.AddItem "Kerupuk"
Listsarapan.AddItem "Air Putih"
End If
End Sub
Private Sub txtkode_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtlama.SetFocus
End If
End Sub
Private Sub txtlama_Change()
txttotal.Text = Val(txtharga.Text) * Val(txtlama.Text)
txtuang.Text = 0.25 * Val(txttotal.Text)
txtsisa.Text = Val(txttotal.Text) - Val(txtuang.Text)
End Sub
Private Sub txtlama_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtjumlah.SetFocus
End If
End Sub
Private Sub txtnama_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtidentitas.SetFocus
End If
End Sub
Private Sub txtsisa_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
txtjumlah.SetFocus
End If
End Sub
Crated by: Fernando B Siahaan