what more to add in this code to display the total cost in the label named lblTotalCost? how to declare the constants and convert it?
Private Sub btnTotalCost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnTotalCost.Click
lblTotalCost.Text = "YOU HAVE ORDERED:" & vbNewLine
lblTotalCost.Text = lblTotalCost.Text & "ROOM TYPE" & vbNewLine & "--------" & vbNewLine
If radLuxury.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Luxury = $210" & vbNewLine
ElseIf radSuperior.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Superior = $150" & vbNewLine
Else
lblTotalCost.Text = lblTotalCost.Text & "Standard = $110" & vbNewLine
End If
lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "MEAL OPTIONS" & vbNewLine & "--------" & vbNewLine
If chkBufferBreakfast.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Buffer Breakfast = $40" & vbNewLine
End If
If chkBufferDinner.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Buffer Dinner = $60" & vbNewLine
End If
lblTotalCost.Text = lblTotalCost.Text & vbNewLine & "AMENITIES" & vbNewLine & "--------" & vbNewLine
If chkInternet.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Internet = $10" & vbNewLine
End If
If chkEntertainment.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Entertainment = $20" & vbNewLine
End If
If chkSpaServices.Checked Then
lblTotalCost.Text = lblTotalCost.Text & "Spa Services = $50" & vbNewLine
End If
End Sub
Aucun commentaire:
Enregistrer un commentaire