Imports System.Data.

OleDb
Public Class LoginForm
Private Sub Button2_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
btnCancel.Click
If MsgBox("Are you sure you want
to close?", MsgBoxStyle.YesNo, "Close
Window") = MsgBoxResult.Yes Then
End
End If
End Sub
Private Sub Button3_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
btnSignUp.Click
StudentInformation.Show()
AutoNo()
End Sub
Sub AutoNo()
Try
sql = "SELECT A_ReviewerID
FROM tblStudentInfo Order By
A_ReviewerID desc"
ConnectDB()
cmd = New
OleDbCommand(sql, con)

dr =
cmd.ExecuteReader(CommandBehavio
r.CloseConnection)
If dr.Read = True Then
StudentInformation.txtID.Text =
Val(dr(0)) + 1
Else
StudentInformation.txtID.Text = 10001
End If
Catch ex As Exception
MsgBox(ex.Message)
Finally
cmd.Dispose()
con.Close()
End Try
End Sub
Private Sub Login()
'Try
'sql = "SELECT * FROM
tblStudentInfo WHERE A_Usertype = '"
& cbotype.Text & "' AND A_Username
= '" & txtUser.Text & "' AND A_Pass =
'" & txtPass.Text & "'"
ConnectDB()
'cmd = New OleDbCommand(sql,
con)
'dr =
cmd.ExecuteReader(CommandBehavio
r.CloseConnection)
'If dr.Read = True Then

' If cbotype.Text = "Reviewer"
Then
'
MainForm.
' End If
' MainForm.txtid.Text =
txtUser.Text
' txtUser.Text = ""
' txtPass.Text = ""
' Me.Close()
' Else
'MsgBox("Incorrect username or
password!", MsgBoxStyle.Critical,
"Login")
'txtPass.Focus()
'End If
'Catch ex As Exception
' MsgBox(ex.Message)
' Finally
'cmd.Dispose()
'con.Close()
'End Try
Dim check As New
OleDb.OleDbDataAdapter("Select *
from tblStudentInfo WHERE
A_Usertype = '" & cbotype.Text & "'
AND A_Username = '" & txtUser.Text &
"' AND A_Pass = '" & txtPass.Text & "'",
con)
Dim d1 As New DataTable
check.Fill(d1)
If d1.Rows.Count = 1 Then
If cbotype.Text = "Reviewee"
Then
MainForm.lblReviewerID.Text
= ""
MainForm.lblReviewerID.Text
= d1.Rows(0).Item("A_ReviewerID")
MainForm.lblCourse.Text =
d1.Rows(0).Item("A_Course")
MainForm.lblSpec.Text =
d1.Rows(0).Item("A_Specialization")
End If
MainForm.txtid.Text =
txtUser.Text
txtUser.Text = ""
txtPass.Text = ""
Me.Close()
Else

