0% found this document useful (0 votes)
62 views4 pages

Nama: Arya Pramana Kelas: KMA-R31/19 NPM: 19306045 Quis VB Pertemuan 6

The document contains details of a student project to create a hotel booking application, including setting up the user interface with controls like text boxes and buttons, and code to calculate booking costs based on room type and duration and display payment amounts. It provides the student name and class, then describes setting up the UI and includes code to handle events like new bookings, closing the app, updating prices based on room selected, and calculating totals.

Uploaded by

Arya Pramana
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)
62 views4 pages

Nama: Arya Pramana Kelas: KMA-R31/19 NPM: 19306045 Quis VB Pertemuan 6

The document contains details of a student project to create a hotel booking application, including setting up the user interface with controls like text boxes and buttons, and code to calculate booking costs based on room type and duration and display payment amounts. It provides the student name and class, then describes setting up the UI and includes code to handle events like new bookings, closing the app, updating prices based on room selected, and calculating totals.

Uploaded by

Arya Pramana
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
You are on page 1/ 4

Nama : Arya Pramana

Kelas : KMA-R31/19
NPM : 19306045
Quis VB Pertemuan 6

1.Membuat Project

2. Membuat UI Nya
Dengan format di toolbox

*From *ComboBox1

>Starporsition,centerscreen >items,VIP-C1-C2-C3

>Text,Inap hotel *TextBox1

>Name,Frominap >Name,Txtlama

*Gropbox 1 *TextBox2

>Text,Entri inap hotel >Name,Txtharga

>Name,gbhotel *TextBox3

*label1 >Text,jumlah bayar

>Text,Lama inap *TextBox4

*label2 >Name,Txtbayar

>Text,Harga inap *TextBox5

*label3 >Name,Txtbayar

>Name,Txtharga *button1

*label4 >Text,Biaya

>Text,jumlah bayar >Name,Btnbiaya

*label5 *button2

>Text,kembali >Text, kembali

*label6 >Name,TxtKembali

>text,jenis kamar *Button3

>Text,New

>Name,BtnNew

*Button4

>Text,Close

>Name,BtnClose
Code
Private Sub BtnNew_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnNew.Click
CbJenis.SelectedIndex = -1
Me.TxtLama.Clear()
Me.TxtHarga.Clear()
Me.TxtBiaya.Clear()
Me.TxtBayar.Clear()
Me.TxtKembali.Clear()
Me.CbJenis.Focus()
End Sub

Private Sub BtnClose_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnClose.Click
Me.Close()
End Sub

Private Sub CbJenis_SelectedIndexChanged(ByVal sender As System.Object, ByVal


e As System.EventArgs) Handles CbJenis.SelectedIndexChanged
Select Case CbJenis.Text
Case "vip"
Me.TxtHarga.Text = 850000
Case "C1"
Me.TxtHarga.Text =1900000
Case "C2"
Me.TxtHarga.Text = 2000000
Case "C3"
Me.TxtHarga.Text = 100000
End Select

End Sub

Private Sub BtnBiaya_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles BtnBiaya.Click
TxtBiaya.Text = Val(TxtLama.Text) * Val(TxtHarga.Text)

End Sub
Private Sub BtnKembali_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles BtnKembali.Click
TxtKembali.Text = Val(TxtBayar.Text) - Val(TxtBiaya.Text)
End Sub
End Class.

You might also like