hi,
am doing my thesis entitled Automatic Exam Scheduling System. this works when button "GENERATE" is click. that would initialize the automatic assigning of proctors and rooms to classid.....plz help...i can't filter the conflicts of proctors and rooms since it is automated...early tnx...ur response will be greatly appreciated..tnx so much:)

We're going to need a bit more information than that to help you. Have you done any code? What conflicts are you referring to? you make it sound as if it is already automated therefore done... What exactly are you trying to achieve?

Guys this is what i'm talking about. I am doing a system (project) entitled “Automatic Examination Scheduling System”. This system as it stressed in its title, aim to automate the assigning of proctors, rooms and times to subjects. So it must be triggered with only one button all at once. I have tables in my database named Subject, Professor (as proctors) and Room. I am having a trouble as of assigning a proctor to a subject. Here is what I’ve done:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click
        Dim connect As New ADODB.Connection
        Dim rs As New ADODB.Recordset
        Dim rss As New ADODB.Recordset
        connect.ConnectionString = "PROVIDER=Microsoft.JET.OLEDB.4.0;Data Source=C:\Users\Spongebob\Desktop\Database1.mdb"
        connect.Open()

        Dim sql, sql1 As String
        sql = "Select * from Class"
        rs.Open(sql, connect)
        sql1 = "Select * from Professor"
        rss.Open(sql1, connect)
        Do Until rs.EOF
            TxtbxClassID.Text = rs("ClassID").Value
            Do Until rss.EOF
                Dim prof As String
                prof = rss("ProfID").Value
                For i As Integer = 0 To DataGridExamSched.RowCount - 1
                    Dim a As Integer
                    If prof = DataGridExamSched.Rows(i).Cells(1).Value Then
                        a = a + 1
                    End If
                    If a <= 5 Then
                        TxtbxProfID.Text = prof
                        Exit Do
                    Else
                        Exit For
                    End If
                Next
                rss.Move(MakeNumRand)
            Loop
            rs.MoveNext()
            DataGridExamSched.Rows.Add(TxtbxClassID.Text, TxtbxProfID.Text)
        Loop

    End Sub

    Public Function MakeNumRand() As String

        Dim temp As String
        Dim NumRand As New Random
        temp = NumRand.Next(1, 20)
        Dim i As Integer = 0

        Return temp
    End Function

As you can see I’ve used two textboxes to hold the ClassID and the ProfID values to be saved in a datagrid named datagridexamsched. The thing is that, a certain professor must only be assigned to subjects 5 times and in a random way. Guys please help…

This article has been dead for over six months. Start a new discussion instead.