MsgBox("Incorrect username
or password!", MsgBoxStyle.Critical,
"Login")
txtPass.Focus()
End If
con.Close()
End Sub
Private Sub btnSignIn_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
btnSignIn.Click
Login()
Dim check4 As New
OleDb.OleDbDataAdapter("Select *
from tblSetAssessmentNo", con)
Dim d2 As New DataTable
check4.Fill(d2)
If d2.Rows.Count = 1 Then
MainForm.lblAssNum.Text =
d2.Rows(0).Item("AssessmentNo")
End If
If cbotype.Text = "Reviewee"
Then
MainForm.mnuStudentInfo.Enabled =
False
MainForm.mnuAddQuestion.Enabled =
False
MainForm.mnuAddMajor.Enabled =
False
MainForm.AddAccountToolStripMenuIte
m.Enabled = False
MainForm.GenerateExamToolStripMen
uItem.Enabled = False
MainForm.setassessment.Enabled =
False
MainForm.AssessmentLogToolStripMen
uItem.Enabled = True
MainForm.SummaryResultToolStripMen
uItem.Enabled = False

MainForm.IndividualResultToolStripMen
uItem.Enabled = True

MainForm.IndividualResultToolStripMen
uItem.Enabled = False

MainForm.mnuTimeDurationSettings.E
nabled = False

MainForm.mnuTimeDurationSettings.E
nabled = True

ElseIf cbotype.Text = "Facilitator"

MainForm.TimePerExaminationToolStri
pMenuItem.Enabled = False

Then
MainForm.mnuStudentInfo.Enabled =
False
MainForm.mnuAddQuestion.Enabled =
False
MainForm.mnuAddMajor.Enabled =
False
MainForm.AddAccountToolStripMenuIte
m.Enabled = False
MainForm.AssessmentLogToolStripMen
uItem.Enabled = False

MainForm.TimePerQuestionToolStripMe
nuItem.Enabled = False
ElseIf cbotype.Text = "Admin"
Then
MainForm.TimePerExaminationToolStri
pMenuItem.Enabled = False
MainForm.TimePerQuestionToolStripMe
nuItem.Enabled = False
End If
End Sub
End Class

MainForm.SummaryResultToolStripMen
uItem.Enabled = True

Imports System.Data.OleDb
Public Class MainForm

Private Sub
ToolStripMenuItem3_Click(ByVal

sender As System.Object, ByVal e As
System.EventArgs) Handles
mnuStudentInfo.Click
StudentInformation.ShowDialog()
End Sub
Private Sub
ToolStripMenuItem2_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
mnuAddQuestion.Click
AddNewQuestions.ShowDialog()
End Sub
Private Sub
ToolStripMenuItem1_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
mnuAddMajor.Click
Major.ShowDialog()
End Sub
Private Sub
GenerateExamToolStripMenuItem_Clic
k(ByVal sender As System.Object,
ByVal e As System.EventArgs)
GenerateExam.ShowDialog()
End Sub
Private Sub
AssessmentLogToolStripMenuItem_Clic
k(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
AssessmentLogToolStripMenuItem.Clic
k
Assessment_Log.ShowDialog()
End Sub
Private Sub
IndividualResultToolStripMenuItem_Clic
k(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
IndividualResultToolStripMenuItem.Clic
k
IndividualResult.ShowDialog()
End Sub
Private Sub
SummaryResultToolStripMenuItem_Clic
k(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
SummaryResultToolStripMenuItem.Clic
k
SummaryResult.ShowDialog()
End Sub

Private Sub MainForm_Load(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
MyBase.Load
LoginForm.ShowDialog()
End Sub
Private Sub
AddAccountToolStripMenuItem_Click(B
yVal sender As System.Object, ByVal e
As System.EventArgs) Handles
AddAccountToolStripMenuItem.Click
AddAccount.ShowDialog()
End Sub
Private Sub
ChangeAccountToolStripMenuItem_Clic
k(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
ChangeAccountToolStripMenuItem.Clic
k
Change_Account.ShowDialog()
End Sub
Private Sub
LogOutToolStripMenuItem_Click(ByVal
sender As System.Object, ByVal e As
System.EventArgs) Handles
LogOutToolStripMenuItem.Click
If MsgBox("Are you sure you want
to log out the system?",
MsgBoxStyle.YesNo, "System Exit") =
MsgBoxResult.Yes Then
LoginForm.ShowDialog()
End If
End Sub
Private Sub
TimePerExaminationToolStripMenuItem
_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
TimePerExaminationToolStripMenuItem
.Click
frmStart1.Show()
End Sub
Private Sub
GenerateExamToolStripMenuItem_Clic
k_1(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles
GenerateExamToolStripMenuItem.Click
GenerateExam.ShowDialog()
End Sub
Private Sub
TimePerQuestionToolStripMenuItem_Cli

Object.Object. ByVal e As System.Data.Click TimeDuration.Jet.Object.Da ta Source=" & Application.ShowDialog() End Sub End Class Imports System.OleDb Public Class StudentInformation Public Strcon As String = "Provider=Microsoft.OleDbConnection(Strcon) Dim da As New OleDb.Click Me.ShowDialog() End Sub Private Sub TimePerQuestionToolStripMenuItem1_ Click(ByVal sender As System.Click Me.cbotype.Click SetAssessmentNo.ShowDialog() End Sub Private Sub TimePerExaminationToolStripMenuItem 1_Click(ByVal sender As System.EventArgs) Handles btnClose. ByVal e As System.OleDbConnection = New OleDb.Close() LoginForm.Object.Close() End Sub Private Sub Button4_Click(ByVal sender As System. ByVal e As System.EventArgs) Handles setassessment.ShowDialog() 'Form1. ByVal e As System.OLEDB.0.Cli ck frmstart2.StartupPath & "\Assessment.EventArgs) Handles TimePerQuestionToolStripMenuItem. ByVal e As System.ShowDialog() End Sub Private Sub ToolStripMenuItem1_Click_1(ByVal sender As System.mdb" Dim con As OleDb.EventArgs) Handles btnSignIn.ck(ByVal sender As System.Object.C lick TimePerQuestion.OleDbDataAdapter Dim ds As New DataSet Dim sql As String Private Sub Button3_Click(ByVal sender As System.EventArgs) Handles TimePerQuestionToolStripMenuItem1. ByVal e As System.EventArgs) Handles TimePerExaminationToolStripMenuItem 1.Object.4.Focus() End Sub .

cboSpec.Text = "Reviewee" btnAdd. ByVal e As System.Click If cboCourse. "Registration Information") End If Catch ex As Exception MsgBox(ex.Text = "Reviewee" btnAdd.Object.txtPass.EventArgs) Handles btnAdd. "Requirements") ElseIf cboCourse.txtID.Text = "BSED" Then If cboSpec.Text & "'.Visible = True txttype.Click If txtPass.Critical.Text & "')" ConnectDB() cmd = New OleDbCommand(sql. Go to Sign In".Object.Dispose() con. MsgBoxStyle.Text = "" Me. A_Course.'" & Me.EventArgs) Handles Button1.Text = "" Panel3.Text = "" Me.Text & "'.Text & "'. A_Specialization.Text = "" Me.Text = "" Me.Text = "" Then MsgBox("Please fill all the fields!".Critical.txtUserName.txtPass.Information.Text = "" Then MsgBox("Please fill all the fields!".Enabled = True End If End Sub Private Sub StudentInformation_Load(ByVal sender As System.'" & Me. A_Name.Enabled = False btnSignIn. A_Pass)VALUES('" & Me.Text Then addinfo() clear() btnAdd. MsgBoxStyle.Text & "'. con) Dim i As Integer i = cmd.Object.txttype.'" & Me.Text = "" Me.Close() End Try End Sub Private Sub Button1_Click(ByVal sender As System.txttype.txtUserName. MsgBoxStyle.txtID.Text = "" Then MsgBox("Please fill all the fields!". "Requirements") Else Panel3. MsgBoxStyle.Text = txtPassCon.Text = "" txtPassCon.Text = "" txtPass. MsgBoxStyle.Visible = True txttype. "Requirements") ElseIf txtName.Open() sql = "INSERT INTO tblStudentInfo (A_ReviewerID.'" & Me. A_Usertype. "Requirements") Else Panel3.'" & Me.Critical.Private Sub btnAdd_Click(ByVal sender As System. ByVal e As . MsgBoxStyle.txtPassCon. "Regitration Information") Else MsgBox("Failed to add registere".cboSpec.'" & _ Me. A_Username.Visible = False End Sub Private Sub addinfo() Try con.Text = "" Then MsgBox("Please fill all the fields!".Text & "'.cboCourse.ExecuteNonQuery If i > 0 Then MsgBox("You are successfully registered.Focus() End If End Sub Public Sub clear() Me. ByVal e As System.Text = "" Me.Message) Finally cmd.Text & "'.Critical.txtName.txtName.Text = "" Me.Critical.cboCourse.Enabled = True End If ElseIf txtID.Enabled = True Else MsgBox("Password didn't match!") txtPass.

DisplayMember = "Specialization" "SpecID" .Visible = True End If End Sub End Class .Fill(ds.Text = "BEED" Then Label4.Tables(0) .Message) Finally cmd.Object.Visible = True cboSpec.ExecuteReader(CommandBehavior.OleDbDataAdapter(sql.Message) End Try con.Text = Val(dr(0)) + 1 Else txtID.Open() sql = "SELECT A_ReviewerID FROM tblStudentInfo Order By A_ReviewerID desc" ConnectDB() cmd = New OleDbCommand(sql.Close() End Sub Sub AutoNo() Try con.Close() End Try End Sub Private Sub cboCourse_SelectedIndexChanged(ByVal sender As System.Visible = False cboSpec.Dispose() con.ValueMember = End With Catch ex As Exception MsgBox(ex.System.EventArgs) Handles MyBase.EventArgs) Handles cboCourse. ByVal cbo As ComboBox) Try con.Cl oseConnection) If dr. cboSpec) End Sub Public Sub cboSpecy(ByVal sql As String.Text = 10001 End If Catch ex As Exception MsgBox(ex.Text = "" cboSpec.Read = True Then txtID. con) dr = cmd.DataSource = ds. ByVal e As System.Open() da = New OleDb.SelectedIndexChanged If Me.Visible = False Else Label4. con) ds = New DataSet da. "userdb") With cbo .Load AutoNo() sql = "Select * from tblMajor" cboSpecy(sql.cboCourse.

MsgBoxStyle. con) Dim i As Integer i = cmd. '" & Me. . A_CorrectAns)VALUES('" & txtCount. A_Category. A_AnsB. "Question Information") End If Catch ex As Exception MsgBox(ex. A_AnsD.Message) Finally cmd.Close() End Try End Sub Private Sub addQuestion() Try sql = "INSERT INTO tblAddQuestion (id.Data. "Question Information") Else MsgBox("Failed to add Question". "Question Information") Else MsgBox("Failed to Delete Question". dr(3).Information.ExecuteNonQuery If i > 0 Then MsgBox("Question Deleted".Read = True dgvQuestions. '" & txtC.Message) Finally cmd. dr(1).OleDb Public Class AddNewQuestions Private Sub delrecord() Try sql = "DELETE * FROM tblAddQuestion WHERE A_QuestionID = '" & txtQuesID. con) Dim i As Integer i = cmd. A_AnsA.Cl oseConnection) dgvQuestions.Close() End Try End Sub Private Sub loadquestion() Try sql = "SELECT A_QuestionID. MsgBoxStyle. dr(2).txtQuestion.Text & _ "'.Text & "'.Information.Critical. A_AnsD.Text & "'.Dispose() con. '" & txtD. dr(6).Text & "'.Text & "'. dr(5). A_AnsC.Text & "'. "Question Information") End If Catch ex As Exception MsgBox(ex. dr(7). dr(4). A_Specialization. '" & cboSpec.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Message) Finally cmd. dr(8)) Loop Catch ex As Exception MsgBox(ex. A_Category.ExecuteNonQuery If i > 0 Then MsgBox("Question Added". A_AnsC. '" & cboCategory. A_Question. A_AnsA. A_Question. A_AnsD. con) dr = cmd.Dispose() con.Clear() Do While dr. A_AnsA. A_AnsB.ExecuteReader(CommandBehavior.Add(dr(0). '" & txtA.Rows.Rows. A_CorrectAns FROM tblAddQuestion" ConnectDB() cmd = New OleDbCommand(sql. A_AnsC. '" & cboCorrectAns. A_Question. A_Specialization. A_Specialization. MsgBoxStyle.Text & "'. A_Category.Critical. '" & txtB. MsgBoxStyle.Text & "'. A_AnsB.Imports System.Close() End Try End Sub Private Sub SearchQuestion() Try sql = "SELECT A_QuestionID.Dispose() con.Text & "')" ConnectDB() cmd = New OleDbCommand(sql.

dr(2).Cl oseConnection) If dr.cboCategory.Text = Val(dr(0)) + 1 Else txtQuesID.Object. A_Category FROM tblAddQuestion where A_Category ='" & Me. A_Specialization FROM tblAddQuestion where A_Category ='" & Me. dr(7).txtQuestion.ExecuteReader(CommandBehavior. dr(1). A_QuestionID .Close() End Try End Sub Sub AutoNo2() If cboCategory. dr(3). ByVal e As System.Read = True dgvQuestions.Rows.Text = "" End Sub Sub AutoNo() Try sql = "SELECT A_QuestionID FROM tblAddQuestion Order By A_QuestionID desc" ConnectDB() cmd = New OleDbCommand(sql. con) dr = cmd.Add(dr(0).Close() End Try End Sub Private Sub Button1_Click(ByVal sender As System.cboCorrectAns.Cl oseConnection) dgvQuestions.Text = "" Me.Text = "" Me. con) dr = cmd.Text & "' Order By id desc" ConnectDB() cmd = New OleDbCommand(sql. dr(8)) Loop Catch ex As Exception MsgBox(ex.Text = "" Me.Close() End Try Else Try sql = "SELECT id.Dispose() con.Text & "%'" ConnectDB() cmd = New OleDbCommand(sql.Message) Finally cmd.Text = "" Me.Cl oseConnection) If dr.Close() End Sub Public Sub clear() Me.Message) Finally cmd.txtB.txtA.Text & "' Order By A_QuestionID desc" ConnectDB() cmd = New OleDbCommand(sql.cboSpec.Text = Val(dr(0)) + 1 Else txtCount.cboCategory.EventArgs) Handles btnclose.A_CorrectAns FROM tblAddQuestion WHERE A_Question LIKE '" & _ txtsearch.Text = 1 End If Catch ex As Exception MsgBox(ex.Clear() Do While dr. dr(4).Text = "" Me.Read = True Then txtQuesID.txtsearch.ExecuteReader(CommandBehavior.Click Me.txtD.Text & "' and A_Specialization='" & cboSpec. dr(5).Text <> "Major" Then Try sql = "SELECT id.Dispose() con.Text = 1 End If Catch ex As Exception MsgBox(ex.Text = "" Me. A_Category.Text = "" Me.Rows.Dispose() con.txtQuesID.ExecuteReader(CommandBehavior. con) dr = cmd.Read = True Then Me.Text = "" Me.ExecuteReader(CommandBehavior.Cl oseConnection) .Text = "" Me.Message) Finally cmd.txtC.cboCategory. con) dr = cmd. dr(6).txtCount.

EventArgs) Handles MyBase.Object.Enabled = True btncancel.Text = dgvQuestions.Visible = False cboSpec.Enabled = False disabledtext() loadquestion() dgvQuestions.Val ue txtA.Object.EventArgs) SearchQuestion() End Sub Private Sub btnAdd_Click(ByVal sender As System.CurrentRow.Focus() End If End Sub Private Sub dgvQuestions_CellContentDoubleClick( ByVal sender As Object.Text = dgvQuestions.If dr.Text = dgvQuestions.DataGridViewCel lEventArgs) Handles dgvQuestions.Cells(7).Cells(2).Forms.Click If cboCategory.Val ue txtQuestion.Text = dgvQuestions.Cells(5).Val ue txtD. ByVal e As System.CurrentRow.Text = dgvQuestions.Message) Finally cmd.CurrentRow.Val ue cboCorrectAns.Enabled = False btncancel.Cells(6).Cells(1).Text = dgvQuestions.CurrentRow.Text = dgvQuestions.Windows.CellDoubleClick txtQuesID.CurrentRow.Visible = False End If End Sub Private Sub AddNewQuestions_Load(ByVal sender As System.Cells(0).Read = True Then Me.Text = 1 End If Catch ex As Exception MsgBox(ex.Visible = True Else lblSpec.CellContentDoubleClick btnupdate.Windows. ByVal e As System.Text = dgvQuestions.Val ue cboSpec.Text = dgvQuestions.Enabled = False btnupdate.Val ue txtB.Dispose() con.Close() End Try End If End Sub Private Sub cboCategory_SelectedIndexChanged(ByV al sender As System.Enabled = True End Sub Private Sub dgvQuestions_CellDoubleClick(ByVal sender As Object.CurrentRow.Cells(3).DataGridViewCel lEventArgs) Handles dgvQuestions.Text = "" Then MsgBox("select category first") Else False btnsearch.Enabled = False btnSave.Load btnSave.Enabled = False btnupdate.Enabled = True End Sub Private Sub updatequestion() Try .EventArgs) If cboCategory.EventArgs) Handles btnAdd.Enabled = btnAdd. ByVal e As System. ByVal e As System.CurrentRow.Cells(8).Enabled = True enabledtext() AutoNo() AutoNo2() txtQuestion.Val ue txtC.Object.Text = Val(dr(0)) + 1 Else txtCount.Forms.Object.Enabled = False btncancel.CurrentRow.CurrentRow.Val ue btnAdd.txtCount.Enabled = False End Sub Private Sub btnsearch_Click(ByVal sender As System.Val ue cboCategory. ByVal e As System. ByVal e As System.Cells(4).Text = "Major" Then lblSpec.Visible = True cboSpec.

Enabled = False btnAdd. A_AnsA = '" & _ txtA. A_AnsC = '" & _ txtC. A_CorrectAns = '" & _ cboCorrectAns. con) Dim i As Integer i = cmd. "Update quetion") loadquestion() Else MsgBox("Failed to Update question".Text & "'.Dispose() con.Text & "'.Click updatequestion() clear() disabledtext() btnupdate.Object.Enabled = False txtQuestion.Enabled = False txtA.Enabled = True End Sub Private Sub disabledbutton() .Enabled = False End Sub Private Sub Button3_Click(ByVal sender As System.Enabled = False txtQuesID.Message) Finally cmd.Enabled = False End Sub Private Sub disabledtext() txtsearch.Text & "'.Text & "'.ExecuteNonQuery If i > 0 Then MsgBox("Question Updated".Enabled = False 'cboSpec. A_Specialization = '" & _ cboSpec.Enabled = True txtC.Click btnAdd.Enabled = True cboSpec. MsgBoxStyle.Enabled = False clear() disabledtext() btncancel.Enabled = False txtC.Enabled = True txtB. A_AnsD = '" & _ txtD.Enabled = True cboCorrectAns. ByVal e As System.Information. ByVal e As System.Text & "'.Enabled = True txtD. "Update question") End If Catch ex As Exception MsgBox(ex.Enabled = False 'cboCategory.Text) & "" ConnectDB() cmd = New OleDbCommand(sql.Enabled = True dgvQuestions.Enabled = False btnAdd.Enabled = True cboCategory.Enabled = True btnsearch.sql = "UPDATE tblAddQuestion SET A_Question = '" & _ txtQuestion.Enabled = False txtB.EventArgs) Handles btncancel.Enabled = True btnSave.Object.Close() End Try End Sub Private Sub btnEdit_Click(ByVal sender As System.Text & "'.Enabled = True End Sub Private Sub Button2_Click_1(ByVal sender As System.Click addQuestion() loadquestion() clear() disabledtext() btnSave. A_AnsB = '" & _ txtB.Object.Enabled = True txtQuestion.EventArgs) Handles txtsearch.Object.Enabled = False txtD.TextChanged SearchQuestion() enabledtext() btnsearch.Text & "' WHERE A_QuestionID = " & Val(txtQuesID.Enabled = True End Sub Private Sub txtsearch_TextChanged(ByVal sender As System.Text & "'.EventArgs) Handles btnSave.Enabled = False btnsearch.Enabled = True btnupdate.EventArgs) Handles btnupdate.Enabled = True txtA. ByVal e As System. A_Category = '" & _ cboCategory.Enabled = False btnsearch.Information. ByVal e As System. MsgBoxStyle.Enabled = False End Sub Private Sub enabledtext() txtsearch.Enabled = False cboCorrectAns.

OleDbDataAdapter Dim ds As New DataSet Dim sql As String Private Sub Button1_Click_1(ByVal sender As System.OleDbConnection = New OleDb.Visible = cboSpec.Enabled = False btncancel.EventArgs) Handles cboCategory.4.StartupPath & "\Assessment.Text = "Major" Then lblSpec.Click txtsearch.Open() sql = "SELECT AssessmentNo FROM tblSetAssessmentNo Order By AssessmentNo desc" ConnectDB() .Enabled = False btnupdate.Visible = Else lblSpec.Data.Enabled = False btnsearch.Enabled = False btnclose.TextChanged If cboCategory.mdb" Dim con As OleDb.0.Visible = End If End Sub End Class Then Then sender True True False False ' If Button1.EventArgs) Handles Button1.Object.OLEDB.btnSave.Enabled = True End Sub Imports System.Object.Enabled = True btnAdd. ByVal e As System.EventArgs) Handles btnsearch.OleDbConnection(Strcon) Dim da As New OleDb. ByVal e As System.Jet.Focus() dgvQuestions.Text = "Set" ' Button1.Text = "Set" updateAssessmentNo() txtassessno.Text = "" 'End If End Sub Sub AutoNo() Try con.Enabled = False End Sub Private Sub btnsearch_Click_1(ByVal sender As System.Text = "Ok" 'Button1.Text = "Ok" 'AutoNo() 'ElseIf Button1. ByVal e As System.Da ta Source=" & Application.OleDb Public Class SetAssessmentNo Public Strcon As String = "Provider=Microsoft.Visible = cboSpec.Enabled = True txtsearch.Click Private Sub cboCategory_TextChanged(ByVal As Object.

Set") Else MsgBox("Failed to set Assessment Number".Close() End Sub End Class addQuestion() loadmajor() txtSpecialization.Text = "" Then MsgBox("need to insert specialization!") Else Dim i As Integer i = cmd. ByVal e As System. "Assessment No.Object. Set") End If Catch ex As Exception MsgBox(ex.Information. MsgBoxStyle.Cl oseConnection) If dr. con) dr = cmd.Object. ByVal e As System.Close() End Try End Sub Private Sub Button2_Click(ByVal sender As System.ExecuteNonQuery If i > 0 Then MsgBox("Assessment Number Set".EventArgs) Handles btnAdd.EventArgs) Handles Button2.Dispose() con.Text = "" End If End Sub Private Sub addQuestion() Try sql = "INSERT INTO tblMajor (Specialization) VALUES ('" & Me.Information. "Assessment No.Dispose() con. MsgBoxStyle.Close() End Try End Sub Private Sub updateAssessmentNo() Try con.Click If txtSpecialization.Click Me.Data.Read = True Then txtassessno.ExecuteReader(CommandBehavior.Open() sql = "UPDATE tblSetAssessmentNo SET AssessmentNo = '" & _ txtassessno. con) Imports System.Text = Val(dr(0)) + 1 Else txtassessno.txtSpecialization.Message) Finally cmd.cmd = New OleDbCommand(sql.Text = 101 End If Catch ex As Exception MsgBox(ex.Message) Finally cmd.OleDb Public Class Major Private Sub btnAdd_Click(ByVal sender As System.Text & "')" .Text & "'" ConnectDB() cmd = New OleDbCommand(sql.

Critical.0.Information.Message) Finally cmd. ByVal e As System.Close() End Try End Sub Private Sub loadmajor() Try sql = "SELECT Specialization FROM tblMajor" ConnectDB() cmd = New OleDbCommand(sql. con) Dim i As Integer i = cmd. "Major Information") Else MsgBox("Failed to add Major".txtSpecialization.Dispose() con.OleDbDataAdapter Dim ds As New DataSet Dim sql As String Private Sub Button2_Click(ByVal sender As System.mdb" Dim con As OleDb.Load loadmajor() End Sub End Class .Object.Click updatetime() txthour.Jet.Object.ExecuteReader(CommandBehavior.Rows.4.ConnectDB() cmd = New OleDbCommand(sql.Close() End Sub Private Sub Button1_Click(ByVal sender As System.Message) Finally cmd.Da ta Source=" & Application.Clear() Do While dr.Object.StartupPath & "\Assessment.Add(dr(0)) Loop Catch ex As Exception MsgBox(ex.EventArgs) Handles Button2. ByVal e As System. "Major Information") End If Catch ex As Exception MsgBox(ex.Read = True Imports System.EventArgs) Handles Button1.Text = "" dgvmajor. MsgBoxStyle.ExecuteNonQuery If i > 0 Then MsgBox("Major Added".OleDbConnection(Strcon) Dim da As New OleDb.Text = "" End Sub Private Sub Major_Load(ByVal sender As System.OleDb Public Class TimeDuration Public Strcon As String = "Provider=Microsoft. MsgBoxStyle.Cl oseConnection) dgvmajor.Close() End Try End Sub Public Sub clear() Me.Data.EventArgs) Handles MyBase.Text = "" txtmin.OleDbConnection = New OleDb. con) dr = cmd.Rows.OLEDB. ByVal e As System.Click Me.Dispose() con.

MsgBoxStyle. Go to Sign In".Text & "'" ConnectDB() cmd = New OleDbCommand(sql. A_Min = '" & _ txtmin.Text & "' WHERE A_Username = '" & MainForm.Dispose() con.ExecuteNonQuery If i > 0 Then MsgBox("You are successfully set the time.Message) Finally cmd.'" & _ Me.txtid. MsgBoxStyle.Text & "')" ConnectDB() cmd = New OleDbCommand(sql.Text & "' AND A_Pass = '" & txtoldpass.txtmin.Critical. con) Dim i As Integer i = cmd.Information. "Set Time") Else MsgBox("Failed to set the time".EventArgs) Handles Button2. ByVal e As System. "Time Set") Else MsgBox("Failed to set the time".Object. ByVal e As System.Information.End Sub Private Sub settime() Try con.Close() End Sub Private Sub btnchange_Click(ByVal sender As System. "Set Time") End If Catch ex As Exception MsgBox(ex.Close() End Try End Sub Private Sub updatetime() Try con. con) Dim i As Integer .Text Then Try sql = "UPDATE tblStudentInfo SET A_Pass = '" & _ txtnewpass. A_Min)VALUES('" & Me.Data.Text = txtnewpass. con) Dim i As Integer i = cmd.Text & "'.Information.EventArgs) Handles btnchange.txthour.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Object.Click Me.Click If txtconpass.Dispose() con.Open() sql = "UPDATE tbltime SET A_Hours = '" & _ txthour.Close() End Try End Sub End Class Imports System. "Time Set") End If Catch ex As Exception MsgBox(ex. MsgBoxStyle.ExecuteNonQuery If i > 0 Then MsgBox("Time set".Message) Finally cmd. MsgBoxStyle.Open() sql = "INSERT INTO tbltime (A_Hours.OleDb Public Class Change_Account Private Sub Button2_Click(ByVal sender As System.Text & "'.

Dispose() con.Text & "' and Specialization = '-' and ." Examination1.txtspec. con) Dim dt11 As New DataTable Then check11. Ed." Then Dim check11 As New OleDb. Ed.OleDbDataAdapter("Select * from tblStudentQuestion where Category = '" & cboCategory. "Update password") txtconpass. MsgBoxStyle. cnt. MsgBoxStyle.Text = "" Else MsgBox("Sorry you have entered incorrect password :-(".Text = "Prof.i = cmd.Text = "Prof.Focus() End If Catch ex As Exception MsgBox(ex.lblAssNum.Rows. Ed.Text = "" txtnewpass. MsgBoxStyle.Text & "' and Category = '" & cboCategory.Text = "" txtnewpass.Text = "" txtoldpass. ByVal e As System. ctr.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID ='" & MainForm.OleDb Public Class frmStart1 Dim num2.Text = "" txtoldpass. Qnum As Integer Private Sub Button1_Click(ByVal sender As System.Text & "' and AssessmentNumber = '" & MainForm.Message) Finally cmd.Object.Information.Text & "' and Specialization = '-'".Fill(dt11) If dt11.Data.txtCategory." Then Dim check11 As New OleDb.Click If Me.Text = "-" ElseIf cboCategory.Count <> 0 MsgBox("You have already taken this assessment!!") Exit Sub 'Else End If Examination1.Text = "Gen.Text = "" txtnewpass.ExecuteNonQuery If i > 0 Then MsgBox("Password successfully changed :-)". "Change Password") txtoldpass.Focus() End If End Sub End Class Imports System.EventArgs) Handles Button1.lblReviewerID. "Change Password") txtconpass.Close() End Try Else MsgBox("Password didn't match :-P".Information.Exclamation.cboCategory.

Text = MainForm.Text Examination1.txtCategory.lblAssNum.Text Me.Fill(d2) If d2.Text & "'". ByVal e As System.lblReviewerID.Text & "' and ReviewerID ='" & MainForm.Close() Examination1.lblReviewerID.Text = "Major" And cboSpec.Item("a_Min") sec = d2.Text = "" cboSpec.Text = "Major" Examination1.Text = "-" Else If cboCategory. sec As Integer Dim check4 As New OleDb.TextChanged If MainForm.Text Examination1.Text & "' and AssessmentNumber = '" & MainForm.Text Examination1.Text = "1" Examination1.Text = "Gen. con) Dim d2 As New DataTable check4.ReviewerID ='" & MainForm." Examination1.txtAssessmentNum.Count <> 0 Then MsgBox("You have already taken this assessment!!") Exit Sub End If Examination1.cboSpec.lblmin.Text = "Major" And cboSpec.cboSpec.Enabled = True ' get the time Dim min.txtRevID.Text & "'". con) Dim dt11 As New DataTable check11.lblAssNum.txtspec.lblCourse.Timer1.lblAssNum. con) Dim dt11 As New DataTable check11.lblReviewerID.Text ElseIf cboCategory.Text = Me.Text = "Major" Then .Count = 1 Then min = d2.Rows(0).Count <> 0 Then MsgBox("You have already taken this assessment!!") Exit Sub End If Examination1.Text = min Examination1.Focus() End If If cboCategory.Text = Me.Text <> "" Then Dim check11 As New OleDb.Text = MainForm.txtsec.Text = "" Then MsgBox("Select a major first!") Exit Sub End If End If Examination1.Text & "' and AssessmentNumber = '" & MainForm.Rows(0).cboCategory.txtCategory.Text & "' and Specialization = '" & cboSpec.Text = "" cboCategory.Text = min Examination1.txtmin.1 sec = 59 End If End If Examination1.Text = sec Examination1.Rows.Rows. Ed.Fill(dt11) If dt11.Text = "BEED" Then MsgBox("You are not allowed to answer Major Questions because you don't have a major") cboCategory.ShowDialog() End Sub Private Sub cboCategory_TextChanged(ByVal sender As Object.Fill(dt11) If dt11.lblsec.EventArgs) Handles cboCategory.txtCategory.Item("a_sec") If min <> 0 And sec = 0 Then min = min .OleDbDataAdapter("Select * from tblTime2".txtQid.Text = sec Examination1.Rows.txtspec.txtspec.Text = Me.OleDbDataAdapter("Select * from tblStudentQuestion where Category = '" & cboCategory.

" Then Dim check11 As New OleDb.OleDb Public Class frmstart2 Dim num2.Rows.lblAssNum.EventArgs) Handles Button1. Ed. ByVal e As System.Data.Text & "' and AssessmentNumber = '" & MainForm.cboCategory.lblSpec.Text = "Prof." Examination2. cnt.Fill(dt11) If dt11.txtspec.Visible = True Else lblSpec.Visible = False cboSpec.EventArgs) Handles cboSpec.TextChanged If MainForm.Text & "' and Specialization = '-'".lblReviewerID.txtCategory. Ed.Visible = False End If End Sub Private Sub cboSpec_TextChanged(ByVal sender As Imports System. ByVal e As System.Text = "-" . Qnum As Integer Private Sub Button1_Click(ByVal sender As System.Text Then MsgBox("You are only allowed to answer questions that are not your Major") End If End Sub End Class Category = '" & cboCategory.Visible = True cboSpec.Text = "Prof.Count <> 0 Then MsgBox("You have already taken this assessment!!") Exit Sub 'Else End If Examination2.Text <> cboSpec.Object.Text & "' and Object. con) Dim dt11 As New DataTable check11.lblSpec. ctr.Click If Me.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID ='" & MainForm.

Text Examination2.ElseIf cboCategory.OleDbDataAdapter("Select * from tblTime".ShowDialog() End Sub Private Sub cboCategory_TextChanged(ByVal sender .lblAssNum.lblAssNum.Text = MainForm.Text = sec Examination2.Text <> "" Then Dim check11 As New OleDb. hr.Count <> 0 Then MsgBox("You have already taken this assessment!!") Exit Sub End If Examination2. con) Dim d2 As New DataTable check4.Text = min Examination2.Text = "" Then MsgBox("Select a major first!") Exit Sub End If End If Examination2.Timer1.Count = 1 Then min = d2.Rows.1 sec = 59 ElseIf hr <> 0 And min = 0 Then hr = hr .txtspec.Fill(dt11) If dt11.Item("A_Hours") If min <> 0 And hr = 0 Then min = min .OleDbDataAdapter("Select * from tblStudentQuestion where Category = '" & cboCategory.Text & "'".Text ElseIf cboCategory.lblMin.OleDbDataAdapter("Select * from tblStudentQuestion where Category = '" & cboCategory.Text & "'".Text = "Major" And cboSpec. Ed.txtQid.txtspec.Text = hr Examination2.Enabled = True ' get the time Dim min. Ed.lblReviewerID. sec As Integer Dim check4 As New OleDb.Rows.Text Examination2.txtCategory.txtspec.Text & "' and AssessmentNumber = '" & MainForm. con) Dim dt11 As New DataTable check11.Text = "Gen.txtCategory.Item("A_Min") hr = d2.Text = "Major" And cboSpec.Text = "-" Else If cboCategory.Rows(0).Count <> 0 Then MsgBox("You have already taken this assessment!!") Exit Sub End If Examination2.Text = "Major" Examination2.lblReviewerID.1 min = 59 sec = 59 End If End If Examination2." Examination2." Then Dim check11 As New OleDb.lblReviewerID.1 sec = 59 ElseIf min <> 0 And hr <> 0 Then hr = hr min = min .Text & "' and AssessmentNumber = '" & MainForm. con) Dim dt11 As New DataTable check11.cboCategory.Text & "' and Specialization = '" & cboSpec.Rows(0).Rows.Text Examination2.Text = Me.txtCategory.Text = Me.Text & "' and Specialization = '-' and ReviewerID ='" & MainForm.Text & "' and ReviewerID ='" & MainForm.Text = Me.Close() Examination2.Text = "Gen.txtRevID.txtAssessmentNum.cboSpec.lblHr.Fill(d2) If d2.cboSpec.Text = MainForm.Fill(dt11) If dt11.Text Me.lblAssNum.Text = "1" Examination2.lblSec.

lblCourse.OleDbDataAdapter("Select * from tblStudentInfo where A_ReviewerID ='" & Me.TextChanged If MainForm.Enabled = False End If End Sub Imports System.EventArgs) Handles cboSpec.EventArgs) Handles Button9. ByVal e As System.Text Then MsgBox("You are only allowed to answer questions that are not your Major") End If End Sub End Class System.Visible = False cboSpec.Data.Text) .lblSpec.Object.TextChanged If MainForm.1 If lblMin.Visible = True Else lblSpec. ByVal e As System.Text <> cboSpec.Focus() End If If cboCategory.EventArgs) Handles txtRevID.TextChanged Dim check As New OleDb.Text = "Major" Then lblSpec.EventArgs) Handles cboCategory.Text = Val(lblSec.Text = 0 And lblSec.Visible = True cboSpec.Tick lblSec.Close() End Sub Private Sub Timer1_Tick(ByVal sender As System.Text & "'".EventArgs) Handles Timer1.Text = 0 And lblHr. ByVal e As Private Sub txtRevID_TextChanged(ByVal sender As System.Fill(d1) .Text = "" cboCategory.Object.Text = "" cboSpec.OleDb Public Class Examination2 Private Sub Button9_Click(ByVal sender As System.Object. ByVal e As System. con) Dim d1 As New DataTable check.Text = 0 Then Timer1.txtRevID.Click Me.As Object.Text = "BEED" Then MsgBox("You are not allowed to answer Major Questions because you don't have a major") cboCategory.Visible = False End If End Sub Private Sub cboSpec_TextChanged(ByVal sender As Object. ByVal e As System.

Text) & ".Text & "'".Item("A_Specialization") End If End Sub Private Sub Examination2_Load(ByVal sender As System.Text) & ".Text & "' and Category='" & txtCategory. Stud_Answer.Rows(0). Points.End If End If End Sub Private Sub btna_Click(ByVal sender As System.Text & "'".Text = d1. con) Dim dt2 As New DataTable check2.Load If txtCategory.lblAssNum.Text = dt2.'" & MainForm.OleDbDataAdapter("select * from tblGeneratedQuestion where AssessmentNum='" & MainForm.Count <> 0 Then txtNumQuestion.Text = d1.Rows(0). Specialization) VALUES (" & Val(txtQid.Text = "0" txtPoint.'" & Me.Open Then con.txtCourse.txtAns.Text = dt2.Count If Not con.Open() End If If btna.Text & "'.lblAssNum.Text & "'.Connection = con cmd.Text 'update answer If txtCategory.Text & "'.Text) & " and Category ='" & Me.Text & "' and AssessmentNumber ='" & MainForm.lblAssNum.Object.Text & "' and Category ='" & txtCategory.Count End If Else Dim check2 As New OleDb.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Rows. ByVal e As System.Rows.Text <> txtCorrectAnswer.EventArgs) Handles MyBase.lblAssNum.Item("A_Course") Me.Text & "' and QuestionNumber = " & Val(txtQid.Count = 0 Then Dim cmd As New OleDb.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Click ConnectDB() If d1.txtname.Object. '" & Me.'" & MainForm.lblReviewerID.Rows.Count = 1 Then Me. " & Val(QuestID.txtCategory.txtCategory.OleDbCommand cmd.Fill(dt2) If dt2.EventArgs) Handles btna.Text <> "Major" Then Dim check2 As New OleDb.Text Then txtPoint. ReviewerID. ByVal e As System.Count <> 0 Then txtNumQuestion. QuestionID. con) Dim dt2 As New DataTable check2.txtspec.Rows." & Val(txtPoint.'-')" .OleDbDataAdapter("select * from tblGeneratedQuestion where AssessmentNum='" & MainForm. con) Dim dt2 As New DataTable check2.Fill(dt2) If dt2.Rows.Text & "' and Specialization ='" & txtspec. AssessmentNumber.Text = d1.Text Then txtPoint. Category.Text = btna.Text <> "Major" Then Dim check2 As New OleDb.Text = "1" ElseIf btna.Rows(0).lblReviewerID.Text & "'".Text = txtCorrectAnswer.Text) & ".Text & "'.Text = "0" End If txtAns.Item("A_Name") Me.Fill(dt2) If dt2.Rows.State = ConnectionState.

Dispose() Finally Else con.ExecuteNonQuery Catch ex As Exception MsgBox(ex. Category.Connection = con cmd.txtCategory.lblAssNum. " & Val(QuestID.Close() End Try End If End If Dim check2 As New OleDb.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Close() Else Dim check6 As New OleDb.Count) = 1 Then 'update answer Try . QuestionID.Fill(d1) If Val(d1.Text & "' and Specialization ='" & txtspec.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.txtAns.Text & "' and Specialization ='" & txtspec.lblReviewerID.Text & "')" cmd.txtRevID.cmd.ExecuteNonQuery() ' con.lblAssNum.Text & "' and AssessmentNumber = '" & MainForm.Text) & " and Category ='" & Me.txtRevID. con) Dim dt2 As New DataTable check2.Text & "'.Text & "' and Category ='" & txtCategory.Text & "'. Points = " & _ txtPoint.Fill(dt2) If dt2.Count = 0 Then Dim cmd As New OleDb.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber. Points. Specialization) VALUES (" & Val(txtQid.Text & "'.Rows. '" & Me.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text & "' and Category ='" & txtCategory.Rows.txtAns.Close() Else 'update of answer Dim check6 As New OleDb.'" & Me.Text & "' and AssessmentNumber = '" & MainForm.Fill(d1) If Val(d1.Text & "'". con) Dim i As Integer i = cmd.lblAssNum.Text) & ".Text & "'".Text & "'.Rows.Text & " WHERE QuestionNumber = " & Val(txtQid. ReviewerID.Text & " and ReviewerID = '" & Me.Text & "'".Text & " and ReviewerID = '" & Me.Text & "'.lblReviewerID.Text) & ".txtRevID. con) Dim d1 As New DataTable check6.lblAssNum.txtCategory. con) Dim d1 As New DataTable check6.lblAssNum.Text & "' and AssessmentNumber = '" & MainForm.Text & "' and Category ='" & txtCategory.'" & MainForm.Text) & " and ReviewerID = '" & Me. Stud_Answer.Message) cmd.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text & "' and QuestionNumber = " & Val(txtQid." & Val(txtPoint.'" & txtspec.ExecuteNonQuery() ' con.'" & MainForm. AssessmentNumber.OleDbCommand cmd.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Text) & ".Text & "' and AssessmentNumber ='" & MainForm.

txtAns.Text) & ".Text & "'". ByVal e As System.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "'.Text = "1" ElseIf btnb.Text & "' and QuestionNumber = " & Val(txtQid. '" & Me. Stud_Answer.Text & "' and AssessmentNumber = '" & MainForm. Points = " & _ txtPoint.'-')" cmd.State = ConnectionState.txtRevID.'" & Me.lblAssNum. con) Dim i As Integer i = cmd.Count = 0 Then Dim cmd As New OleDb.OleDbCommand cmd.Text <> "Major" Then Dim check2 As New OleDb.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ .ExecuteNonQuery() ' con.lblReviewerID.Text & " and ReviewerID = '" & Me.Text 'update answer If txtCategory. Category.lblAssNum.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.txtCategory.Open Then con.EventArgs) Handles btnb.Connection = con cmd.Close() End Try End If End If End If End Sub Private Sub btnb_Click(ByVal sender As System. " & Val(QuestID.lblReviewerID.Text & "' and Category ='" & txtCategory.Open() End If If btnb.Text & "'.Text) & ".lblAssNum.lblAssNum.Text & "'.Text & "' and Category ='" & txtCategory.Text Then txtPoint. Points.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm. ReviewerID.Text & "' and AssessmentNumber = '" & MainForm.'" & MainForm. con) Dim dt2 As New DataTable check2.Text = btnb.txtAns.Text & "'".Dispose() con.Text = "0" End If txtAns.Rows.Close() Else 'update of answer Dim check6 As New OleDb.Text & " WHERE QuestionNumber = " & Val(txtQid.Text & "'.Text) & ".Text & "'.Text Then txtPoint. Specialization) VALUES (" & Val(txtQid.'" & MainForm.Click ConnectDB() If Not con.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Rows.Fill(d1) If Val(d1.txtRevID.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Fill(dt2) If dt2.Text = txtCorrectAnswer.Text & "' and AssessmentNumber ='" & MainForm. con) Dim d1 As New DataTable check6. AssessmentNumber.Text) & " and Category ='" & Me.Object.Text & "' and Specialization ='" & txtspec.Text <> txtCorrectAnswer.txtCategory.Message) Finally cmd." & Val(txtPoint. QuestionID.Text) & " and ReviewerID = '" & Me.

