The document describes a billing form that calculates hotel room rates and payments based on room type, payment method, and number of nights. It contains code to set labels with the date and time, calculate number of nights between check-in and check-out dates, and compute the payment amount based on room rate, payment method fees or discounts, and number of nights. Conditional logic is used to determine the appropriate room rate based on the selected room type, payment method, and number of nights. Error handling displays a message if no options are selected.
The document describes a billing form that calculates hotel room rates and payments based on room type, payment method, and number of nights. It contains code to set labels with the date and time, calculate number of nights between check-in and check-out dates, and compute the payment amount based on room rate, payment method fees or discounts, and number of nights. Conditional logic is used to determine the appropriate room rate based on the selected room type, payment method, and number of nights. Error handling displays a message if no options are selected.
The document describes a billing form that calculates hotel room rates and payments based on room type, payment method, and number of nights. It contains code to set labels with the date and time, calculate number of nights between check-in and check-out dates, and compute the payment amount based on room rate, payment method fees or discounts, and number of nights. Conditional logic is used to determine the appropriate room rate based on the selected room type, payment method, and number of nights. Error handling displays a message if no options are selected.
The document describes a billing form that calculates hotel room rates and payments based on room type, payment method, and number of nights. It contains code to set labels with the date and time, calculate number of nights between check-in and check-out dates, and compute the payment amount based on room rate, payment method fees or discounts, and number of nights. Conditional logic is used to determine the appropriate room rate based on the selected room type, payment method, and number of nights. Error handling displays a message if no options are selected.
Download as TXT, PDF, TXT or read online from Scribd
Download as txt, pdf, or txt
You are on page 1of 6
Public Class frmBilling
Private Sub frmBilling_Load(sender As Object, e As EventArgs) Handles
MyBase.Load lblDate.Text = Today.ToLongDateString lblTime.Text = TimeOfDay.ToLongTimeString End Sub Private Sub btnDateCheckIn_Click(sender As Object, e As EventArgs) Handles btnDateCheckIn.Click txtDateCheckIn.Text = dptDateCheckOut.Text End Sub Private Sub btnDateCheckout_Click(sender As Object, e As EventArgs) Handles btnDateCheckout.Click txtTNDays.Text = DateDiff("d", txtDateCheckIn.Text, dptDateCheckOut.Text) End Sub Private Sub btnCompute_Click(sender As Object, e As EventArgs) Handles btnCompute.Click Dim Payment, Rate, Charge, Total As Double Dim Message As String If cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 0 And rdoRegular.Checked Then Rate = 100 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 1 And rdoRegular.Checked Then Rate = 100 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 2 And rdoRegular.Checked Then Rate = 100 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex
= 0 And rdoRegular.Checked Then Rate = 200 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 1 And rdoRegular.Checked Then Rate = 200 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 2 And rdoRegular.Checked Then Rate = 200 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex
= 0 And rdoRegular.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 1 And rdoRegular.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 2 And rdoRegular.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex
= 0 And rdoDeLuxe.Checked Then Rate = 300 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 1 And rdoDeLuxe.Checked Then Rate = 300 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 2 And rdoDeLuxe.Checked Then Rate = 300 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex
= 0 And rdoDeLuxe.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 1 And rdoDeLuxe.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 2 And rdoDeLuxe.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.01 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex
= 0 And rdoDeLuxe.Checked Then Rate = 750 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 1 And rdoDeLuxe.Checked Then Rate = 750 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 2 And rdoDeLuxe.Checked Then Rate = 750 Payment = Rate * txtTNDays.Text Charge = Payment * 0.01 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex
= 0 And rdoSuite.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 1 And rdoDeLuxe.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 0 And lstTypeOfPayment.SelectedIndex = 2 And rdoDeLuxe.Checked Then Rate = 500 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex
= 0 And rdoSuite.Checked Then Rate = 800 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 1 And rdoSuite.Checked Then Rate = 800 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 1 And lstTypeOfPayment.SelectedIndex = 2 And rdoSuite.Checked Then Rate = 800 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard")
ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex
= 0 And rdoSuite.Checked Then Rate = 1000 Payment = Rate * txtTNDays.Text txtTotalAmount.Text = Payment txtTotalAmount.Text = Format(Payment, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 1 And rdoSuite.Checked Then Rate = 1000 Payment = Rate * txtTNDays.Text Charge = Payment * 0.05 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") ElseIf cmbRoomCapacity.SelectedIndex = 2 And lstTypeOfPayment.SelectedIndex = 2 And rdoSuite.Checked Then Rate = 1000 Payment = Rate * txtTNDays.Text Charge = Payment * 0.1 Total = Payment + Charge txtTotalAmount.Text = Total txtTotalAmount.Text = Format(Total, "Standard") End If
If cmbRoomCapacity.SelectedIndex = -1 And lstTypeOfPayment.SelectedIndex =
-1 And rdoRegular.Checked = False And rdoDeLuxe.Checked = False And rdoSuite.Checked = False Then Message = MessageBox.Show("No Selected Room Capacity" & vbCrLf & "No Selected Type of Payment" & vbCrLf & "No Selected Room Type", "RETRY", MessageBoxButtons.OK, MessageBoxIcon.Information) If Message = DialogResult.OK Then txtTotalAmount.Text = " " cmbRoomCapacity.SelectedIndex = -1 lstTypeOfPayment.SelectedIndex = -1 rdoSuite.Checked = False rdoDeLuxe.Checked = False rdoRegular.Checked = False End If ElseIf lstTypeOfPayment.SelectedIndex = -1 Then Message = MessageBox.Show("No Selected Type of Payment", "RETRY", MessageBoxButtons.OK, MessageBoxIcon.Information) If Message = DialogResult.OK Then txtTotalAmount.Text = " " cmbRoomCapacity.SelectedIndex = -1 lstTypeOfPayment.SelectedIndex = -1 rdoSuite.Checked = False rdoDeLuxe.Checked = False rdoRegular.Checked = False End If ElseIf rdoRegular.Checked = False And rdoDeLuxe.Checked = False And rdoSuite.Checked = False Then Message = MessageBox.Show("No Selected Room Type", "RETRY", MessageBoxButtons.OK, MessageBoxIcon.Information) If Message = DialogResult.OK Then txtTotalAmount.Text = " " cmbRoomCapacity.SelectedIndex = -1 lstTypeOfPayment.SelectedIndex = -1 rdoSuite.Checked = False rdoDeLuxe.Checked = False rdoRegular.Checked = False End If End If End Sub Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click txtCustomerName.Text = " " txtDateCheckIn.Text = " " txtTNDays.Text = " " txtTotalAmount.Text = " " cmbRoomCapacity.SelectedIndex = -1 lstTypeOfPayment.SelectedIndex = -1 rdoSuite.Checked = False rdoDeLuxe.Checked = False rdoRegular.Checked = False End Sub Private Sub btnClose_Click(sender As Object, e As EventArgs) Handles btnClose.Click Me.Close() End Sub End Class
////////////////////////// cmbDateCheckOut/////Collection Monday, 3 October 2022 Monday, 10 October 2022 Monday, 17 October 2022 Monday, 24 October 2022 Monday, 31 October 2022
Tuesday, 4 October 2022
Tuesday, 11 October 2022 Tuesday, 18 October 2022 Tuesday, 25 October 2022 Tuesday, 1 November 2022
Wednesday, 5 October 2022
Wednesday, 12 October 2022 Wednesday, 19 October 2022 Wednesday, 26 October 2022 Wednesday, 2 November 2022
Thursday, 6 October 2022
Thursday, 13 October 2022 Thursday, 20 October 2022 Thursday, 27 October 2022 Thursday, 3 November 2022
Friday, 7 October 2022
Friday, 14 October 2022 Friday, 21 October 2022 Friday, 28 October 2022 Friday, 4 November 2022
Saturday, 8 October 2022
Saturday, 15 October 2022 Saturday, 22 October 2022 Saturday, 29 October 2022 Saturday, 5 November 2022
Sunday, 2 October 2022
Sunday, 9 October 2022 Sunday, 16 October 2022 Sunday, 23 October 2022 Sunday, 30October 2022