Hey all, I am doing the regular airline reservation project for my class and am stuck . I have assigned the radio buttons but need help creating reports from this system and displaying my output. I need help with
1. A report containing passenger name and telephone number for each assigned seat
2. a passenger ticket that include airline name, date of booking, passenger name and seat number.
so far i have:
CODE
Public Class Form1
Structure passenger
Dim seatno As String
Dim passname As String
Dim passtel As String
Dim bookdate As DateTime
End Structure
Dim passlist(67) As passenger
Dim pcount As Integer
Dim rowcount As Integer = 18
Dim seatcount As Integer = 4
Dim arow(17) As Integer
Dim crow(17) As Integer
Dim drow(17) As Integer
Dim frow(17) As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
crow(0) = 2
crow(1) = 2
drow(17) = 2
frow(17) = 2
showall()
End Sub
Sub showall()
Dim fmtstr As String = "{0,-3}{1,3}{2,3}{3,3}{4,3}"
lstseats.Items.Clear()
lstseats.Items.Add(String.Format(fmtstr, "", "A", "C", "D", "F"))
lstseats.Items.Add("")
For i As Integer = 0 To rowcount - 1
lstseats.Items.Add(String.Format(fmtstr, i + 1, arow(i), crow(i), drow(i), frow(i)))
Next
End Sub
Private Sub rtbfirst_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbfirst.CheckedChanged
If rtbfirst.Checked = True Then
cborow.items.add(1)
cborow.items.add(2)
End If
End Sub
Private Sub rtbecon_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbecon.CheckedChanged
If rtbecon.Checked = True Then
cborow.items.clear()
For i As Integer = 3 To 18
cborow.Items.Add(i)
Next
End If
End Sub
Private Sub btnbookflight_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnbook.Click
If arow(cborow) <> 0 Then
MsgBox("Seat is not available. Please select another")
Else
'this is where my input is for each reservation
End If
showall()
End Sub
Private Sub rtbaisle_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbaisle.CheckedChanged
If rtbaisle.Checked = True Then
cboseat.Items.Clear()
cboseat.Items.Add("C")
cboseat.Items.Add("D")
End If
End Sub
Private Sub btncancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btncancel.Click
End Sub
Private Sub rtbwindow_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rtbwindow.CheckedChanged
If rtbwindow.Checked = True Then
cboseat.Items.Clear()
cboseat.Items.Add("A")
cboseat.Items.Add("F")
End If
End Sub
End Class
This post has been edited by kr0nkness: 2 Jul, 2008 - 09:41 AM