Public Class frmBook
Dim Price_book, Total As Integer
Dim book As String
Dim sex As String
Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Total = Price_book
MessageBox.Show("ชื่อผู้สั่ง:" & CStr(txt1.Text) & vbCrLf & "คุณเลือกสั่งคู่มือ" & book & vbCrLf & "ราคารวม" & CStr(Total) & "บาท", "ผลการเลือก", MessageBoxButtons.OK, MessageBoxIcon.Asterisk)
End Sub
Private Sub btnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExit.Click
Dim a As DialogResult = MessageBox.Show("คุณต้องการปิดหน้านี้หรือไม่", "ตำเตือน", MessageBoxButtons.YesNoCancel, MessageBoxIcon.Asterisk)
If a = DialogResult.Cancel Then
Exit Sub
Else
End If
End
End Sub
Private Sub rad1_CheckedChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs)
sex = "เพศหญิง"
End Sub
Private Sub rad2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad2.CheckedChanged
book = "อาหารภาคเหนือ"
Price_book = 300
End Sub
Private Sub rad3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad3.CheckedChanged
book = "อาหารภาคใต้"
Price_book = 150
End Sub
Private Sub rad4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad4.CheckedChanged
book = "อาหารภาคอีสาน"
Price_book = 200
End Sub
Private Sub rad5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad5.CheckedChanged
book = "อาหารภาคกลาง"
Price_book = 220
End Sub
Private Sub rad6_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
sex = "เพศชาย"
End Sub
Private Sub rad7_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad7.CheckedChanged
book = "พัฒนา Word"
Price_book = 200
End Sub
Private Sub rad8_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad8.CheckedChanged
book = "พัฒนา Excel"
Price_book = 150
End Sub
Private Sub rad9_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad9.CheckedChanged
book = "พัฒนา PowerPoint"
Price_book = 300
End Sub
Private Sub rad10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rad10.CheckedChanged
book = "ดูแลรักษาโน้ตบุก"
Price_book = 400
End Sub
End Class