Points = " & _ txtPoint. QuestionID.Text & "' and AssessmentNumber ='" & MainForm.Fill(dt2) If dt2.Text & "' and QuestionNumber = " & Val(txtQid. ReviewerID.Text & "'".Text & "' and Category ='" & txtCategory.Text) & ".txtRevID.Text & "' and Specialization ='" & txtspec.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid. con) Dim i As Integer i = cmd.Rows.Dispose() con.Text) & " and ReviewerID = '" & Me.Text) & ".Text & "' and AssessmentNumber = '" & MainForm.txtAns.txtAns.lblReviewerID.Text & "')" cmd. " & Val(QuestID.Text & "'" ConnectDB() cmd = New OleDbCommand(sql. con) Dim i As Integer i = cmd.Text & " WHERE QuestionNumber = " & Val(txtQid. '" & Me.txtCategory.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & " WHERE QuestionNumber = " & Val(txtQid.Message) Finally cmd.Close() Else Dim check6 As New OleDb.Text) & ".Text & "' and Category ='" & txtCategory. con) Dim d1 As New DataTable check6.lblAssNum.Message) Finally .Text) & " and ReviewerID = '" & Me.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Count = 0 Then Dim cmd As New OleDb.Close() End Try End If End If Else Dim check2 As New OleDb.ExecuteNonQuery Catch ex As Exception MsgBox(ex.txtAns.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Text & "' and AssessmentNumber = '" & MainForm." & Val(txtPoint.Text & " and ReviewerID = '" & Me.Rows.Text & "'.Text & "' and AssessmentNumber = '" & MainForm. Category.lblAssNum.Text & "'. Points.Text & "'.Connection = con cmd.txtCategory.'" & Me.lblAssNum. con) Dim dt2 As New DataTable check2.txtRevID.'" & MainForm.Text & "'". Stud_Answer.lblReviewerID.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.OleDbCommand cmd.'" & txtspec.Text & "' and Category ='" & txtCategory.Me.Text) & " and Category ='" & Me. AssessmentNumber.lblAssNum.Text & "'.Fill(d1) If Val(d1. Points = " & _ txtPoint.'" & MainForm.txtRevID.lblAssNum.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber. Specialization) VALUES (" & Val(txtQid.Text & "' and Specialization ='" & txtspec.ExecuteNonQuery() ' con.Text & "'.Text & "'.Text & "' and Specialization ='" & txtspec.

OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text & "'.Rows.Dispose() con.Dispose() Finally con.Text) & ".Connection = con cmd.lblAssNum.txtRevID.txtCategory.'" & MainForm.Text & "' and AssessmentNumber = '" & MainForm.Text) & ".ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "' and QuestionNumber = " & Val(txtQid.Text <> txtCorrectAnswer.EventArgs) Handles btnc.lblAssNum.Text & "' and AssessmentNumber = '" & MainForm.Message) cmd.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & " WHERE QuestionNumber = " & Val(txtQid.Text = "1" ElseIf btnc. con) Dim d1 As New DataTable check6.txtCategory. con) Dim i As Integer i = cmd.lblAssNum.Text & " and ReviewerID = '" & Me.Text & "'".Text) & " and Category ='" & Me.lblAssNum.Text & "'.Text <> "Major" Then Dim check2 As New OleDb. QuestionID.Text) & ".'-')" cmd. " & Val(QuestID.Close() Else 'update of answer Dim check6 As New OleDb.Open() End If If btnc. Points = " & _ txtPoint. Stud_Answer.Text = txtCorrectAnswer.txtAns. AssessmentNumber. ReviewerID.txtAns.Open Then con.'" & Me. ByVal e As System.Rows.Count = 0 Then Dim cmd As New OleDb.Text) & " and ReviewerID = '" & Me.Text Then txtPoint.Object. Points.lblReviewerID. '" & Me.Text & "'".Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Close() End Try End If End If End If End Sub Private Sub btnc_Click(ByVal sender As System.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Text & "' and Category ='" & txtCategory." & Val(txtPoint.lblReviewerID.Text = btnc.Fill(d1) If Val(d1. con) Dim dt2 As New DataTable check2.'" & MainForm.Text = "0" End If txtAns.Text & "'.Text & "'.Click ConnectDB() If Not con.State = ConnectionState.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.OleDbCommand cmd.cmd.Text Then txtPoint.Fill(dt2) If dt2.Text & "' and AssessmentNumber ='" & MainForm.Close() End Try .ExecuteNonQuery() ' con. Specialization) VALUES (" & Val(txtQid. Category.txtRevID.Text 'update answer 'update answer If txtCategory.Text & "' and Category ='" & txtCategory.Text & "'.

Fill(d1) If Val(d1.Text & "'".Connection = con cmd.Click ConnectDB() If Not con.OleDbCommand cmd.Open Then con.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid. Specialization) VALUES (" & Val(txtQid.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm. Category. ReviewerID.Text & "'.Rows.Text = btnd.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Text 'update answer .Text & "' and QuestionNumber = " & Val(txtQid.Close() Else Dim check6 As New OleDb.lblAssNum.Text & "' and Category ='" & txtCategory.'" & Me.Fill(dt2) If dt2. AssessmentNumber. Points.Text) & ".Object.lblAssNum.txtAns.Text) & " and ReviewerID = '" & Me.'" & MainForm." & Val(txtPoint. Points = " & _ txtPoint.Text = "0" End If txtAns.'" & MainForm.Text & "'".lblReviewerID.Text Then txtPoint.'" & txtspec.EventArgs) Handles btnd. con) Dim dt2 As New DataTable check2. '" & Me.Text & "' and AssessmentNumber = '" & MainForm.Text & "' and Category ='" & txtCategory. Stud_Answer.Text & "'.txtAns.Message) Finally cmd.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Close() End Try End If End If End If End Sub Private Sub btnd_Click(ByVal sender As System.ExecuteNonQuery() ' con.txtCategory.Rows.Text = "1" ElseIf btnd.txtRevID.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Text & "' and AssessmentNumber = '" & MainForm.Text) & " and Category ='" & Me.Text <> txtCorrectAnswer. ByVal e As System.Text & "'.Text & "' and AssessmentNumber ='" & MainForm. " & Val(QuestID.txtRevID.State = ConnectionState.Text & " WHERE QuestionNumber = " & Val(txtQid.lblReviewerID.Text & " and ReviewerID = '" & Me.Text & "'.Text) & ".Dispose() con.Text = txtCorrectAnswer.txtCategory. QuestionID.lblAssNum.Text Then txtPoint.Count = 0 Then Dim cmd As New OleDb.End If End If Else Dim check2 As New OleDb. con) Dim i As Integer i = cmd.Text & "' and Specialization ='" & txtspec.Text & "'.Text & "' and Specialization ='" & txtspec.Open() End If If btnd.Text) & ".lblAssNum.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & "' and Specialization ='" & txtspec.Text & "')" cmd. con) Dim d1 As New DataTable check6.

