Reservasi hotel

3,466 views
3,306 views

Published on

Published in: Technology, Spiritual
1 Comment
0 Likes
Statistics
Notes
  • Be the first to like this

No Downloads
Views
Total views
3,466
On SlideShare
0
From Embeds
0
Number of Embeds
1,339
Actions
Shares
0
Downloads
111
Comments
1
Likes
0
Embeds 0
No embeds

No notes for slide

Reservasi hotel

  1. 1. KELOMPOK 6 HOTELCORE BEEDIAN PURWANTO (100533406901) ……………….. ………………………………………
  2. 2. Flowchart
  3. 3. Lanjutan
  4. 4. Listing ProgramOption Strict OffPublic Class Form1 Inherits System.Windows.Forms.Form Private Sub Button1_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button1.Click Dim harga, harga_bayar, total_bayar, diskon, korting As Integer Dim a As Date = DateTimePicker1.Value Dim b As Date = DateTimePicker2.Value karena hari dimana dimulai dan diakhiri transaksi dihitung 1 hari Dim lama As Int32 = b.DayOfYear - a.DayOfYear + 1 Dim nm_kamar As String If TextBox1.Text = "" Then MessageBox.Show("Anda Belum Memasukkan NamaPengunjung", "Peringatan", MessageBoxButtons.OK,MessageBoxIcon.Warning) TextBox1.Focus()
  5. 5. Lanjutan ElseIf ComboBox1.Text = "" Then MessageBox.Show("Anda Belum Memilih kamar", "Peringatan",MessageBoxButtons.OK, MessageBoxIcon.Warning) ComboBox1.Focus() ElseIf ComboBox2.Text = "" Then MessageBox.Show("Anda Belum Memilih No. kamar","Peringatan", MessageBoxButtons.OK, MessageBoxIcon.Warning) ComboBox1.Text = "" ComboBox2.Focus() ElseIf DateTimePicker2.Value <= Now Then MessageBox.Show("Anda Belum Memasukkan tanggal CekOut","Peringatan", MessageBoxButtons.OK, MessageBoxIcon.Warning) DateTimePicker2.Focus() End If If ComboBox1.Text = "Mawar" Then nm_kamar = "Mawar" TextBox2.Text = "Rp. 200.000,-" harga = 200000 ElseIf ComboBox1.Text = "Melati" Then
  6. 6. Lanjutannm_kamar = "Melati" TextBox2.Text = "Rp. 150.000,-" harga = 150000 ElseIf ComboBox1.Text = "Cempaka" Then nm_kamar = "Cempaka" TextBox2.Text = "Rp. 100.000,-" harga = 100000 End If If (lama >= 10) Then korting = 75 diskon = harga * (korting / 100) harga_bayar = lama * harga total_bayar = ((lama - 1) * harga) + diskon TextBox5.Text = "75" ElseIf (lama >= 7) Then korting = 50 diskon = harga * (korting / 100) harga_bayar = lama * harga total_bayar = ((lama - 1) * harga) + diskon TextBox5.Text = "50" ElseIf (lama >= 5) Then korting = 35
  7. 7. Lanjutandiskon = harga * (korting / 100) harga_bayar = lama * harga total_bayar = ((lama - 1) * harga) + diskon TextBox5.Text = "35" ElseIf (lama >= 3) Then korting = 20 diskon = harga * (korting / 100) harga_bayar = lama * harga total_bayar = ((lama - 1) * harga) + diskon TextBox5.Text = "20" Else diskon = 0 harga_bayar = lama * harga total_bayar = harga_bayar + diskon TextBox5.Text = "0" End If TextBox4.Text = "Rp. " & harga_bayar TextBox6.Text = "Rp. " & total_bayar ListBox1.Items.Add(TextBox1.Text) ListBox2.Items.Add(DateTimePicker1.Value.Date) ListBox3.Items.Add(DateTimePicker2.Value.Date)
  8. 8. LanjutanListBox4.Items.Add(ComboBox1.Text) ListBox5.Items.Add(ComboBox2.Text) ListBox6.Items.Add("Rp. " & total_bayar) End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles MyBase.Load menyembunyikan salam pembuka SplashScreen.Hide() TextBox1.Focus() TextBox2.Enabled = False TextBox4.Enabled = False TextBox5.Enabled = False TextBox6.Enabled = False ListBox1.Enabled = False ListBox2.Enabled = False ListBox3.Enabled = False ListBox4.Enabled = False ListBox5.Enabled = False
  9. 9. LanjutanListBox6.Enabled = False With ComboBox1 .Items.Add("Mawar") .Items.Add("Melati") .Items.Add("Cempaka") End With With ComboBox2 .Items.Add("1") .Items.Add("2") .Items.Add("3") .Items.Add("4") .Items.Add("5") .Items.Add("6") .Items.Add("7") .Items.Add("8") .Items.Add("9") .Items.Add("10") End With
  10. 10. LanjutanListBox7.Items.Add("Nama") ListBox8.Items.Add("Masuk") ListBox9.Items.Add("Keluar") ListBox10.Items.Add("Type") ListBox11.Items.Add("No") ListBox12.Items.Add("Total Bayar") End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button3.Click keluar End menutup pembuka SplashScreen.Close() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Button2.Click AboutBox1.Show() End Sub
  11. 11. LanjutanPrivate Sub Clear_Click(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles Clear.Click TextBox1.Clear() TextBox2.Clear() TextBox4.Clear() TextBox5.Clear() TextBox6.Clear() DateTimePicker2.Value = Now ComboBox1.Text = "" ComboBox2.Text = "" End SubEnd Class
  12. 12. SplashScreen
  13. 13. Exception
  14. 14. Diskon 0%
  15. 15. Diskon 20%
  16. 16. Diskon 35%
  17. 17. Diskon 50%
  18. 18. Diskon 75%
  19. 19. About
  20. 20. ** TIME IS UP **

×