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 MainMenu1 As System.Windows.Forms.MainMenu
    Friend WithEvents mnufile As System.Windows.Forms.MenuItem
    Friend WithEvents mnuquit As System.Windows.Forms.MenuItem
    Friend WithEvents mnuedit As System.Windows.Forms.MenuItem
    Friend WithEvents mnufind As System.Windows.Forms.MenuItem
    Friend WithEvents mnuadd As System.Windows.Forms.MenuItem
    Friend WithEvents mnudelete As System.Windows.Forms.MenuItem
    Friend WithEvents lbluniversity As System.Windows.Forms.Label
    Friend WithEvents cmdfirst As System.Windows.Forms.Button
    Friend WithEvents cmdnext As System.Windows.Forms.Button
    Friend WithEvents cmdprevious As System.Windows.Forms.Button
    Friend WithEvents cmdlast As System.Windows.Forms.Button
    Friend WithEvents lbltitle As System.Windows.Forms.Label
    Friend WithEvents lblinstructor As System.Windows.Forms.Label
    Friend WithEvents lbldepartment As System.Windows.Forms.Label
    Friend WithEvents lbldays As System.Windows.Forms.Label
    Friend WithEvents txttitle As System.Windows.Forms.TextBox
    Friend WithEvents txtinstructor As System.Windows.Forms.TextBox
    Friend WithEvents txtdepartment As System.Windows.Forms.TextBox
    Friend WithEvents txtdays As System.Windows.Forms.TextBox
    Friend WithEvents cmdfind As System.Windows.Forms.Button
    Friend WithEvents cmdadd As System.Windows.Forms.Button
    Friend WithEvents cmddelete As System.Windows.Forms.Button
    Friend WithEvents cmdquit As System.Windows.Forms.Button
    Friend WithEvents OleDbDataAdapter1 As System.Data.OleDb.OleDbDataAdapter
    Friend WithEvents OleDbSelectCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbInsertCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbUpdateCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbDeleteCommand1 As System.Data.OleDb.OleDbCommand
    Friend WithEvents OleDbConnection1 As System.Data.OleDb.OleDbConnection
    Friend WithEvents DataSet11 As examentomdemunter.DataSet1
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.MainMenu1 = New System.Windows.Forms.MainMenu()
        Me.mnufile = New System.Windows.Forms.MenuItem()
        Me.mnuquit = New System.Windows.Forms.MenuItem()
        Me.mnuedit = New System.Windows.Forms.MenuItem()
        Me.mnufind = New System.Windows.Forms.MenuItem()
        Me.mnuadd = New System.Windows.Forms.MenuItem()
        Me.mnudelete = New System.Windows.Forms.MenuItem()
        Me.lbluniversity = New System.Windows.Forms.Label()
        Me.cmdfirst = New System.Windows.Forms.Button()
        Me.cmdnext = New System.Windows.Forms.Button()
        Me.cmdprevious = New System.Windows.Forms.Button()
        Me.cmdlast = New System.Windows.Forms.Button()
        Me.lbltitle = New System.Windows.Forms.Label()
        Me.lblinstructor = New System.Windows.Forms.Label()
        Me.lbldepartment = New System.Windows.Forms.Label()
        Me.lbldays = New System.Windows.Forms.Label()
        Me.txttitle = New System.Windows.Forms.TextBox()
        Me.txtinstructor = New System.Windows.Forms.TextBox()
        Me.txtdepartment = New System.Windows.Forms.TextBox()
        Me.txtdays = New System.Windows.Forms.TextBox()
        Me.cmdfind = New System.Windows.Forms.Button()
        Me.cmdadd = New System.Windows.Forms.Button()
        Me.cmddelete = New System.Windows.Forms.Button()
        Me.cmdquit = New System.Windows.Forms.Button()
        Me.OleDbDataAdapter1 = New System.Data.OleDb.OleDbDataAdapter()
        Me.OleDbDeleteCommand1 = New System.Data.OleDb.OleDbCommand()
        Me.OleDbConnection1 = New System.Data.OleDb.OleDbConnection()
        Me.OleDbInsertCommand1 = New System.Data.OleDb.OleDbCommand()
        Me.OleDbSelectCommand1 = New System.Data.OleDb.OleDbCommand()
        Me.OleDbUpdateCommand1 = New System.Data.OleDb.OleDbCommand()
        Me.DataSet11 = New examentomdemunter.DataSet1()
        CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'MainMenu1
        '
        Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnufile, Me.mnuedit})
        '
        'mnufile
        '
        Me.mnufile.Index = 0
        Me.mnufile.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnuquit})
        Me.mnufile.Text = "File"
        '
        'mnuquit
        '
        Me.mnuquit.Index = 0
        Me.mnuquit.Text = "Quit"
        '
        'mnuedit
        '
        Me.mnuedit.Index = 1
        Me.mnuedit.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.mnufind, Me.mnuadd, Me.mnudelete})
        Me.mnuedit.Text = "Edit"
        '
        'mnufind
        '
        Me.mnufind.Index = 0
        Me.mnufind.Text = "Find"
        '
        'mnuadd
        '
        Me.mnuadd.Index = 1
        Me.mnuadd.Text = "Add"
        '
        'mnudelete
        '
        Me.mnudelete.Index = 2
        Me.mnudelete.Text = "Delete"
        '
        'lbluniversity
        '
        Me.lbluniversity.Font = New System.Drawing.Font("Times New Roman", 27.75!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbluniversity.Location = New System.Drawing.Point(16, 24)
        Me.lbluniversity.Name = "lbluniversity"
        Me.lbluniversity.Size = New System.Drawing.Size(368, 48)
        Me.lbluniversity.TabIndex = 0
        Me.lbluniversity.Text = "University Course List"
        '
        'cmdfirst
        '
        Me.cmdfirst.Location = New System.Drawing.Point(32, 80)
        Me.cmdfirst.Name = "cmdfirst"
        Me.cmdfirst.TabIndex = 1
        Me.cmdfirst.Text = "First"
        '
        'cmdnext
        '
        Me.cmdnext.Location = New System.Drawing.Point(128, 80)
        Me.cmdnext.Name = "cmdnext"
        Me.cmdnext.TabIndex = 2
        Me.cmdnext.Text = "Next"
        '
        'cmdprevious
        '
        Me.cmdprevious.Location = New System.Drawing.Point(224, 80)
        Me.cmdprevious.Name = "cmdprevious"
        Me.cmdprevious.TabIndex = 3
        Me.cmdprevious.Text = "Previous"
        '
        'cmdlast
        '
        Me.cmdlast.Location = New System.Drawing.Point(320, 80)
        Me.cmdlast.Name = "cmdlast"
        Me.cmdlast.TabIndex = 4
        Me.cmdlast.Text = "Last"
        '
        'lbltitle
        '
        Me.lbltitle.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbltitle.Location = New System.Drawing.Point(32, 136)
        Me.lbltitle.Name = "lbltitle"
        Me.lbltitle.TabIndex = 5
        Me.lbltitle.Text = "Class title"
        '
        'lblinstructor
        '
        Me.lblinstructor.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lblinstructor.Location = New System.Drawing.Point(32, 176)
        Me.lblinstructor.Name = "lblinstructor"
        Me.lblinstructor.TabIndex = 6
        Me.lblinstructor.Text = "Instructor"
        '
        'lbldepartment
        '
        Me.lbldepartment.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbldepartment.Location = New System.Drawing.Point(32, 216)
        Me.lbldepartment.Name = "lbldepartment"
        Me.lbldepartment.TabIndex = 7
        Me.lbldepartment.Text = "Department"
        '
        'lbldays
        '
        Me.lbldays.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.lbldays.Location = New System.Drawing.Point(32, 256)
        Me.lbldays.Name = "lbldays"
        Me.lbldays.TabIndex = 8
        Me.lbldays.Text = "Days/Times"
        '
        'txttitle
        '
        Me.txttitle.Location = New System.Drawing.Point(160, 136)
        Me.txttitle.Name = "txttitle"
        Me.txttitle.Size = New System.Drawing.Size(152, 20)
        Me.txttitle.TabIndex = 9
        Me.txttitle.Text = ""
        '
        'txtinstructor
        '
        Me.txtinstructor.Location = New System.Drawing.Point(160, 176)
        Me.txtinstructor.Name = "txtinstructor"
        Me.txtinstructor.Size = New System.Drawing.Size(152, 20)
        Me.txtinstructor.TabIndex = 10
        Me.txtinstructor.Text = ""
        '
        'txtdepartment
        '
        Me.txtdepartment.Location = New System.Drawing.Point(160, 216)
        Me.txtdepartment.Name = "txtdepartment"
        Me.txtdepartment.Size = New System.Drawing.Size(152, 20)
        Me.txtdepartment.TabIndex = 11
        Me.txtdepartment.Text = ""
        '
        'txtdays
        '
        Me.txtdays.Location = New System.Drawing.Point(160, 256)
        Me.txtdays.Name = "txtdays"
        Me.txtdays.Size = New System.Drawing.Size(152, 20)
        Me.txtdays.TabIndex = 12
        Me.txtdays.Text = ""
        '
        'cmdfind
        '
        Me.cmdfind.Location = New System.Drawing.Point(40, 312)
        Me.cmdfind.Name = "cmdfind"
        Me.cmdfind.TabIndex = 13
        Me.cmdfind.Text = "Find"
        '
        'cmdadd
        '
        Me.cmdadd.Location = New System.Drawing.Point(133, 312)
        Me.cmdadd.Name = "cmdadd"
        Me.cmdadd.TabIndex = 14
        Me.cmdadd.Text = "Add"
        '
        'cmddelete
        '
        Me.cmddelete.Location = New System.Drawing.Point(232, 312)
        Me.cmddelete.Name = "cmddelete"
        Me.cmddelete.TabIndex = 15
        Me.cmddelete.Text = "Delete"
        '
        'cmdquit
        '
        Me.cmdquit.Location = New System.Drawing.Point(328, 312)
        Me.cmdquit.Name = "cmdquit"
        Me.cmdquit.TabIndex = 16
        Me.cmdquit.Text = "Quit"
        '
        'OleDbDataAdapter1
        '
        Me.OleDbDataAdapter1.DeleteCommand = Me.OleDbDeleteCommand1
        Me.OleDbDataAdapter1.InsertCommand = Me.OleDbInsertCommand1
        Me.OleDbDataAdapter1.SelectCommand = Me.OleDbSelectCommand1
        Me.OleDbDataAdapter1.TableMappings.AddRange(New System.Data.Common.DataTableMapping() {New System.Data.Common.DataTableMapping("Table", "Classes", New System.Data.Common.DataColumnMapping() {New System.Data.Common.DataColumnMapping("ClassName", "ClassName"), New System.Data.Common.DataColumnMapping("Prof", "Prof"), New System.Data.Common.DataColumnMapping("DaysAndTimes", "DaysAndTimes"), New System.Data.Common.DataColumnMapping("Department", "Department")})})
        Me.OleDbDataAdapter1.UpdateCommand = Me.OleDbUpdateCommand1
        '
        'OleDbDeleteCommand1
        '
        Me.OleDbDeleteCommand1.CommandText = "DELETE FROM Classes WHERE (ClassID = ?) AND (ClassName = ? OR ? IS NULL AND Class" & _
        "Name IS NULL) AND (DaysAndTimes = ? OR ? IS NULL AND DaysAndTimes IS NULL) AND (" & _
        "Department = ? OR ? IS NULL AND Department IS NULL) AND (Prof = ? OR ? IS NULL A" & _
        "ND Prof IS NULL)"
        Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection1
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "ClassID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassName", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ClassName", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassName1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ClassName", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_DaysAndTimes", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DaysAndTimes", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_DaysAndTimes1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DaysAndTimes", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Department", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Department", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Department1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Department", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Prof", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Prof", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbDeleteCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Prof1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Prof", System.Data.DataRowVersion.Original, Nothing))
        '
        'OleDbConnection1
        '
        Me.OleDbConnection1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=C:\Student" & _
        "s.mdb;Mode=Share Deny None;Extended Properties="""";Jet OLEDB:System database="""";J" & _
        "et OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLEDB:Engine Type=4" & _
        ";Jet OLEDB:Database Locking Mode=0;Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB" & _
        ":Global Bulk Transactions=1;Jet OLEDB:New Database Password="""";Jet OLEDB:Create " & _
        "System Database=False;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Don't Copy Loca" & _
        "le on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;Jet OLEDB:SFP" & _
        "=False"
        '
        'OleDbInsertCommand1
        '
        Me.OleDbInsertCommand1.CommandText = "INSERT INTO Classes(ClassName, Prof, DaysAndTimes, Department, ClassID) VALUES (?" & _
        ", ?, ?, ?, ?)"
        Me.OleDbInsertCommand1.Connection = Me.OleDbConnection1
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClassName", System.Data.OleDb.OleDbType.VarWChar, 50, "ClassName"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Prof", System.Data.OleDb.OleDbType.VarWChar, 50, "Prof"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("DaysAndTimes", System.Data.OleDb.OleDbType.VarWChar, 20, "DaysAndTimes"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Department", System.Data.OleDb.OleDbType.VarWChar, 50, "Department"))
        Me.OleDbInsertCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClassID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "ClassID", System.Data.DataRowVersion.Current, Nothing))
        '
        'OleDbSelectCommand1
        '
        Me.OleDbSelectCommand1.CommandText = "SELECT ClassName, Prof, DaysAndTimes, Department, ClassID FROM Classes"
        Me.OleDbSelectCommand1.Connection = Me.OleDbConnection1
        '
        'OleDbUpdateCommand1
        '
        Me.OleDbUpdateCommand1.CommandText = "UPDATE Classes SET ClassName = ?, Prof = ?, DaysAndTimes = ?, Department = ?, Cla" & _
        "ssID = ? WHERE (ClassID = ?) AND (ClassName = ? OR ? IS NULL AND ClassName IS NU" & _
        "LL) AND (DaysAndTimes = ? OR ? IS NULL AND DaysAndTimes IS NULL) AND (Department" & _
        " = ? OR ? IS NULL AND Department IS NULL) AND (Prof = ? OR ? IS NULL AND Prof IS" & _
        " NULL)"
        Me.OleDbUpdateCommand1.Connection = Me.OleDbConnection1
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClassName", System.Data.OleDb.OleDbType.VarWChar, 50, "ClassName"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Prof", System.Data.OleDb.OleDbType.VarWChar, 50, "Prof"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("DaysAndTimes", System.Data.OleDb.OleDbType.VarWChar, 20, "DaysAndTimes"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Department", System.Data.OleDb.OleDbType.VarWChar, 50, "Department"))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClassID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "ClassID", System.Data.DataRowVersion.Current, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, False, CType(10, Byte), CType(0, Byte), "ClassID", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassName", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ClassName", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_ClassName1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "ClassName", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_DaysAndTimes", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DaysAndTimes", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_DaysAndTimes1", System.Data.OleDb.OleDbType.VarWChar, 20, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "DaysAndTimes", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Department", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Department", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Department1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Department", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Prof", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Prof", System.Data.DataRowVersion.Original, Nothing))
        Me.OleDbUpdateCommand1.Parameters.Add(New System.Data.OleDb.OleDbParameter("Original_Prof1", System.Data.OleDb.OleDbType.VarWChar, 50, System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte), "Prof", System.Data.DataRowVersion.Original, Nothing))
        '
        'DataSet11
        '
        Me.DataSet11.DataSetName = "DataSet1"
        Me.DataSet11.Locale = New System.Globalization.CultureInfo("nl-NL")
        Me.DataSet11.Namespace = "http://www.tempuri.org/DataSet1.xsd"
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(440, 349)
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.cmdquit, Me.cmddelete, Me.cmdadd, Me.cmdfind, Me.txtdays, Me.txtdepartment, Me.txtinstructor, Me.txttitle, Me.lbldays, Me.lbldepartment, Me.lblinstructor, Me.lbltitle, Me.cmdlast, Me.cmdprevious, Me.cmdnext, Me.cmdfirst, Me.lbluniversity})
        Me.Menu = Me.MainMenu1
        Me.Name = "Form1"
        Me.Text = "frmtomdm"
        CType(Me.DataSet11, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Private Sub cmdnext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdnext.Click
        Me.BindingContext(DataSet11, "Classes").Position += 1
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DataSet11.Clear()
        OleDbDataAdapter1.Fill(DataSet11)
        Me.txttitle.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "Classes.ClassName"))
        Me.txtinstructor.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "Classes.Prof"))
        Me.txtdepartment.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "Classes.Department"))
        Me.txtdays.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.DataSet11, "Classes.DaysAndTimes"))

    End Sub

    Private Sub cmdfirst_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdfirst.Click
        Me.BindingContext(DataSet11, "Classes").Position = 0
    End Sub

    Private Sub cmdprevious_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdprevious.Click
        Me.BindingContext(DataSet11, "Classes").Position -= 1
    End Sub

    Private Sub cmdlast_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdlast.Click
        Me.BindingContext(DataSet11, "Classes").Position = Me.BindingContext(DataSet11, "Classes").Count - 1
    End Sub

    Private Sub cmdadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdadd.Click
        Me.BindingContext(DataSet11, "Classes").AddNew()
    End Sub

    Private Sub cmdquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdquit.Click
        Try
            If MessageBox.Show("wilt u stoppen", "sluiten", MessageBoxButtons.YesNo) = DialogResult.Yes Then
                OleDbDataAdapter1.Update(DataSet11, "Classes")
                Application.Exit()
            End If
        Catch
            MessageBox.Show("er is een fout opgetreden bij het toevoegen van de gegevens , deze zullen mischien niet gewijzigd zijn", "fout", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
    End Sub

    Private Sub cmddelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmddelete.Click
        If MessageBox.Show("wilt u een record verwijderen?", "verwijderen", MessageBoxButtons.YesNo) = DialogResult.Yes Then
            Me.BindingContext(DataSet11, "Classes").RemoveAt(Me.BindingContext(DataSet11, "Classes").Position)
        End If
    End Sub

    Private Sub mnuquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuquit.Click
        If MessageBox.Show("wilt u stoppen", "sluiten", MessageBoxButtons.YesNo) = DialogResult.Yes Then
            OleDbDataAdapter1.Update(DataSet11, "Classes")
            Application.Exit()
        End If
    End Sub

    Private Sub mnuadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuadd.Click
        Me.BindingContext(DataSet11, "Classes").AddNew()
    End Sub

    Private Sub mnudelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnudelete.Click
        If MessageBox.Show("wilt u een record verwijderen?", "verwijderen", MessageBoxButtons.YesNo) = DialogResult.Yes Then
            Me.BindingContext(DataSet11, "Classes").RemoveAt(Me.BindingContext(DataSet11, "Classes").Position)
        End If
    End Sub

    Private Sub cmdfind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdfind.Click

        Dim tezoeken As String
        tezoeken = ""
        tezoeken = InputBox("geef de titel die u wil zoeken ", "zoeken", "")
        Me.BindingContext(DataSet11, "Classes").Position = 0
        Do While tezoeken <> txttitle.Text And Me.BindingContext(DataSet11, "Classes").Position <> Me.BindingContext(DataSet11, "Classes").Count - 1
            Me.BindingContext(DataSet11, "Classes").Position += 1

        Loop
        If tezoeken <> txttitle.Text And tezoeken <> "" Then
            Me.BindingContext(DataSet11, "Classes").Position = 0
            MessageBox.Show("de gegeven zoekterm is niet gevonden", "fout", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If

        If tezoeken <> txttitle.Text And tezoeken = "" Then
            Me.BindingContext(DataSet11, "Classes").Position = 0
            MessageBox.Show("u moet iets invoeren", "fout", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End If

    End Sub


    Private Sub mnufind_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnufind.Click
        Dim tezoeken As String
        tezoeken = InputBox("geef de titel die u wil zoeken ", "zoeken", "")
        Me.BindingContext(DataSet11, "Classes").Position = 0
        Do While tezoeken <> txttitle.Text
            Me.BindingContext(DataSet11, "Classes").Position += 1

        Loop

        'tom de munter klas 2tia , 30-1-04

    End Sub
End Class