Rows.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Text) & " and ReviewerID = '" & Me.Text & "' and AssessmentNumber ='" & MainForm. Points = " & _ txtPoint.Close() End Try End If End If Else Dim check2 As New OleDb.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber. Points.'" & Me. .Text & "'.If txtCategory.txtRevID.Text & "' and Category ='" & txtCategory. con) Dim i As Integer i = cmd.Text & "'.Text) & " and Category ='" & Me.Text & "' and Category ='" & txtCategory.Fill(d1) If Val(d1.txtCategory.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.lblReviewerID.Text & "'.Text & " WHERE QuestionNumber = " & Val(txtQid." & Val(txtPoint. con) Dim dt2 As New DataTable check2. ReviewerID. Stud_Answer.Count = 0 Then Dim cmd As New OleDb. " & Val(QuestID.lblReviewerID. '" & Me.txtAns. Category. Specialization) VALUES (" & Val(txtQid.OleDbCommand cmd.Connection = con cmd.txtCategory.Count = 0 Then Dim cmd As New OleDb. con) Dim dt2 As New DataTable check2.Connection = con cmd.Text & "' and AssessmentNumber = '" & MainForm.Fill(dt2) If dt2.lblAssNum.Text) & ". Stud_Answer.OleDbCommand cmd. Category.Text <> "Major" Then Dim check2 As New OleDb.Text & "' and AssessmentNumber = '" & MainForm.Text & "'".CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & "' and Specialization ='" & txtspec.Fill(dt2) If dt2.lblAssNum.'" & MainForm.Text) & ".txtAns.Text) & " and Category ='" & Me.Text & "' and QuestionNumber = " & Val(txtQid. QuestionID.Message) Finally cmd.ExecuteNonQuery() ' con.Text & "'".Text) & ".Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Text & " and ReviewerID = '" & Me. ReviewerID.Dispose() con. AssessmentNumber.Close() Else 'update of answer Dim check6 As New OleDb. con) Dim d1 As New DataTable check6.Text & "'". AssessmentNumber.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Rows. Points.Rows. QuestionID.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Text & "' and AssessmentNumber ='" & MainForm.Text & "'.lblAssNum.txtCategory.Text & "'.lblReviewerID.Text & "' and QuestionNumber = " & Val(txtQid.lblAssNum.ExecuteNonQuery Catch ex As Exception MsgBox(ex.'" & MainForm.'-')" cmd.txtRevID.lblAssNum.

txtRevID.ExecuteNonQuery() ' con.Text) + 1 End If txtAns.txtAns." & Val(txtPoint.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.lblReviewerID.EventArgs) Handles txtQid.Text = "" End Sub Private Sub Button6_Click(ByVal sender As System.Text) Then Button5.Text & "' and AssessmentNumber = '" & MainForm.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.lblAssNum.Object.Text = Val(txtQid.Enabled = False Exit Sub ElseIf txtQid.Text & "' and AssessmentNumber = '" & MainForm.Specialization) VALUES (" & Val(txtQid.Message) Finally cmd.Text & "' and Category ='" & txtCategory.Close() End Try End If End If End If End Sub Private Sub Button5_Click(ByVal sender As System. Points = " & _ txtPoint. ByVal e As System.Text) < limit Then 'GET ANOTHER QUESTION txtQid.Text & "' and Specialization ='" & txtspec.Text & "' and Specialization ='" & txtspec.Close() Else Dim check6 As New OleDb.Text & "'.txtCategory.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "'.Enabled = False ElseIf Val(txtQid.EventArgs) Handles Button6.TextChanged ' On Error Resume Next .Enabled = True Button6.Enabled = True txtQid.txtRevID.Text = 1 Then Button5.Dispose() con. ByVal e As System.Object.Text) .txtAns.Text = Val(txtQid.Text & "' and Category ='" & txtCategory.Text & " WHERE QuestionNumber = " & Val(txtQid.'" & txtspec.Click If txtQid.1 End If End Sub Private Sub txtQid_TextChanged(ByVal sender As System.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.'" & Me.EventArgs) Handles Button5.Text & " and ReviewerID = '" & Me. con) Dim i As Integer i = cmd. '" & Me.'" & MainForm.Rows.Text) & ".Text) If limit = Val(txtQid.Text & "'.lblAssNum.'" & MainForm.Text & "'.Text <> 1 Then Button6.Fill(d1) If Val(d1. " & Val(QuestID.Click Dim limit As Integer limit = Val(txtNumQuestion.lblAssNum.Text & "'".Text) & ".Text & "'.Enabled = True Button5. con) Dim d1 As New DataTable check6.Text) & " and ReviewerID = '" & Me. ByVal e As System.Text) & ".Object.Text & "')" cmd.

Text = d1.Rows(0).Item("A_QuestionID") Me.Text = d1.Text = d1.Text & " and AssessmentNum = '" & txtAssessmentNum.Text & "' and A_Category ='" & txtCategory.Rows(0).txtb.Text = 59 .txtAns.Text = "Gen." Then Dim check As New OleDb.Rows(0).txtPoint.txtQuestion.Text = d1.Rows(0).Item("A_AnsA") Me.txtCorrectAnswer.Rows. Ed.Rows(0).Rows(0).txtc.Text) <> 0 And Val(lblHr. "00") If Val(lblMin.Item("Stud_Answer") Me.txtAns.Text = d1.Text = d1.Text = Format(lblSec.Rows(0).Text & "' and A_Category ='" & txtCategory.txtCorrectAnswer.Text = d1.Item("Points") End If End If End Sub Private Sub lblSec_TextChanged(ByVal sender As Object.txta.Item("A_AnsB") Me.txtc.Text & "' and A_Category ='" & txtCategory. con) Dim d1 As New DataTable check.Rows(0).Item("A_AnsA") Me.txta.Count <> 0 Then Me.Text = d1.Item("A_AnsC") Me.txta.Text = d1.TextChanged 'lblSec. ByVal e As System.Text = d1.Item("A_AnsD") Me.Text = Val(lblMin.Text = "Major" Then Dim check As New OleDb.Text = "Prof.txtQuestion.Item("A_QuestionID") Me.Text & "'".Rows(0).Item("A_AnsB") Me.OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & Val(txtQid.txtc.Text = d1.Text = d1.Text = d1.txtd.Text = d1.Text = d1. con) Dim d1 As New DataTable check.Text = d1.Rows(0).Fill(d1) If d1.txtPoint.Item("A_AnsD") 'Me.OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & Val(txtQid.Text = d1.Text = d1.Item("A_Question") Me.txtb.Rows(0).Text & "' and A_Specialization ='" & txtspec.Item("A_CorrectAns") 'Me.Rows(0).Rows.Rows(0).Item("A_Question") Me.Text = d1.Fill(d1) If d1.txtd.Text) & " and AssessmentNum = '" & txtAssessmentNum.txtd.Text = d1.Rows(0).Text = d1.Item("Points") End If ElseIf txtCategory.Text = d1." Then Dim check As New OleDb.Rows(0).Text) & " and AssessmentNum = '" & txtAssessmentNum.Item("A_AnsC") Me.Item("A_CorrectAns") End If ElseIf txtCategory.Rows(0).Fill(d1) If d1.Rows.Rows(0).Text) <> 0 Then If Val(lblSec.1 lblSec.Rows(0).Text. Ed.Text = d1.Item("A_AnsA") Me.Count <> 0 Then QuestID.Item("A_AnsD") 'Me.Rows(0).Text & "'".Item("A_Question") Me.Count <> 0 Then QuestID.Rows(0).OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & txtQid.Rows(0).Item("A_AnsB") Me.Rows(0).Item("A_CorrectAns") 'Me.Text = d1.If txtCategory.Rows(0).txtQuestion.txtCorrectAnswer.Text) = 0 Then lblMin.Item("A_AnsC") Me.txtb.Item("Stud_Answer") Me. con) Dim d1 As New DataTable check.EventArgs) Handles lblSec.Text) .Rows(0).Text & "'".

Text) = 0 Then lblHr. con) Dim d1 As New DataTable check.Text = 59 lblSec.Text) .OleDbDataAdapter("Select * from tblExamInfo where ReviewerID = '" & MainForm. ByVal e As System.Text & "'.Text = "0" resultText = "Your score is " & score & " out of " & txtNumQuestion.'" & Format(Now. Category. con) .ShowDialog() End If End Sub Private Sub lblSec_Click(ByVal sender As System.Text = Val(lblHr.lblReviewerID.'" & examPercent & "'.Text)) * 100 If examPercent <= 50 Then studentLevel = "Beginner" ElseIf examPercent > 50 And examPercent <= 70 Then studentLevel = "Intermediate" ElseIf examPercent > 70 And examPercent <= 100 Then studentLevel = "Advanced" End If Dim check5 As New OleDb.Count = 1 Then score = d1.Text & "'.Text <> "Major" Then totScoreEd() Else totScoreMajor() End If End Sub Private Sub totScoreEd() Dim score As Integer Dim check As New OleDb. "dd-MMM-yy") & "'.'-')" ConnectDB() cmd = New OleDbCommand(sql.Rows.Text = 59 End If ElseIf lblMin.Text & "' and AssessmentNumber ='" & MainForm.lblAssNum.OleDbDataAdapter("Select * from qryTotalScore where ReviewerID ='" & Me.Close() frmResult.'" & txtCategory. StudLevel.Text & "' and Category ='" & txtCategory.Text = "0" Then Timer1.Object.Text = "0" And lblHr.Text & "'".End If ElseIf Val(lblMin. AssessmentNumber. ByVal e As System.Text) .Click End Sub Private Sub Button7_Click(ByVal sender As System. ExamDate.txtRevID.EventArgs) Handles lblSec.Text & "' and AssessmentNumber = '" & MainForm.Fill(d1) If d1.Text & "'".Text = 59 End If ElseIf Val(lblMin.EventArgs) Handles Button7.Text & "'.Text <> "Major" Then totScoreEd() Else totScoreMajor() End If Me. ScorePercentage. con) Dim d5 As New DataTable check5.'" & score & "'. StudScore.Text = Val(lblMin.Object.Text) = 0 Then If Val(lblSec.Rows.Text = "0" And lblSec.Fill(d5) If Val(d5.lblAssNum.Item("SumOfPoints") lblSec.'" & studentLevel & "'.1 lblMin.1 lblSec.lblAssNum.lblReviewerID.Click If txtCategory.Text) = 0 Then lblMin. Specialization) VALUES ('" & MainForm.Text) <> 0 And Val(lblHr.Rows(0).Count) = 0 Then Try sql = "INSERT INTO tblExamInfo (ReviewerID.Text) = 0 And Val(lblHr.Enabled = False If txtCategory.Text & "' and Category ='" & txtCategory.Text & "" examPercent = (score / Val(txtNumQuestion.Text) <> 0 Then If Val(lblSec.'" & MainForm.

