Public Class Form1 Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " Public Sub New() MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() 'Add any initialization after the InitializeComponent() call End Sub 'Form overrides dispose to clean up the component list. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean) If disposing Then If Not (components Is Nothing) Then components.Dispose() End If End If MyBase.Dispose(disposing) End Sub 'Required by the Windows Form Designer Private components As System.ComponentModel.IContainer 'NOTE: The following procedure is required by the Windows Form Designer 'It can be modified using the Windows Form Designer. 'Do not modify it using the code editor. Friend WithEvents GroupBox1 As System.Windows.Forms.GroupBox Friend WithEvents GroupBox2 As System.Windows.Forms.GroupBox Friend WithEvents Label1 As System.Windows.Forms.Label Friend WithEvents Label2 As System.Windows.Forms.Label Friend WithEvents Label3 As System.Windows.Forms.Label Friend WithEvents TextBox1 As System.Windows.Forms.TextBox Friend WithEvents TextBox2 As System.Windows.Forms.TextBox Friend WithEvents TextBox3 As System.Windows.Forms.TextBox Friend WithEvents RadioButton1 As System.Windows.Forms.RadioButton Friend WithEvents RadioButton2 As System.Windows.Forms.RadioButton Friend WithEvents RadioButton3 As System.Windows.Forms.RadioButton Friend WithEvents GroupBox3 As System.Windows.Forms.GroupBox Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox Friend WithEvents ComboBox2 As System.Windows.Forms.ComboBox Friend WithEvents GroupBox4 As System.Windows.Forms.GroupBox Friend WithEvents ListBox1 As System.Windows.Forms.ListBox Friend WithEvents Button1 As System.Windows.Forms.Button Friend WithEvents Button2 As System.Windows.Forms.Button Friend WithEvents Button3 As System.Windows.Forms.Button Friend WithEvents Button4 As System.Windows.Forms.Button Friend WithEvents Button5 As System.Windows.Forms.Button Friend WithEvents CheckBox1 As System.Windows.Forms.CheckBox Friend WithEvents GroupBox5 As System.Windows.Forms.GroupBox Friend WithEvents RadioButton4 As System.Windows.Forms.RadioButton Friend WithEvents RadioButton5 As System.Windows.Forms.RadioButton Friend WithEvents GroupBox6 As System.Windows.Forms.GroupBox Friend WithEvents ComboBox3 As System.Windows.Forms.ComboBox Friend WithEvents Button6 As System.Windows.Forms.Button Friend WithEvents PrintDialog1 As System.Windows.Forms.PrintDialog Friend WithEvents PrintDocument1 As System.Drawing.Printing.PrintDocument Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem Private Sub InitializeComponent() Me.GroupBox1 = New System.Windows.Forms.GroupBox Me.TextBox3 = New System.Windows.Forms.TextBox Me.TextBox2 = New System.Windows.Forms.TextBox Me.TextBox1 = New System.Windows.Forms.TextBox Me.Label3 = New System.Windows.Forms.Label Me.Label2 = New System.Windows.Forms.Label Me.Label1 = New System.Windows.Forms.Label Me.GroupBox2 = New System.Windows.Forms.GroupBox Me.RadioButton3 = New System.Windows.Forms.RadioButton Me.RadioButton2 = New System.Windows.Forms.RadioButton Me.RadioButton1 = New System.Windows.Forms.RadioButton Me.GroupBox3 = New System.Windows.Forms.GroupBox Me.ComboBox2 = New System.Windows.Forms.ComboBox Me.ComboBox1 = New System.Windows.Forms.ComboBox Me.GroupBox4 = New System.Windows.Forms.GroupBox Me.ListBox1 = New System.Windows.Forms.ListBox Me.Button1 = New System.Windows.Forms.Button Me.Button2 = New System.Windows.Forms.Button Me.Button3 = New System.Windows.Forms.Button Me.Button4 = New System.Windows.Forms.Button Me.Button5 = New System.Windows.Forms.Button Me.CheckBox1 = New System.Windows.Forms.CheckBox Me.GroupBox5 = New System.Windows.Forms.GroupBox Me.RadioButton5 = New System.Windows.Forms.RadioButton Me.RadioButton4 = New System.Windows.Forms.RadioButton Me.GroupBox6 = New System.Windows.Forms.GroupBox Me.ComboBox3 = New System.Windows.Forms.ComboBox Me.Button6 = New System.Windows.Forms.Button Me.PrintDialog1 = New System.Windows.Forms.PrintDialog Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument Me.MainMenu1 = New System.Windows.Forms.MainMenu Me.MenuItem1 = New System.Windows.Forms.MenuItem Me.MenuItem2 = New System.Windows.Forms.MenuItem Me.MenuItem3 = New System.Windows.Forms.MenuItem Me.MenuItem4 = New System.Windows.Forms.MenuItem Me.MenuItem5 = New System.Windows.Forms.MenuItem Me.MenuItem6 = New System.Windows.Forms.MenuItem Me.GroupBox1.SuspendLayout() Me.GroupBox2.SuspendLayout() Me.GroupBox3.SuspendLayout() Me.GroupBox4.SuspendLayout() Me.GroupBox5.SuspendLayout() Me.GroupBox6.SuspendLayout() Me.SuspendLayout() ' 'GroupBox1 ' Me.GroupBox1.Controls.Add(Me.TextBox3) Me.GroupBox1.Controls.Add(Me.TextBox2) Me.GroupBox1.Controls.Add(Me.TextBox1) Me.GroupBox1.Controls.Add(Me.Label3) Me.GroupBox1.Controls.Add(Me.Label2) Me.GroupBox1.Controls.Add(Me.Label1) Me.GroupBox1.Controls.Add(Me.GroupBox2) Me.GroupBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.GroupBox1.Location = New System.Drawing.Point(0, 8) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(408, 184) Me.GroupBox1.TabIndex = 0 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Customer Information" ' 'TextBox3 ' Me.TextBox3.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox3.Location = New System.Drawing.Point(176, 96) Me.TextBox3.Name = "TextBox3" Me.TextBox3.Size = New System.Drawing.Size(224, 23) Me.TextBox3.TabIndex = 6 Me.TextBox3.Text = "" ' 'TextBox2 ' Me.TextBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox2.Location = New System.Drawing.Point(176, 64) Me.TextBox2.Name = "TextBox2" Me.TextBox2.Size = New System.Drawing.Size(224, 23) Me.TextBox2.TabIndex = 5 Me.TextBox2.Text = "" ' 'TextBox1 ' Me.TextBox1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.TextBox1.Location = New System.Drawing.Point(176, 32) Me.TextBox1.Name = "TextBox1" Me.TextBox1.Size = New System.Drawing.Size(224, 23) Me.TextBox1.TabIndex = 4 Me.TextBox1.Text = "" ' 'Label3 ' Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label3.Location = New System.Drawing.Point(24, 96) Me.Label3.Name = "Label3" Me.Label3.Size = New System.Drawing.Size(144, 23) Me.Label3.TabIndex = 3 Me.Label3.Text = "Customer Phone" ' 'Label2 ' Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label2.Location = New System.Drawing.Point(24, 64) Me.Label2.Name = "Label2" Me.Label2.Size = New System.Drawing.Size(144, 23) Me.Label2.TabIndex = 2 Me.Label2.Text = "Customer Address" ' 'Label1 ' Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Label1.Location = New System.Drawing.Point(24, 32) Me.Label1.Name = "Label1" Me.Label1.Size = New System.Drawing.Size(144, 23) Me.Label1.TabIndex = 1 Me.Label1.Text = "Customer Name" ' 'GroupBox2 ' Me.GroupBox2.Controls.Add(Me.RadioButton3) Me.GroupBox2.Controls.Add(Me.RadioButton2) Me.GroupBox2.Controls.Add(Me.RadioButton1) Me.GroupBox2.Location = New System.Drawing.Point(8, 120) Me.GroupBox2.Name = "GroupBox2" Me.GroupBox2.Size = New System.Drawing.Size(392, 56) Me.GroupBox2.TabIndex = 0 Me.GroupBox2.TabStop = False Me.GroupBox2.Text = "Payment Options" ' 'RadioButton3 ' Me.RadioButton3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.RadioButton3.Location = New System.Drawing.Point(272, 24) Me.RadioButton3.Name = "RadioButton3" Me.RadioButton3.TabIndex = 2 Me.RadioButton3.Text = "Payment Due" ' 'RadioButton2 ' Me.RadioButton2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.RadioButton2.Location = New System.Drawing.Point(136, 24) Me.RadioButton2.Name = "RadioButton2" Me.RadioButton2.TabIndex = 1 Me.RadioButton2.Text = "Partial Payment" ' 'RadioButton1 ' Me.RadioButton1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.RadioButton1.Location = New System.Drawing.Point(24, 24) Me.RadioButton1.Name = "RadioButton1" Me.RadioButton1.TabIndex = 0 Me.RadioButton1.Text = "Paid In Full" ' 'GroupBox3 ' Me.GroupBox3.Controls.Add(Me.ComboBox2) Me.GroupBox3.Controls.Add(Me.ComboBox1) Me.GroupBox3.Location = New System.Drawing.Point(8, 296) Me.GroupBox3.Name = "GroupBox3" Me.GroupBox3.RightToLeft = System.Windows.Forms.RightToLeft.No Me.GroupBox3.Size = New System.Drawing.Size(408, 48) Me.GroupBox3.TabIndex = 1 Me.GroupBox3.TabStop = False Me.GroupBox3.Text = "Plane Seating " ' 'ComboBox2 ' Me.ComboBox2.Items.AddRange(New Object() {"Row 2", "Seat 1:*", "Seat 2:*", "Seat 3:*", "Seat 4:*", "Seat 5:*", "Seat 6:*"}) Me.ComboBox2.Location = New System.Drawing.Point(216, 16) Me.ComboBox2.Name = "ComboBox2" Me.ComboBox2.Size = New System.Drawing.Size(184, 21) Me.ComboBox2.TabIndex = 1 Me.ComboBox2.Text = "Row 2" ' 'ComboBox1 ' Me.ComboBox1.Items.AddRange(New Object() {"Row 1", "Seat 1:*", "Seat 2:*", "Seat 3:*", "Seat 4:*", "Seat 5:*", "Seat 6:*"}) Me.ComboBox1.Location = New System.Drawing.Point(16, 16) Me.ComboBox1.Name = "ComboBox1" Me.ComboBox1.Size = New System.Drawing.Size(192, 21) Me.ComboBox1.TabIndex = 0 Me.ComboBox1.Text = "Row 1" ' 'GroupBox4 ' Me.GroupBox4.Controls.Add(Me.ListBox1) Me.GroupBox4.Location = New System.Drawing.Point(8, 344) Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Size = New System.Drawing.Size(200, 136) Me.GroupBox4.TabIndex = 2 Me.GroupBox4.TabStop = False Me.GroupBox4.Text = "Information Display" ' 'ListBox1 ' Me.ListBox1.Location = New System.Drawing.Point(8, 16) Me.ListBox1.Name = "ListBox1" Me.ListBox1.Size = New System.Drawing.Size(184, 108) Me.ListBox1.TabIndex = 0 ' 'Button1 ' Me.Button1.Location = New System.Drawing.Point(320, 352) Me.Button1.Name = "Button1" Me.Button1.Size = New System.Drawing.Size(88, 24) Me.Button1.TabIndex = 3 Me.Button1.Text = "Assign" ' 'Button2 ' Me.Button2.Location = New System.Drawing.Point(320, 376) Me.Button2.Name = "Button2" Me.Button2.Size = New System.Drawing.Size(88, 24) Me.Button2.TabIndex = 4 Me.Button2.Text = "Display" ' 'Button3 ' Me.Button3.Location = New System.Drawing.Point(320, 424) Me.Button3.Name = "Button3" Me.Button3.Size = New System.Drawing.Size(88, 23) Me.Button3.TabIndex = 5 Me.Button3.Text = "Clear" ' 'Button4 ' Me.Button4.Location = New System.Drawing.Point(320, 448) Me.Button4.Name = "Button4" Me.Button4.Size = New System.Drawing.Size(88, 23) Me.Button4.TabIndex = 6 Me.Button4.Text = "Quit" ' 'Button5 ' Me.Button5.Location = New System.Drawing.Point(320, 400) Me.Button5.Name = "Button5" Me.Button5.Size = New System.Drawing.Size(88, 23) Me.Button5.TabIndex = 7 Me.Button5.Text = "Delete" ' 'CheckBox1 ' Me.CheckBox1.Location = New System.Drawing.Point(208, 352) Me.CheckBox1.Name = "CheckBox1" Me.CheckBox1.TabIndex = 8 Me.CheckBox1.Text = "Payment Due" ' 'GroupBox5 ' Me.GroupBox5.Controls.Add(Me.RadioButton5) Me.GroupBox5.Controls.Add(Me.RadioButton4) Me.GroupBox5.Location = New System.Drawing.Point(8, 200) Me.GroupBox5.Name = "GroupBox5" Me.GroupBox5.Size = New System.Drawing.Size(392, 48) Me.GroupBox5.TabIndex = 9 Me.GroupBox5.TabStop = False Me.GroupBox5.Text = "Display Options" ' 'RadioButton5 ' Me.RadioButton5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.RadioButton5.Location = New System.Drawing.Point(200, 16) Me.RadioButton5.Name = "RadioButton5" Me.RadioButton5.Size = New System.Drawing.Size(184, 24) Me.RadioButton5.TabIndex = 1 Me.RadioButton5.Text = "Passenger List by Seat Number" ' 'RadioButton4 ' Me.RadioButton4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.RadioButton4.Location = New System.Drawing.Point(16, 16) Me.RadioButton4.Name = "RadioButton4" Me.RadioButton4.Size = New System.Drawing.Size(176, 24) Me.RadioButton4.TabIndex = 0 Me.RadioButton4.Text = "Sorted Passenger List" ' 'GroupBox6 ' Me.GroupBox6.Controls.Add(Me.ComboBox3) Me.GroupBox6.Location = New System.Drawing.Point(64, 248) Me.GroupBox6.Name = "GroupBox6" Me.GroupBox6.Size = New System.Drawing.Size(264, 48) Me.GroupBox6.TabIndex = 10 Me.GroupBox6.TabStop = False Me.GroupBox6.Text = "Waitlist" ' 'ComboBox3 ' Me.ComboBox3.Location = New System.Drawing.Point(24, 16) Me.ComboBox3.Name = "ComboBox3" Me.ComboBox3.Size = New System.Drawing.Size(192, 21) Me.ComboBox3.TabIndex = 0 Me.ComboBox3.Text = "Waitlist" ' 'Button6 ' Me.Button6.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) Me.Button6.Location = New System.Drawing.Point(224, 424) Me.Button6.Name = "Button6" Me.Button6.Size = New System.Drawing.Size(72, 48) Me.Button6.TabIndex = 11 Me.Button6.Text = "Print" ' 'PrintDialog1 ' Me.PrintDialog1.AllowSomePages = True ' 'MainMenu1 ' Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem4}) ' 'MenuItem1 ' Me.MenuItem1.Index = 0 Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2, Me.MenuItem3}) Me.MenuItem1.Text = "File " ' 'MenuItem2 ' Me.MenuItem2.Index = 0 Me.MenuItem2.Text = "Load" ' 'MenuItem3 ' Me.MenuItem3.Index = 1 Me.MenuItem3.Text = "Exit" ' 'MenuItem4 ' Me.MenuItem4.Index = 1 Me.MenuItem4.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem5, Me.MenuItem6}) Me.MenuItem4.Text = "Help" ' 'MenuItem5 ' Me.MenuItem5.Index = 0 Me.MenuItem5.Text = "Help " ' 'MenuItem6 ' Me.MenuItem6.Index = 1 Me.MenuItem6.Text = "About" ' 'Form1 ' Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13) Me.ClientSize = New System.Drawing.Size(424, 485) Me.Controls.Add(Me.Button6) Me.Controls.Add(Me.GroupBox5) Me.Controls.Add(Me.CheckBox1) Me.Controls.Add(Me.Button5) Me.Controls.Add(Me.Button4) Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button2) Me.Controls.Add(Me.Button1) Me.Controls.Add(Me.GroupBox4) Me.Controls.Add(Me.GroupBox3) Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.GroupBox6) Me.Menu = Me.MainMenu1 Me.Name = "Form1" Me.Text = "TWA Airline Company" Me.GroupBox1.ResumeLayout(False) Me.GroupBox2.ResumeLayout(False) Me.GroupBox3.ResumeLayout(False) Me.GroupBox4.ResumeLayout(False) Me.GroupBox5.ResumeLayout(False) Me.GroupBox6.ResumeLayout(False) Me.ResumeLayout(False) End Sub #End Region Structure passenger Public name As String Public address As String Public phone As String Public payment As String End Structure Dim row1(6) As passenger Dim row2(6) As passenger Dim temp(13) As passenger Dim wait_list() As passenger Dim wait_count As Integer = -1 Dim upper_wait As Integer = -1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim hold As Integer Dim payed As String = " " checker(payed) If payed = " " Then Exit Sub End If If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex > 0 Then hold = ComboBox2.SelectedIndex If ComboBox2.Text = "Seat " & (hold) & ":*" Then box2_add(hold, payed) Else MessageBox.Show("Seat is already Filled", "Invalid Selection") Exit Sub End If Else If ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex > 0 Then hold = ComboBox1.SelectedIndex If ComboBox1.Text = "Seat " & (hold) & ":*" Then box1_add(hold, payed) Else MessageBox.Show("Seat is already Filled", "Invalid Selection") Exit Sub End If Else If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex = 0 Then next_seat() Else MessageBox.Show("Please Select only One Seat", "Bad Information") Exit Sub End If End If End If End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim hold As Integer Dim payment2 As String Dim payment1 As String Dim variable1 As Integer If CheckBox1.Checked = True Then 'Display all Passengers owing money Dim x As Integer ListBox1.Items.Clear() ListBox1.Items.Add(" Unsettled Payments") For x = 1 To 6 Step 1 If row1(x).payment = "Paid in Full" Or row1(x).payment = "" Then Else ListBox1.Items.Add(row1(x).name & " owes TWA") End If Next For x = 1 To 6 Step 1 If row2(x).payment = "Paid in Full" Or row2(x).payment = "" Then Else ListBox1.Items.Add(row2(x).name & " owes TWA") End If Next CheckBox1.Checked = False Exit Sub End If If RadioButton4.Checked = True Then sort() Exit Sub End If If RadioButton5.Checked = True Then ListBox1.Items.Clear() ListBox1.Items.Add(" Row 1") For variable1 = 1 To 6 Step 1 If row1(variable1).name = "" Then Else ListBox1.Items.Add(row1(variable1).name & " is in seat " & variable1) End If Next ListBox1.Items.Add(" Row 2") For variable1 = 1 To 6 Step 1 If row2(variable1).name = "" Then Else ListBox1.Items.Add(row2(variable1).name & " is in seat " & variable1) End If Next Exit Sub End If If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex > 0 Then hold = ComboBox2.SelectedIndex ListBox1.Items.Clear() ListBox1.Items.Add("Name :" & row2(hold).name) ListBox1.Items.Add("Address :" & row2(hold).address) ListBox1.Items.Add("Phone :" & row2(hold).phone) ListBox1.Items.Add("Payment Status:" & row2(hold).payment) ComboBox2.Text = "Row 2" Else If ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex > 0 Then hold = ComboBox1.SelectedIndex ListBox1.Items.Clear() ListBox1.Items.Add("Name :" & row1(hold).name) ListBox1.Items.Add("Address :" & row1(hold).address) ListBox1.Items.Add("Phone :" & row1(hold).phone) ListBox1.Items.Add("Payment Status:" & row1(hold).payment) ComboBox1.Text = "Row 1" Else MessageBox.Show("Please select only one row", "Bad User Bad NO Biscuit") End If End If End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 'reset all fields TextBox1.Clear() TextBox2.Clear() TextBox3.Clear() ListBox1.Items.Clear() ComboBox1.Text = "Row 1" ComboBox2.Text = "Row 2" RadioButton1.Checked = False RadioButton2.Checked = False RadioButton3.Checked = False RadioButton4.Checked = False RadioButton5.Checked = False CheckBox1.Checked = False End Sub Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click 'quit Me.Close() End Sub Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Dim hold As Integer Dim name As String If ComboBox1.SelectedIndex = 0 And ComboBox2.SelectedIndex > 0 Then hold = ComboBox2.SelectedIndex box2_remove(hold) row2_wait_add(hold) Else If ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex > 0 Then hold = ComboBox1.SelectedIndex box1_remove(hold) row1_wait_add(hold) Else If ComboBox2.SelectedIndex = 0 And ComboBox1.SelectedIndex = 0 Then name = InputBox("Please enter passenger to be removed", "Passenger Deletion") For hold = 1 To 6 Step 1 If row1(hold).name = name Then box1_remove(hold) row1_wait_add(hold) Exit Sub End If Next For hold = 1 To 6 Step 1 If row2(hold).name = name Then box2_remove(hold) row2_wait_add(hold) Exit Sub End If Next MessageBox.Show("Passenger name not found", "Invalid Name") End If End If End If End Sub Sub checker(ByRef payed As String) 'verify values coming in and assign payment value Dim verify As String Try verify = CStr(TextBox1.Text) verify = CStr(TextBox2.Text) verify = CStr(TextBox3.Text) Catch ex As Exception MessageBox.Show("Please Enter Information", "Invalid Information") Exit Sub End Try paystate(payed) End Sub Sub paystate(ByRef payed As String) If RadioButton1.Checked = True Then payed = "Paid in Full" Else If RadioButton2.Checked = True Then payed = "Partial Payment" Else If RadioButton3.Checked = True Then payed = "Payment Due" Else MessageBox.Show("Please select payment", "Information Missing") Exit Sub End If End If End If End Sub Sub next_seat() Dim value As Integer Dim hold As Integer Dim payed As String = " " Dim variable As String If payed = "" Then Exit Sub End If value = MessageBox.Show("Select the next available Seat?", "Next Seat", MessageBoxButtons.YesNo) If value = DialogResult.Yes Then For hold = 1 To 6 Step 1 If row1(hold).name = "" Then paystate(payed) box1_add(hold, payed) Exit Sub End If Next For hold = 1 To 6 Step 1 If row2(hold).name = "" Then paystate(payed) box2_add(hold, payed) Exit Sub End If Next variable = MessageBox.Show("No available seats. Would you like to be placed on a waitlist?", "Plane is Filled", MessageBoxButtons.YesNo) If variable = DialogResult.Yes Then wait() Else End If End If End Sub Sub box1_add(ByVal hold As Integer, ByVal payed As String) row1(hold).name = TextBox1.Text row1(hold).address = TextBox2.Text row1(hold).phone = TextBox3.Text row1(hold).payment = payed ComboBox1.Items.RemoveAt(hold) ComboBox1.Items.Insert(hold, "Seat " & (hold) & ": " & TextBox1.Text) ComboBox1.Text = "Row 1" End Sub Sub box2_add(ByVal hold As Integer, ByVal payed As String) row2(hold).name = TextBox1.Text row2(hold).address = TextBox2.Text row2(hold).phone = TextBox3.Text row2(hold).payment = payed ComboBox2.Items.RemoveAt(hold) ComboBox2.Items.Insert(hold, "Seat " & (hold) & ": " & TextBox1.Text) ComboBox2.Text = "Row 2" End Sub Sub box1_remove(ByVal hold As Integer) ComboBox1.Items.RemoveAt(hold) ComboBox1.Items.Insert(hold, "Seat " & hold & ":*") ComboBox1.Text = "Row 1" row1(hold).name = "" row1(hold).address = "" row1(hold).phone = "" row1(hold).payment = "" End Sub Sub box2_remove(ByVal hold As Integer) ComboBox2.Items.RemoveAt(hold) ComboBox2.Items.Insert(hold, "Seat " & hold & ":*") ComboBox2.Text = "Row 1" row2(hold).name = "" row2(hold).address = "" row2(hold).phone = "" row2(hold).payment = "" End Sub Sub sort() Dim variable1 As Integer Dim variable2 As Integer Dim upper As Integer = 12 Dim hold As passenger For variable1 = 0 To 6 Step 1 temp(variable1) = row1(variable1) Next For variable1 = 0 To 6 Step 1 temp(variable1 + 7) = row2(variable1) Next For variable1 = 0 To 12 Step 1 For variable2 = 0 To 12 Step 1 If temp(variable2).name > temp(variable2 + 1).name Then hold = temp(variable2) temp(variable2) = temp(variable2 + 1) temp(variable2 + 1) = hold End If Next Next ListBox1.Items.Clear() For variable1 = 0 To 13 Step 1 If temp(variable1).name = "" Then Else ListBox1.Items.Add(temp(variable1).name & " is seated on the plane") End If Next End Sub Sub wait() Dim payed As String = " " checker(payed) If payed = " " Then Exit Sub End If wait_count = wait_count + 1 upper_wait = wait_count ReDim Preserve wait_list(wait_count) wait_list(wait_count).name = TextBox1.Text wait_list(wait_count).address = TextBox2.Text wait_list(wait_count).phone = TextBox3.Text wait_list(wait_count).payment = payed ComboBox3.Items.Add(TextBox1.Text) End Sub Sub row1_wait_add(ByVal hold As Integer) If wait_count = -1 Then Exit Sub End If row1(hold).name = wait_list(0).name row1(hold).address = wait_list(0).address row1(hold).phone = wait_list(0).phone row1(hold).payment = wait_list(0).payment ComboBox1.Items.RemoveAt(hold) ComboBox1.Items.Insert(hold, "Seat " & (hold) & ": " & wait_list(0).name) ComboBox1.Text = "Row 1" wait_list_update() End Sub Sub row2_wait_add(ByVal hold As Integer) If wait_count = -1 Then Exit Sub End If row2(hold).name = wait_list(0).name row2(hold).address = wait_list(0).address row2(hold).phone = wait_list(0).phone row2(hold).payment = wait_list(0).payment ComboBox2.Items.RemoveAt(hold) ComboBox2.Items.Insert(hold, "Seat " & (hold) & ": " & wait_list(0).name) ComboBox2.Text = "Row 2" wait_list_update() End Sub Sub wait_list_update() Dim x As Integer = 0 Do While x < upper_wait wait_list(x) = wait_list(x + 1) x += 1 Loop ReDim Preserve wait_list(upper_wait - 1) wait_count -= 1 upper_wait -= 1 ComboBox3.Items.RemoveAt(0) ComboBox3.Text = "WaitList" End Sub Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click printdialog1.document = printdocument1 PrintDialog1.AllowSomePages = True If PrintDialog1.ShowDialog = DialogResult.OK Then printdocument1.printersettings = PrintDialog1.PrinterSettings printdocument1.print() End If End Sub Private Sub printdocument1_print(ByVal sender As Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles printdocument1.printpage Dim s As String Dim printfont = New Font("Times New Roman", 12, FontStyle.Regular) Dim leftmargin As Single = e.MarginBounds.Left Dim topmargin As Single = e.MarginBounds.Top Dim ypos As Integer = 0 Dim x As Integer = 0 Dim linesperpage As Integer = 0 ypos = 48 linesperpage = ListBox1.Items.Count Do While x < linesperpage s = ListBox1.Items(x) e.Graphics.DrawString(s, printfont, Brushes.Black, leftmargin, ypos, New StringFormat) x = x + 1 ypos += 24 Loop End Sub Private Sub MenuItem3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem3.Click Me.Close() End Sub Private Sub MenuItem5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem5.Click MessageBox.Show("If you want help your on your own") End Sub Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click MessageBox.Show("This Function is Currently Unsupported") End Sub