0% found this document useful (0 votes)
35 views2 pages

Coding

This document contains code for two forms in a hotel reservation application. Form1 allows the user to select the date, time, shift and cashier. It passes these selections to Form2. Form2 displays the room type selected in Form1 and calculates the room rate and total payment based on number of nights selected. It returns the change owed back to the user.

Uploaded by

periskarasma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views2 pages

Coding

This document contains code for two forms in a hotel reservation application. Form1 allows the user to select the date, time, shift and cashier. It passes these selections to Form2. Form2 displays the room type selected in Form1 and calculates the room rate and total payment based on number of nights selected. It returns the change owed back to the user.

Uploaded by

periskarasma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

FORM 1

Public Class Form1

Private Sub Form1_Load(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
[Link] = "Hotel Transylvania"
[Link] = "Hari"
[Link] = "Jam"
[Link] = "Shift"
[Link] = "Cashier"
[Link] = "Next"
End Sub

Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
[Link]()
[Link]()
End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]

End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
If [Link] = "1" Then
[Link] = "08.00 - 12.00"
ElseIf [Link] = "2" Then
[Link] = "13.00 - 17.00"
ElseIf [Link] = "3" Then
[Link] = "19.00 - 23.00"
End If
End Sub

End Class

FORM 2
Public Class Form2

Private Sub Form2_Load(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
[Link] = "Lama Menginap"
[Link] = "Harga Sewa Perhari"
[Link] = "Biaya Sewa Kamar"
[Link] = "Jumlah Bayar"
[Link] = "Kembali"
[Link] = "New"
[Link] = "Close"
[Link] = "Cashier"
[Link] = "Jenis Kamar"

If [Link] = "Abdul" Then


[Link] = "Abdul"
End If
If [Link] = "Hamid" Then
[Link] = "Hamid"
End If

If [Link] = "Al-Islami" Then


[Link] = "Al-Islami"
End If
End Sub

Private Sub Button1_Click(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
If MsgBox("Save?", vbQuestion + vbYesNo, "Save") = vbYes Then
[Link]()
[Link]()
Else : [Link]()
End If

End Sub

Private Sub Button2_Click(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
[Link]()

End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As [Link], ByVal e As


[Link]) Handles [Link]
If [Link] = "VIP" Then
[Link] = "750000"
ElseIf [Link] = "Kelas I" Then
[Link] = "500000"
ElseIf [Link] = "Kelas II" Then
[Link] = "300000"
ElseIf [Link] = "Kelas III" Then
[Link] = "150000"
End If
End Sub

Private Sub TextBox4_Click(ByVal sender As [Link], ByVal e As [Link]) Handles


[Link]
Dim a, b As Integer
Dim c As New Double
a = Val([Link])
b = Val([Link])
c = a * b
[Link] = c
End Sub

Private Sub TextBox4_TextChanged(ByVal sender As [Link], ByVal e As [Link])


Handles [Link]
If [Link] = Int([Link]) Then
[Link] = [Link] - [Link]
End If
End Sub
End Class

You might also like