Text & "'.Critical.Close() End Try End If Me.'" & MainForm.Information.Rows(0).Fill(d5) If Val(d5. ExamDate.Dispose() con.Text & "'. "dd-MMM-yy") & "'. MsgBoxStyle. StudLevel. Specialization) VALUES ('" & MainForm.'" & Format(Now.Count) = 0 Then Try sql = "INSERT INTO tblExamInfo (ReviewerID.Message) Finally cmd.txtNumQuestion.'-')" ConnectDB() cmd = New OleDbCommand(sql. "Question Information") Else MsgBox("Failed to add Question".Text .Close() resultText = "You got " & score & " out of " & Me. MsgBoxStyle.Rows. con) Dim d1 As New DataTable check.Text & "'".ExecuteNonQuery If i > 0 Then 'MsgBox("Question Added".Text & "' and Specialization ='" & txtspec.txtRevID.Text & "' and AssessmentNumber ='" & MainForm.OleDbDataAdapter("Select * from tblExamInfo where ReviewerID = '" & MainForm.TextBox1.Item("SumOfPoints") lblSec. AssessmentNumber.Dim i As Integer i = cmd.Button5.OleDbDataAdapter("Select * from qryTotalScore where ReviewerID ='" & Me.lblAssNum.lblAssNum.Fill(d1) If d1.lblReviewerID.'" & score & "'. StudScore.lblReviewerID. Category.Text)) * 100 If examPercent <= 50 Then studentLevel = "Beginner" ElseIf examPercent > 50 And examPercent <= 70 Then studentLevel = "Intermediate" ElseIf examPercent > 70 And examPercent <= 100 Then studentLevel = "Advanced" End If Dim check5 As New OleDb.Count = 1 Then score = d1.Text & "' and Specialization ='" & txtspec.Enabled = True Me.Text & "' and AssessmentNumber = '" & MainForm.Rows. con) Dim i As Integer i = cmd. "Question Information") End If Catch ex As Exception MsgBox(ex.Text & "'.Text = "0" resultText = "Your score is " & score & " out of " & txtNumQuestion.Text & "") End If End Sub Private Sub totScoreMajor() Dim score As Integer Dim check As New OleDb.Text & "" examPercent = (score / Val(txtNumQuestion.Text With frmResult .ShowDialog() End With 'MsgBox("TIME'S UP!!!! Your score is " & score & " out of " & txtNumQuestion.Text & "' and Category ='" & txtCategory.'" & examPercent & "'.ExecuteNonQuery If i > 0 Then 'MsgBox("Question Added". .'" & txtCategory. con) Dim d5 As New DataTable check5.lblAssNum.'" & studentLevel & "'.Text & "' and Category ='" & txtCategory. ScorePercentage.Text & "'".Text = txtRevID.

txtNumQuestion. ByVal e As System.EventArgs) Handles Button9.TextChanged Dim check As New OleDb.Information.Button5.Close() End Try End If Imports System.OleDb Public Class Examination1 Private Sub Button9_Click(ByVal sender As System.1 End Sub Private Sub txtRevID_TextChanged(ByVal sender As System.Data.txtRevID.EventArgs) Handles Timer1.MsgBoxStyle.EventArgs) Handles txtRevID. ByVal e As System.Critical.Text & "'".Text) .Text .Enabled = Me.Text With frmResult .Tick True Me.ShowDialog() End With 'MsgBox("TIME'S UP!!!! Your score is " & score & " out of " & txtNumQuestion. ByVal e As System.OleDbDataAdapter("Select * from tblStudentInfo where A_ReviewerID ='" & Me. "Question Information") End If Catch ex As Exception MsgBox(ex.Object.Close() End Sub Private Sub Timer1_Tick(ByVal sender As System.Dispose() con.Object. con) . "Question Information") Else MsgBox("Failed to add Question".Text = Val(lblsec.Text & "") End If End Sub End Class lblsec.Click Me.Message) Finally cmd.Object.TextBox1.Close() resultText = "You got " & score & " out of " & Me. MsgBoxStyle.Text = txtRevID.

EventArgs) Handles btna.Text & "'.lblAssNum.Text & "' and Category ='" & txtCategory.Text & "'.Item("A_Name") Me." & Val(txtPoint.Count = 1 Then Me. con) Dim i As Integer i = cmd.lblAssNum. Category.Fill(dt2) If dt2.Close() .lblReviewerID.Text) & ".lblAssNum.Text) & ". ReviewerID.Text & "'".Text = btna. Stud_Answer.Rows(0).Text = "0" txtPoint.Text = d1.txtCategory.lblAssNum. AssessmentNumber.Text Then txtPoint.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Text & "' and AssessmentNumber ='" & MainForm. Points.OleDbCommand cmd.txtname.Text = d1.Click ConnectDB() If Not con.txtAns.txtRevID.Text & " and ReviewerID = '" & Me.Text & "' and AssessmentNumber = '" & MainForm.'-')" cmd. ByVal e As System.Message) Finally cmd.txtCourse.Text = "0" End If txtAns.txtCategory. con) Dim dt2 As New DataTable check2.Fill(d1) If Val(d1.'" & MainForm.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & "' and Category ='" & txtCategory.Item("A_Course") Me.Text & "'".Rows.Text & "' and QuestionNumber = " & Val(txtQid.Fill(d1) If d1.Text Then txtPoint.txtAns.txtRevID.State = ConnectionState.Rows(0).ExecuteNonQuery() ' con. Specialization) VALUES (" & Val(txtQid.Text & "'.Rows.Text 'update answer If txtCategory.Text) & ".Text) & " and Category ='" & Me.Connection = con cmd. Points = " & _ txtPoint.Open Then con.Open() End If If btna.Rows.Text <> "Major" Then Dim check2 As New OleDb.Text = txtCorrectAnswer.Count = 0 Then Dim cmd As New OleDb. " & Val(QuestID.Text & "'.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Dim d1 As New DataTable check.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Object.'" & Me.Item("A_Specialization") End If End Sub Private Sub btna_Click(ByVal sender As System.lblReviewerID. '" & Me.Text = "1" ElseIf btna.Text & "' and AssessmentNumber = '" & MainForm.Text) & " and ReviewerID = '" & Me.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.txtspec. QuestionID.Text & "'.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Rows(0).Text = d1.Close() Else 'update of answer Dim check6 As New OleDb.Dispose() con.Text & " WHERE QuestionNumber = " & Val(txtQid. con) Dim d1 As New DataTable check6.Text <> txtCorrectAnswer.'" & MainForm.

ExecuteNonQuery() ' con.txtAns.Connection = con cmd.Text = txtCorrectAnswer.EventArgs) Handles btnb.Text & "'. ByVal e As System.Text & "'.End Try End If End If Else Dim check2 As New OleDb.Text Then txtPoint.Text) & ". AssessmentNumber.lblAssNum. con) Dim d1 As New DataTable check6.Text <> txtCorrectAnswer.Text & "' and AssessmentNumber = '" & MainForm. Points.Text & "'.txtCategory. Specialization) VALUES (" & Val(txtQid.Text & "' and AssessmentNumber ='" & MainForm.Rows.Text & "' and Category ='" & txtCategory.Message) Finally cmd.Close() End Try End If End If End If End Sub Private Sub btnb_Click(ByVal sender As System.State = ConnectionState. con) Dim i As Integer i = cmd.'" & MainForm.Rows.Click ConnectDB() If Not con.Fill(d1) If Val(d1.Text) & ". '" & Me. " & Val(QuestID.Text = "0" End If txtAns.OleDbCommand cmd.'" & MainForm.Text) & " and Category ='" & Me.'" & txtspec.Text & "')" cmd. con) Dim dt2 As New DataTable check2.Count = 0 Then Dim cmd As New OleDb.lblAssNum.Text & "' and Specialization ='" & txtspec.Open() End If If btnb.Text & "' and Specialization ='" & txtspec. QuestionID." & Val(txtPoint.lblAssNum. Category.Text & "'.Text) & " and ReviewerID = '" & Me.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.txtRevID.Object.Text & " WHERE QuestionNumber = " & Val(txtQid.Text & "' and QuestionNumber = " & Val(txtQid.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.ExecuteNonQuery Catch ex As Exception MsgBox(ex.txtAns.lblReviewerID.Text) & ". Points = " & _ txtPoint.lblReviewerID.Text = btnb.Fill(dt2) If dt2.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Text = "1" ElseIf btnb.Text & "'".OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.lblAssNum.'" & Me.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text 'update answer .Text & "'".txtCategory.Open Then con.Text & "' and AssessmentNumber = '" & MainForm.Dispose() con.Text & "'. Stud_Answer.Text & " and ReviewerID = '" & Me.txtRevID.Close() Else Dim check6 As New OleDb.Text & "' and Category ='" & txtCategory.Text Then txtPoint.Text & "' and Specialization ='" & txtspec. ReviewerID.

Text & "'.Text & "'".'" & MainForm.Text & "' and QuestionNumber = " & Val(txtQid.lblReviewerID.Text & "' and AssessmentNumber = '" & MainForm.lblAssNum.Rows.Text) & ".CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Count = 0 Then Dim cmd As New OleDb.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "'". .Text & " and ReviewerID = '" & Me. Stud_Answer.Text) & ". con) Dim dt2 As New DataTable check2. Specialization) VALUES (" & Val(txtQid. ReviewerID.Rows.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm. AssessmentNumber. con) Dim dt2 As New DataTable check2.Text & "'.Close() End Try End If End If Else Dim check2 As New OleDb.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text & " WHERE QuestionNumber = " & Val(txtQid.Text) & ".Text <> "Major" Then Dim check2 As New OleDb.Connection = con cmd.lblReviewerID.Text & "'.txtCategory. Points = " & _ txtPoint.lblAssNum.'" & MainForm.If txtCategory. Category.Text) & " and ReviewerID = '" & Me.txtAns.Text & "' and AssessmentNumber ='" & MainForm. QuestionID.Text & "' and Category ='" & txtCategory.Text & "'.'" & Me. QuestionID.Text & "' and AssessmentNumber ='" & MainForm.lblAssNum.txtCategory.txtRevID.Fill(d1) If Val(d1.Text & "'" ConnectDB() cmd = New OleDbCommand(sql. Category.txtCategory.Count = 0 Then Dim cmd As New OleDb.Fill(dt2) If dt2.Text & "' and Category ='" & txtCategory. Points.Rows.Text & "' and AssessmentNumber = '" & MainForm.Text & "' and QuestionNumber = " & Val(txtQid.lblAssNum.OleDbCommand cmd.Connection = con cmd. con) Dim d1 As New DataTable check6.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.txtRevID.Fill(dt2) If dt2.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Dispose() con.Text & "'.Message) Finally cmd. Points.ExecuteNonQuery() ' con.Text & "'".'-')" cmd.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me. '" & Me.Text) & " and Category ='" & Me. " & Val(QuestID. con) Dim i As Integer i = cmd.OleDbCommand cmd.Close() Else 'update of answer Dim check6 As New OleDb.Text) & " and Category ='" & Me." & Val(txtPoint.lblAssNum.lblReviewerID. AssessmentNumber.txtAns. ReviewerID. Stud_Answer.Text & "' and Specialization ='" & txtspec.

'" & MainForm.Rows.Text = txtCorrectAnswer.Text & "'.Text & "' and QuestionNumber = " & Val(txtQid.OleDbCommand cmd.Text & "'".'" & Me.lblReviewerID.Dispose() con.txtCategory. con) Dim d1 As New DataTable check6.txtRevID.Text 'update answer 'update answer If txtCategory.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Text = "0" End If txtAns.Fill(dt2) If dt2.Text) & ".CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.'" & MainForm.txtRevID.Text = btnc.Text & "' and Category ='" & txtCategory.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Close() Else Dim check6 As New OleDb." & Val(txtPoint.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "' and AssessmentNumber = '" & MainForm.Count = 0 Then Dim cmd As New OleDb.EventArgs) Handles btnc.Text & " WHERE QuestionNumber = " & Val(txtQid.lblAssNum.Text & "' and Specialization ='" & txtspec. Stud_Answer.Connection = con cmd.Specialization) VALUES (" & Val(txtQid.lblReviewerID.Text & "' and AssessmentNumber = '" & MainForm.Text) & ".Text) & ".Text & "' and AssessmentNumber ='" & MainForm.Text = "1" ElseIf btnc. ReviewerID. QuestionID. Points.Object.Text & "'.ExecuteNonQuery() ' con.lblAssNum.Fill(d1) If Val(d1. Specialization) VALUES (" & .Close() End Try End If End If End If End Sub Private Sub btnc_Click(ByVal sender As System.Open() End If If btnc.State = ConnectionState.Text) & " and ReviewerID = '" & Me.Text Then txtPoint.lblAssNum. '" & Me.Text & "'.txtAns. Points = " & _ txtPoint.Text & "'".Text <> "Major" Then Dim check2 As New OleDb.Text & "'.lblAssNum.Text & "'.Text & " and ReviewerID = '" & Me.Text & "' and Specialization ='" & txtspec.'" & txtspec.Text & "' and Category ='" & txtCategory.Text <> txtCorrectAnswer.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.txtAns.Rows.Text Then txtPoint. Category. " & Val(QuestID.Text & "')" cmd.txtCategory.Text) & " and Category ='" & Me.Message) Finally cmd. con) Dim dt2 As New DataTable check2. ByVal e As System. AssessmentNumber.Open Then con. con) Dim i As Integer i = cmd.Click ConnectDB() If Not con.

'" & Me.txtRevID.Text) & ".Text & "'.lblReviewerID.ExecuteNonQuery() ' con. Stud_Answer.txtAns.Text & "'".Close() End Try End If End If Else Dim check2 As New OleDb.Close() Else Dim check6 As New OleDb.Text & "'. con) Dim dt2 As New DataTable check2.lblReviewerID.Val(txtQid. AssessmentNumber.Text & "' and AssessmentNumber = '" & MainForm.txtRevID. Specialization) VALUES (" & Val(txtQid.Connection = con cmd.Text & "' and Category ='" & txtCategory. ReviewerID.Text & "' and Specialization ='" & txtspec.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.txtCategory.lblAssNum.'-')" cmd.lblAssNum.'" & txtspec.Fill(d1) If Val(d1.Text) & " and Category ='" & Me.'" & MainForm. " & Val(QuestID. Points.Text & "' and Category ='" & txtCategory.Text & "'.Fill(dt2) If dt2.Text) & ".OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.'" & MainForm. '" & Me.Text & "' and AssessmentNumber = '" & MainForm.Text & " and ReviewerID = '" & Me.txtRevID. con) Dim i As Integer i = cmd.Text) & ".'" & MainForm.lblAssNum.Text & " and ReviewerID = '" & Me.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.lblAssNum.Text & "'.OleDbCommand cmd.Text & "' and Specialization ='" & txtspec.Text) & ".'" & MainForm.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Close() Else 'update of answer Dim check6 As New OleDb.Text & "'.Message) Finally cmd." & Val(txtPoint. con) Dim d1 As New DataTable .txtAns.Text & "' and AssessmentNumber = '" & MainForm.ExecuteNonQuery Catch ex As Exception MsgBox(ex. con) Dim d1 As New DataTable check6.txtAns.Dispose() con.Text & "'.Text & " WHERE QuestionNumber = " & Val(txtQid.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Text & "' and AssessmentNumber ='" & MainForm. '" & Me.Text & "'.ExecuteNonQuery() ' con.Text) & ". " & Val(QuestID.lblAssNum.Text & "' and Category ='" & txtCategory. QuestionID.Text & "'".Text & "'".Text) & " and ReviewerID = '" & Me.Text) & ".lblReviewerID.txtCategory.Text & "')" cmd.'" & Me.Count = 0 Then Dim cmd As New OleDb.lblAssNum.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text & "'. Category." & Val(txtPoint. Points = " & _ txtPoint.Rows.Rows.Text & "' and QuestionNumber = " & Val(txtQid.Text & "'.txtCategory.

Count = 0 Then Dim cmd As New OleDb.Message) Finally cmd.Text = "1" ElseIf btnd.Text & "'.Text & "'".txtAns.ExecuteNonQuery Catch ex As Exception MsgBox(ex.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Fill(d1) If Val(d1.Text & "' and Category ='" & txtCategory.txtRevID.OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Text) & ".ExecuteNonQuery() ' con.Text & "'.Text) & ".Text <> "Major" Then Dim check2 As New OleDb.Text & "' and Specialization ='" & txtspec.Text = txtCorrectAnswer.Click ConnectDB() If Not con. con) Dim dt2 As New DataTable check2.Count) = 1 Then 'update answer .lblAssNum.Open() End If If btnd.Close() End Try End If End If End If End Sub Private Sub btnd_Click(ByVal sender As System.Text & "'".Text & "'. con) Dim i As Integer i = cmd.'" & Me. Points.txtAns.Text) & ".Text & "'. Stud_Answer. '" & Me. con) Dim d1 As New DataTable check6.'" & MainForm.Fill(d1) If Val(d1.Text & "' and AssessmentNumber = '" & MainForm.Text & "' and Category ='" & txtCategory.lblAssNum.txtCategory.Connection = con cmd. AssessmentNumber.Text = "0" End If txtAns.'" & MainForm.Text) & " and ReviewerID = '" & Me.Text & "' and QuestionNumber = " & Val(txtQid.Open Then con.Text <> txtCorrectAnswer. QuestionID.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Close() Else 'update of answer Dim check6 As New OleDb.check6.Text Then txtPoint.Text = btnd.lblReviewerID.txtCategory.'-')" cmd." & Val(txtPoint.EventArgs) Handles btnd.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me.Object. ByVal e As System.Fill(dt2) If dt2.Rows.lblAssNum. Category.Text 'update answer If txtCategory.State = ConnectionState. Specialization) VALUES (" & Val(txtQid.Text) & " and Category ='" & Me.lblAssNum.txtRevID.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & " WHERE QuestionNumber = " & Val(txtQid.Rows.lblReviewerID.Text Then txtPoint. " & Val(QuestID.Text & "' and AssessmentNumber = '" & MainForm.Rows. ReviewerID.Text & "' and AssessmentNumber ='" & MainForm.Text & "'. Points = " & _ txtPoint.OleDbCommand cmd.Dispose() con.Text & " and ReviewerID = '" & Me.

Text) & ".Count = 0 Then Dim cmd As New OleDb.txtRevID.Text & "'. Points = " & _ txtPoint.ExecuteNonQuery() ' con. Category.Text & "' and Category ='" & txtCategory.Text & "' and AssessmentNumber = '" & MainForm.Text) & " and Category ='" & Me. Points = " & _ txtPoint. Specialization) VALUES (" & Val(txtQid. QuestionID." & Val(txtPoint.Text & "'.Text) & " and ReviewerID = '" & Me.Rows.txtCategory.Fill(dt2) If dt2.'" & txtspec.Dispose() con.Message) Finally cmd.txtRevID.Count) = 1 Then 'update answer Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me. con) Dim i As Integer i = cmd.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Text & "' and Category ='" & txtCategory. Points.Text & "'.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.lblReviewerID.Connection = con cmd.lblAssNum.lblAssNum.Text) & ".OleDbDataAdapter("select * from tblStudentQuestion where QuestionNumber = " & txtQid.Try sql = "UPDATE tblStudentQuestion SET Stud_Answer = '" & _ Me. AssessmentNumber.Text & "' and Specialization ='" & txtspec.Text & "' and Category ='" & txtCategory.'" & MainForm.lblReviewerID. ReviewerID.txtCategory.Text & "' and AssessmentNumber ='" & MainForm.Text & "'".ExecuteNonQuery Catch ex As Exception MsgBox(ex.'" & Me.Text) & " and ReviewerID = '" & Me.txtAns. con) Dim d1 As New DataTable check6.Text & "' and Specialization ='" & txtspec. con) Dim i As Integer i = cmd.Text & "')" cmd.txtAns.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Close() Else Dim check6 As New OleDb.txtAns.Text & "' and AssessmentNumber = '" & MainForm.Text & "'" ConnectDB() cmd = New OleDbCommand(sql.Rows.Text & "'".Text & " WHERE QuestionNumber = " & Val(txtQid.Text & "' and QuestionNumber = " & Val(txtQid.OleDbCommand cmd.Text & " WHERE QuestionNumber = " & Val(txtQid.Text & "' and Specialization ='" & txtspec.lblAssNum. con) Dim dt2 As New DataTable check2. '" & Me. Stud_Answer.txtRevID.Text) & ".Text & "' and AssessmentNumber = '" & MainForm.Text & "'.Text & " and ReviewerID = '" & Me. " & Val(QuestID.lblAssNum.ExecuteNonQuery Catch ex As Exception .Fill(d1) If Val(d1.Close() End Try End If End If Else Dim check2 As New OleDb.Text & "'.Text & "'.'" & MainForm.lblAssNum.

'" & MainForm.Connection = con cmd.Count = 0 Then Dim cmd As New OleDb.Connection = con cmd.'" & MainForm.Close() End If Else Dim check2 As New OleDb.Text) + 1 End If txtAns.Text & "'. Stud_Answer.ExecuteNonQuery() ' con.txtCategory.'" & Me.lblReviewerID.lblReviewerID.Rows.OleDbCommand cmd.Count = 0 Then Dim cmd As New OleDb.Text & "'.Text) Then Button5.Text) & ".Text <> "Major" Then Dim check2 As New OleDb. con) Dim dt2 As New DataTable check2.Text = txtsec.Click If txtCategory.Text) & ". Points.Text) If limit = Val(txtQid. " & Val(QuestID.txtCategory.Close() End If End If Dim limit As Integer limit = Val(txtNumQuestion. ReviewerID.Text & "' and AssessmentNumber ='" & MainForm." & Val(txtPoint. Category.lblAssNum. '" & Me.'-')" cmd.Object.Text & "'".Text) < limit Then 'GET ANOTHER QUESTION lblmin.Text = "" End Sub Private Sub txtQid_TextChanged(ByVal sender As . AssessmentNumber." & Val(txtPoint.Enabled = False ElseIf Val(txtQid. Stud_Answer.Text) & ".txtCategory. QuestionID.Text) & ".Text lblsec. Category.MsgBox(ex. " & Val(QuestID.'" & MainForm.Text & "' and AssessmentNumber ='" & MainForm. ByVal e As System.ExecuteNonQuery() ' con.'" & Me.txtAns.Text & "' and QuestionNumber = " & Val(txtQid. QuestionID.Text & "')" cmd.lblAssNum.Fill(dt2) If dt2.Rows.Text & "'.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.Text txtQid.'" & MainForm.Fill(dt2) If dt2.Text) & " and Category ='" & Me. Points.lblAssNum.Text & "' and QuestionNumber = " & Val(txtQid.Text) & ".Text & "'.Text = txtmin.Text & "'. ReviewerID. con) Dim dt2 As New DataTable check2.Text & "'.Message) Finally cmd.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & "'".Text & "'.EventArgs) Handles Button5. Specialization) VALUES (" & Val(txtQid. AssessmentNumber.OleDbCommand cmd.Dispose() con.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.lblAssNum.'" & txtspec. Specialization) VALUES (" & Val(txtQid.lblReviewerID.Text & "'.txtCategory.Text) & " and Category ='" & Me.Close() End Try End If End If End If End Sub Private Sub Button5_Click(ByVal sender As System.Text) & ".txtAns.lblReviewerID.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber. '" & Me.Text = Val(txtQid.

Text = "Prof.txtAns.Rows(0).Rows(0).txtb.OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & txtQid.Rows(0).Rows(0).Fill(d1) If d1.txtd.Rows(0).Item("A_AnsB") Me.txta.txtPoint.txtc.Item("A_QuestionID") Me.txtPoint.Text = d1.Text & "' and A_Category ='" & txtCategory.txtd.Count <> 0 Then QuestID.Item("A_CorrectAns") 'Me.txtc." Then Dim check As New OleDb.TextChanged If Val(txtNumQuestion.Item("A_AnsB") Me.Item("Stud_Answer") Me.Rows(0).txtc.Item("A_Question") Me. con) Dim d1 As New DataTable check.Rows(0).Rows(0).Rows.Rows(0).Text = d1.Text & " and AssessmentNum = '" & txtAssessmentNum. Ed.txtQuestion.Rows(0).Item("A_AnsD") 'Me.Text & "' and A_Specialization ='" & txtspec.Item("Stud_Answer") Me.Text = d1.Item("A_AnsC") Me.Rows(0).Count <> 0 Then Me.txtb.Item("A_AnsC") Me.Text <> "0" And lblsec.Item("A_AnsB") Me.System.Text) <> Val(txtQid.txta. con) Dim d1 As New DataTable check.Text & "'".Rows(0).Item("Points") End If ElseIf txtCategory.Text) & " and AssessmentNum = '" & txtAssessmentNum.Text = d1.Text & "' and A_Category ='" & txtCategory.Text & "' and A_Category ='" & txtCategory.Text = d1.txta.Text = "Gen.Item("A_AnsA") Me.Text = d1.Text = d1.Fill(d1) If d1.Text = "Major" Then Dim check As New OleDb.Item("A_Question") Me. Ed.OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & Val(txtQid.Rows.Item("A_Question") Me.Item("A_AnsD") Me.Rows(0). ByVal e As System.Text = d1.Rows.Item("A_CorrectAns") 'Me.Text = "0" Then .Item("A_AnsA") Me.Text = d1.txtCorrectAnswer.Text = d1.txtd.Text = d1.Item("A_AnsA") Me.Item("A_CorrectAns") End If ElseIf txtCategory.Count <> 0 Then QuestID.Rows(0).txtQuestion." Then Dim check As New OleDb.Text = d1.Text = d1.Text = d1.Item("A_AnsD") 'Me.Text = d1.Item("A_AnsC") Me.OleDbDataAdapter("Select * from qryGeneratedQuest where ID = " & Val(txtQid. ByVal e As System.txtQuestion.Text = d1.Rows(0).Object.Text & "'".txtCorrectAnswer.Rows(0).Rows(0).Text = d1.Text = d1.Rows(0).Text) And lblmin.Text = d1.Text = d1. con) Dim d1 As New DataTable check.Text = d1.txtAns.Rows(0).Text & "'".EventArgs) Handles lblsec.TextChanged ' On Error Resume Next If txtCategory.Rows(0).Item("A_QuestionID") Me.txtCorrectAnswer.Text = d1.Item("Points") End If End If End Sub Private Sub lblSec_TextChanged(ByVal sender As Object.Rows(0).Text) & " and AssessmentNum = '" & txtAssessmentNum.Rows(0).Text = d1.Fill(d1) If d1.EventArgs) Handles txtQid.Text = d1.txtb.Rows(0).Rows(0).

1 lblsec.Text lblsec.Text & "'".Text & "')" cmd. Category.Text & "'.Text = "0" End If If txtCategory.txtCategory.'-')" cmd.'" & MainForm. Points.Text <> "Major" Then Dim check2 As New OleDb.Text & "'.Text = "" txtPoint." & Val(txtPoint. Stud_Answer.State = ConnectionState.txtCategory. con) Dim dt2 As New DataTable check2.lblAssNum.Text) <> Val(txtQid. " & Val(QuestID.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.lblmin.Text) .Text) = Val(txtNumQuestion.Text) And lblmin.Close() End If Else Dim check2 As New OleDb.OleDbCommand cmd. Specialization) VALUES (" & Val(txtQid.Text & "' and QuestionNumber = " & Val(txtQid.'" & Me.Text = "0" Then If txtCategory.Close() End If End If txtQid.Text = "0" End If If Val(txtQid. Specialization) VALUES (" & Val(txtQid.txtAns.Text = "0" And lblsec.Text) & ".'" & Me.Fill(dt2) If dt2.lblAssNum.Rows.'" & txtspec.Text 'save answer when time is up per question If Not con.Text & "'.Text) & ".'" & MainForm. QuestionID.Rows.Connection = con cmd.'" & MainForm.lblReviewerID.Text & "' and QuestionNumber = " & Val(txtQid. QuestionID. '" & Me.Text) + 1 txtAns.lblAssNum.'" & MainForm.Text = "0" And lblsec.lblAssNum.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.Text & "'".Text & "'.Text) & ". ReviewerID.Text & "' and AssessmentNumber ='" & MainForm.Text = txtmin.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.lblReviewerID.Text & "'.txtAns.txtCategory.Text = Val(txtQid. Stud_Answer. con) Dim dt2 As New DataTable check2.Text & "'.Count = 0 Then Dim cmd As New OleDb.Text & "'.Text & "'.Text = "" Then txtAns.Text) & " and Category ='" & Me. AssessmentNumber.Text <> "Major" Then Dim check2 As New OleDb.Open Then con.ExecuteNonQuery() ' con.Fill(dt2) If dt2.Text) And lblmin. Points.Text & "' and AssessmentNumber ='" & MainForm.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.OleDbCommand cmd.ExecuteNonQuery() ' con. '" & Me.Text) & " and Category ='" & Me. ReviewerID.OleDbDataAdapter("Select * . " & Val(QuestID. AssessmentNumber.Text = "0" Then lblmin.Count = 0 Then Dim cmd As New OleDb.Text = Val(lblmin.lblReviewerID." & Val(txtPoint.lblReviewerID.Text = 59 ElseIf Val(txtNumQuestion.Text) & ".Connection = con cmd.txtCategory.Text = txtsec.Open() End If If txtAns. Category.Text) & ".Text = "-" txtPoint.Text) & ".

ByVal e As System.OleDbDataAdapter("Select * from tblStudentQuestion where ReviewerID = '" & MainForm.lblAssNum. " & Val(QuestID.Count = 1 Then score = d1. con) Dim dt2 As New DataTable check2.Text & "')" cmd. con) Dim d1 As New DataTable check.Text) & ".lblAssNum.'" & Me.Text & "'.Count = 0 Then Dim cmd As New OleDb.Item("SumOfPoints") lblsec.Text & "'.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.txtAns.Text & "'." & Val(txtPoint. con) Dim dt2 As New DataTable check2. Specialization) VALUES (" & Val(txtQid.Rows.Close() End If Else Dim check2 As New OleDb." & Val(txtPoint.Text & "'. '" & Me.lblAssNum.Fill(d1) If d1. AssessmentNumber. " & Val(QuestID.OleDbCommand cmd.Text) & ".Click If txtCategory.'-')" cmd.lblReviewerID.Text & "'".Text & "'.CommandText = "INSERT INTO tblStudentQuestion (QuestionNumber.OleDbDataAdapter("Select * from qryTotalScore where ReviewerID ='" & Me.Fill(dt2) If dt2. Points. AssessmentNumber.Text & "'.Text) & " and Category ='" & Me.Enabled = False If txtCategory.'" & MainForm.txtCategory.Object.Text & "'".txtCategory.from tblStudentQuestion where ReviewerID = '" & MainForm.'" & MainForm.lblReviewerID.lblReviewerID.Text = "0" .Text & "' and QuestionNumber = " & Val(txtQid.Text) & ".'" & MainForm.Fill(dt2) If dt2.Connection = con cmd.Text <> "Major" Then totScoreEd() Else totScoreMajor() End If End Sub Private Sub totScoreEd() Dim score As Integer Dim check As New OleDb.Text & "'".Text & "'.Text) & ".txtRevID.Text) & " and Category ='" & Me. ReviewerID. '" & Me.Text & "' and AssessmentNumber ='" & MainForm.Text) & ".Text & "' and AssessmentNumber ='" & MainForm. Category.Text & "'.Rows(0). Stud_Answer.'" & txtspec.'" & Me.Text & "' and Category ='" & txtCategory. QuestionID.'" & MainForm. QuestionID.lblAssNum.EventArgs) Handles Button7.ExecuteNonQuery() ' con.txtAns.Count = 0 Then Dim cmd As New OleDb. ReviewerID.lblAssNum.txtCategory. Specialization) VALUES (" & Val(txtQid.OleDbCommand cmd.ExecuteNonQuery() ' con. Stud_Answer. Points.Rows.txtCategory.lblReviewerID. Category.Text) & ".Rows.Connection = con cmd.Close() End If End If Timer1.Text & "' and AssessmentNumber ='" & MainForm.Text & "' and QuestionNumber = " & Val(txtQid.Text <> "Major" Then totScoreEd() Else totScoreMajor() End If End If End Sub Private Sub Button7_Click(ByVal sender As System.

Text = "0" resultText = "Your score is " & score & " out of " & txtNumQuestion.Text & "'.Count) = 0 Then Try sql = "INSERT INTO tblExamInfo (ReviewerID.Enabled = True Me.Text & "" examPercent = (score / Val(txtNumQuestion.'" & studentLevel & "'.resultText = "Your score is " & score & " out of " & txtNumQuestion.Count = 1 Then score = d1.Information.lblReviewerID.'" & examPercent & "'.'" & Format(Now.Text & "" examPercent = (score / Val(txtNumQuestion.Button5.TextBox1.Rows.Text & "'.ExecuteNonQuery If i > 0 Then 'MsgBox("Question Added".txtNumQuestion.Text & "'".Text With frmResult . con) Dim i As Integer i = cmd.Text & "'.Text & "' and AssessmentNumber ='" & MainForm.Critical. con) Dim d5 As New DataTable check5. "dd-MMM-yy") & "'.Text & "' and Category ='" & txtCategory.ShowDialog() End With 'MsgBox("TIME'S UP!!!! Your score is " & score & " out of " & txtNumQuestion.Rows(0).OleDbDataAdapter("Select * from qryTotalScore where ReviewerID ='" & Me.txtRevID.Text & "'". Category.lblAssNum.'" & score & "'.'" & txtCategory. AssessmentNumber.Text)) * 100 If examPercent <= 50 Then studentLevel = "Beginner" ElseIf examPercent > 50 And examPercent <= 70 Then studentLevel = "Intermediate" ElseIf examPercent > 70 And examPercent <= 100 Then studentLevel = "Advanced" End If Dim check5 As New OleDb.Text & "' and Specialization ='" & txtspec.'" & MainForm.Item("SumOfPoints") lblsec.Text = txtRevID.lblAssNum. MsgBoxStyle. StudScore.Message) Finally cmd. ExamDate.lblReviewerID. "Question Information") Else MsgBox("Failed to add Question". ScorePercentage. StudLevel.Text)) * 100 If examPercent <= 50 Then .Fill(d5) If Val(d5.Text .Text & "") End If End Sub Private Sub totScoreMajor() Dim score As Integer Dim check As New OleDb. MsgBoxStyle. con) Dim d1 As New DataTable check. Specialization) VALUES ('" & MainForm.'-')" ConnectDB() cmd = New OleDbCommand(sql.lblAssNum.OleDbDataAdapter("Select * from tblExamInfo where ReviewerID = '" & MainForm.Rows.Close() resultText = "You got " & score & " out of " & Me.Fill(d1) If d1. "Question Information") End If Catch ex As Exception MsgBox(ex.Text & "' and Category ='" & txtCategory.Close() End Try End If Me.Dispose() con.Text & "' and AssessmentNumber = '" & MainForm.

con) Dim d5 As New DataTable check5.Text = txtRevID.'" & examPercent & "'.OleDbDataAdapter("select * from tblGeneratedQuestion where AssessmentNum='" & MainForm.Text & "' and AssessmentNumber = '" & MainForm.OleDbDataAdapter("Select * from tblExamInfo where ReviewerID = '" & MainForm.'" & score & "'.OleDbDataAdapter("select * from tblGeneratedQuestion where AssessmentNum='" & MainForm.ExecuteNonQuery If i > 0 Then 'MsgBox("Question Added". con) Dim i As Integer i = cmd.Rows.Text & "' and Category='" & txtCategory.Fill(dt2) If dt2.Critical. ByVal e As System.Close() End Try End If Me. "Question Information") Else MsgBox("Failed to add Question".'" & studentLevel & "'.lblAssNum.Text & "") End If End Sub Private Sub txtCategory_TextChanged(ByVal sender As System.ShowDialog() End With 'MsgBox("TIME'S UP!!!! Your score is " & score & " out of " & txtNumQuestion."Beginner" studentLevel = ElseIf examPercent > 50 And examPercent <= 70 Then studentLevel = "Intermediate" ElseIf examPercent > 70 And examPercent <= 100 Then studentLevel = "Advanced" End If Dim check5 As New OleDb. con) .Count End If Else Dim check2 As New OleDb.Information.Fill(d5) If Val(d5.Count <> 0 Then txtNumQuestion.Text & "' and Category ='" & txtCategory.lblReviewerID.'" & Format(Now.Text & "'. con) Dim dt2 As New DataTable check2. Category.TextBox1.Close() resultText = "You got " & score & " out of " & Me.lblAssNum.TextChanged If txtCategory.Text & "'".lblAssNum.Object.Count) = 0 Then Try sql = "INSERT INTO tblExamInfo (ReviewerID. ExamDate.lblReviewerID.EventArgs) Handles txtCategory.Text & "' and Category ='" & txtCategory. "dd-MMM-yy") & "'. StudScore.Button5.lblAssNum.Text & "' and Specialization ='" & txtspec. Specialization) VALUES ('" & MainForm.'" & MainForm.Text & "'". StudLevel.Text & "'".Enabled = True Me.Text = dt2.Text & "' and Specialization ='" & txtspec.Text & "'.'" & txtCategory. AssessmentNumber.Text .Text <> "Major" Then Dim check2 As New OleDb.Text & "'.Rows. MsgBoxStyle.Text With frmResult . ScorePercentage.'-')" ConnectDB() cmd = New OleDbCommand(sql.txtNumQuestion. MsgBoxStyle. "Question Information") End If Exception Catch ex As MsgBox(ex.Rows.Dispose() con.Message) Finally cmd.

Count <> 0 txtNumQuestion.Rows.Fill(dt2) If dt2.Then Dim dt2 As New DataTable check2.Rows.Text = dt2.Count End If End If End Sub End Class .

. .

Click this button to exit.36. Click this Button to exit. 37. . Click this button to print the generated questions. 40. Click this button to search for the assessment log of the reviewers. 39 40 39. Click this Button to generate the questions. 38.

Click this button to exit. 44. 42.41 43 41. 42 44 . Click this button to view Summary Result. 43. Click this button to view Individual result. Click this button to exit.