Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 189

Public Class Form1

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
Timer1.Start()
End Sub

Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Timer1.Tick
ProgressBar1.Increment(4)
If ProgressBar1.Value = 100 Then
Timer1.Stop()
Form2.Show()
Me.Hide()
End If

End Sub
End Class

Public Class Form2

Private Sub PictureBox4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox4.MouseHover
PictureBox4.Cursor = Cursors.Hand

End Sub

Private Sub PictureBox3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox3.MouseHover
PictureBox3.Cursor = Cursors.Hand
End Sub

Private Sub PictureBox2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox2.MouseHover
PictureBox2.Cursor = Cursors.Hand
End Sub

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox2.Click
Form3.Show()
Me.Hide()
End Sub

Private Sub PictureBox4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox4.Click
Form4.Show()
Me.Hide()
End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox3.Click
Form5.Show()
Me.Hide()
End Sub
Private Sub PictureBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles PictureBox1.Click
Form23.Show()
Me.Hide()
End Sub

Private Sub PictureBox1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox1.MouseHover
PictureBox1.Cursor = Cursors.Hand
End Sub

End Class

Imports MySql.Data.MySqlClient
Imports System.Drawing
Imports System.IO
Public Class Form3
Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles PictureBox7.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where username = '" & TextBox1.Text & "' and
password = '" & TextBox2.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While

If count >= 1 Then


load_table()

Form6.Show()
Form6.Label1.Text = reader.GetString("last_name") & "," & " " &
reader.GetString("first_name")
Form11.TextBox1.Text = reader.GetString("username")
Form11.TextBox2.Text = reader.GetString("password")
Form16.id.Text = reader.GetString("student_id")
Form16.last.Text = reader.GetString("last_name")
Form16.first.Text = reader.GetString("first_name")
Form16.middle.Text = reader.GetString("middle_name")
Form16.course.Text = reader.GetString("course")
Form16.cn.Text = reader.GetString("contact_no")
Form16.address.Text = reader.GetString("address")
Form16.year.Text = reader.GetString("year")
Form16.sec.Text = reader.GetString("section")
Form16.code1.Text = reader.GetString("code1")
Form16.code2.Text = reader.GetString("code2")
Form16.code3.Text = reader.GetString("code3")
Form16.code4.Text = reader.GetString("code4")
Form16.code5.Text = reader.GetString("code5")
Form16.code6.Text = reader.GetString("code6")
Form16.code7.Text = reader.GetString("code7")
Form16.code8.Text = reader.GetString("code8")
Form16.code9.Text = reader.GetString("code9")
Form16.code10.Text = reader.GetString("code10")
Form16.code11.Text = reader.GetString("code11")
Form16.code12.Text = reader.GetString("code12")
Form16.s1.Text = reader.GetString("sub1")
Form16.s2.Text = reader.GetString("sub2")
Form16.s3.Text = reader.GetString("sub3")
Form16.s4.Text = reader.GetString("sub4")
Form16.s5.Text = reader.GetString("sub5")
Form16.s6.Text = reader.GetString("sub6")
Form16.s7.Text = reader.GetString("sub7")
Form16.s8.Text = reader.GetString("sub8")
Form16.sub9.Text = reader.GetString("sub9")
Form16.s10.Text = reader.GetString("sub10")
Form16.s11.Text = reader.GetString("sub11")
Form16.s12.Text = reader.GetString("sub12")
Form16.u1.Text = reader.GetString("uni1")
Form16.u2.Text = reader.GetString("uni2")
Form16.u3.Text = reader.GetString("uni3")
Form16.u4.Text = reader.GetString("uni4")
Form16.u5.Text = reader.GetString("uni5")
Form16.u6.Text = reader.GetString("uni6")
Form16.u7.Text = reader.GetString("uni7")
Form16.u8.Text = reader.GetString("uni8")
Form16.unit9.Text = reader.GetString("uni9")
Form16.u10.Text = reader.GetString("uni10")
Form16.u11.Text = reader.GetString("uni11")
Form16.u12.Text = reader.GetString("uni12")
Form16.t1.Text = reader.GetString("time1")
Form16.t2.Text = reader.GetString("time2")
Form16.t3.Text = reader.GetString("time3")
Form16.t4.Text = reader.GetString("time4")
Form16.t5.Text = reader.GetString("time5")
Form16.t6.Text = reader.GetString("time6")
Form16.t7.Text = reader.GetString("time7")
Form16.t8.Text = reader.GetString("time8")
Form16.time9.Text = reader.GetString("time9")
Form16.t10.Text = reader.GetString("time10")
Form16.t11.Text = reader.GetString("time11")
Form16.t12.Text = reader.GetString("time12")
Form16.d1.Text = reader.GetString("day1")
Form16.d2.Text = reader.GetString("day2")
Form16.d3.Text = reader.GetString("day3")
Form16.d4.Text = reader.GetString("day4")
Form16.d5.Text = reader.GetString("day5")
Form16.d6.Text = reader.GetString("day6")
Form16.d7.Text = reader.GetString("day7")
Form16.d8.Text = reader.GetString("day8")
Form16.days9.Text = reader.GetString("day9")
Form16.d10.Text = reader.GetString("day10")
Form16.d11.Text = reader.GetString("day11")
Form16.d12.Text = reader.GetString("day12")
Form16.r1.Text = reader.GetString("room1")
Form16.r2.Text = reader.GetString("room2")
Form16.r3.Text = reader.GetString("room3")
Form16.r4.Text = reader.GetString("room4")
Form16.r5.Text = reader.GetString("room5")
Form16.r6.Text = reader.GetString("room6")
Form16.r7.Text = reader.GetString("room7")
Form16.r8.Text = reader.GetString("room8")
Form16.room9.Text = reader.GetString("room9")
Form16.r10.Text = reader.GetString("room10")
Form16.r11.Text = reader.GetString("room11")
Form16.r12.Text = reader.GetString("room12")

Form19.lblname.Text = reader.GetString("last_name") & "," & " " &


reader.GetString("first_name")
Form19.sems.Text = reader.GetString("sem")
Form19.cor.Text = reader.GetString("course")
Form19.yea.Text = reader.GetString("year") & "," & " " & reader.GetString("section")
Form19.lblid.Text = reader.GetString("student_id")
Form19.code1.Text = reader.GetString("code1")
Form19.code2.Text = reader.GetString("code2")
Form19.code3.Text = reader.GetString("code3")
Form19.code4.Text = reader.GetString("code4")
Form19.code5.Text = reader.GetString("code5")
Form19.code6.Text = reader.GetString("code6")
Form19.code7.Text = reader.GetString("code7")
Form19.code8.Text = reader.GetString("code8")
Form19.code9.Text = reader.GetString("code9")
Form19.code10.Text = reader.GetString("code10")
Form19.code11.Text = reader.GetString("code11")
Form19.code12.Text = reader.GetString("code12")

Form19.s1.Text = reader.GetString("sub1")
Form19.f1.Text = reader.GetString("grade")
Form19.r1.Text = reader.GetString("marks")
Form19.m1.Text = reader.GetString("grade1")

Form19.s2.Text = reader.GetString("sub2")
Form19.f2.Text = reader.GetString("grade2")
Form19.r2.Text = reader.GetString("marks2")
Form19.m2.Text = reader.GetString("grade22")

Form19.s3.Text = reader.GetString("sub3")
Form19.f3.Text = reader.GetString("grade3")
Form19.r3.Text = reader.GetString("marks3")
Form19.m3.Text = reader.GetString("grade33")

Form19.s4.Text = reader.GetString("sub4")
Form19.f4.Text = reader.GetString("grade4")
Form19.r4.Text = reader.GetString("marks4")
Form19.m4.Text = reader.GetString("grade44")
Form19.s5.Text = reader.GetString("sub5")
Form19.f5.Text = reader.GetString("grade5")
Form19.r5.Text = reader.GetString("marks5")
Form19.m5.Text = reader.GetString("grade55")

Form19.s6.Text = reader.GetString("sub6")
Form19.f6.Text = reader.GetString("grade6")
Form19.r6.Text = reader.GetString("marks6")
Form19.m6.Text = reader.GetString("grade66")

Form19.s7.Text = reader.GetString("sub7")
Form19.f7.Text = reader.GetString("grade7")
Form19.r7.Text = reader.GetString("marks7")
Form19.m7.Text = reader.GetString("grade77")

Form19.s8.Text = reader.GetString("sub8")
Form19.f8.Text = reader.GetString("grade8")
Form19.r8.Text = reader.GetString("marks8")
Form19.m8.Text = reader.GetString("grade88")

Form19.sub9.Text = reader.GetString("sub9")
Form19.f9.Text = reader.GetString("grade9")
Form19.r9.Text = reader.GetString("marks9")
Form19.m9.Text = reader.GetString("grade99")

Form19.s10.Text = reader.GetString("sub10")
Form19.f10.Text = reader.GetString("grade10")
Form19.r10.Text = reader.GetString("marks10")
Form19.m10.Text = reader.GetString("grade100")

Form19.s11.Text = reader.GetString("sub11")
Form19.f11.Text = reader.GetString("grade11")
Form19.r11.Text = reader.GetString("marks11")
Form19.m11.Text = reader.GetString("grade111")

Form19.s12.Text = reader.GetString("sub12")
Form19.f12.Text = reader.GetString("grade12")
Form19.r12.Text = reader.GetString("marks12")
Form19.m12.Text = reader.GetString("grade112")

Form19.u1.Text = reader.GetString("uni1")
Form19.u2.Text = reader.GetString("uni2")
Form19.u3.Text = reader.GetString("uni3")
Form19.u4.Text = reader.GetString("uni4")
Form19.u5.Text = reader.GetString("uni5")
Form19.u6.Text = reader.GetString("uni6")
Form19.u7.Text = reader.GetString("uni7")
Form19.u8.Text = reader.GetString("uni8")
Form19.unit9.Text = reader.GetString("uni9")
Form19.u10.Text = reader.GetString("uni10")
Form19.u11.Text = reader.GetString("uni11")
Form19.u12.Text = reader.GetString("uni12")
TextBox1.Text = ""
TextBox2.Text = ""

Me.Hide()
Else
MessageBox.Show("Invalid Account/Password")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End If
conn.Close()

Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox6.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Form2.Show()
Me.Hide()
End Sub

Private Sub PictureBox6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox6.MouseHover
PictureBox6.Cursor = Cursors.Hand
End Sub

Private Sub PictureBox7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox7.MouseHover
PictureBox7.Cursor = Cursors.Hand
End Sub
Private Sub load_table()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try

conn.Open()
Dim command As New MySqlCommand("select * from gradingdb.std_info where
username = @username", conn)
command.Parameters.Add("@username", MySqlDbType.VarChar).Value = TextBox1.Text

Dim table As New DataTable()


Dim adapter As New MySqlDataAdapter(command)

adapter.Fill(table)

If table.Rows.Count() <= 0 Then

MessageBox.Show("No Image For This Id")


Else

TextBox1.Text = table.Rows(0)(0).ToString()
Dim img() As Byte

img = table.Rows(0)(3)

Dim ms As New MemoryStream(img)

Form6.PictureBox2.Image = Image.FromStream(ms)

End If
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Imports System.Drawing

Public Class Form4


Dim conn As MySqlConnection
Dim command As MySqlCommand

Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox7.Click

conn = New MySqlConnection


conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.admin where username = '" + TextBox1.Text + "' and
password = '" + TextBox2.Text + "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While
If count = 1 Then
load_table()
Form25.TextBox1.Text = reader.GetString("username")
Form25.TextBox2.Text = reader.GetString("password")
Form25.fn.Text = reader.GetString("name")
Form25.ln.Text = reader.GetString("lname")
Form25.mn.Text = reader.GetString("mname")

Form8.Show()
Me.Hide()
Form8.Label1.Text = reader.GetString("lname") & "," & " " & reader.GetString("name")
TextBox1.Text = ""
TextBox2.Text = ""

Else
MessageBox.Show("Invalid Account/Password")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End If
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub PictureBox7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox7.MouseHover
PictureBox7.Cursor = Cursors.Hand
End Sub

Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox6.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Form2.Show()
Me.Hide()
End Sub
Private Sub load_table()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try

conn.Open()
Dim command As New MySqlCommand("select * from gradingdb.admin where username
= @username", conn)
command.Parameters.Add("@username", MySqlDbType.VarChar).Value = TextBox1.Text

Dim table As New DataTable()

Dim adapter As New MySqlDataAdapter(command)

adapter.Fill(table)

If table.Rows.Count() <= 0 Then


MessageBox.Show("No Image For This Id")
Else

TextBox1.Text = table.Rows(0)(0).ToString()
Dim img() As Byte

img = table.Rows(0)(1)

Dim ms As New MemoryStream(img)

Form8.PictureBox2.Image = Image.FromStream(ms)

End If
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Imports System.Drawing
Public Class Form5
Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles PictureBox6.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Form2.Show()
Me.Hide()
End Sub

Private Sub PictureBox6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox6.MouseHover
PictureBox6.Cursor = Cursors.Hand
End Sub

Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox7.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "select * from gradingdb.teacher where username = '" & TextBox1.Text & "' and
password = '" & TextBox2.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While

If count >= 1 Then


load_table()

Form13.TextBox1.Text = reader.GetString("username")
Form13.TextBox2.Text = reader.GetString("password")
Form15.idn.Text = reader.GetString("id")
Form15.last.Text = reader.GetString("lname")
Form15.first.Text = reader.GetString("fname")
Form15.middle.Text = reader.GetString("mname")
Form15.addr.Text = reader.GetString("address")
Form15.cd1.Text = reader.GetString("code1")
Form15.cd2.Text = reader.GetString("code2")
Form15.cd3.Text = reader.GetString("code3")
Form15.cd4.Text = reader.GetString("code4")
Form15.cd5.Text = reader.GetString("code5")
Form15.cd6.Text = reader.GetString("code6")
Form15.cd7.Text = reader.GetString("code7")
Form15.cd8.Text = reader.GetString("code8")
Form15.cd9.Text = reader.GetString("code9")
Form15.cd10.Text = reader.GetString("code10")
Form15.cd11.Text = reader.GetString("code11")
Form15.cd12.Text = reader.GetString("code12")

Form15.ti1.Text = reader.GetString("time1")
Form15.ti2.Text = reader.GetString("time2")
Form15.ti3.Text = reader.GetString("time3")
Form15.ti4.Text = reader.GetString("time4")
Form15.ti5.Text = reader.GetString("time5")
Form15.ti6.Text = reader.GetString("time6")
Form15.ti7.Text = reader.GetString("time7")
Form15.ti8.Text = reader.GetString("time8")
Form15.ti9.Text = reader.GetString("time9")

Form15.da1.Text = reader.GetString("day1")
Form15.da2.Text = reader.GetString("day2")
Form15.da3.Text = reader.GetString("day3")
Form15.da4.Text = reader.GetString("day4")
Form15.da5.Text = reader.GetString("day5")
Form15.da6.Text = reader.GetString("day6")
Form15.da7.Text = reader.GetString("day7")
Form15.da8.Text = reader.GetString("day8")
Form15.da9.Text = reader.GetString("day9")
Form15.da10.Text = reader.GetString("day10")
Form15.da11.Text = reader.GetString("day11")
Form15.da12.Text = reader.GetString("day12")

Form15.ra1.Text = reader.GetString("room1")
Form15.ra2.Text = reader.GetString("room2")
Form15.ra3.Text = reader.GetString("room3")
Form15.ra4.Text = reader.GetString("room4")
Form15.ra5.Text = reader.GetString("room5")
Form15.ra6.Text = reader.GetString("room6")
Form15.ra7.Text = reader.GetString("room7")
Form15.ra8.Text = reader.GetString("room8")
Form15.ra9.Text = reader.GetString("room9")
Form15.ra10.Text = reader.GetString("room10")
Form15.ra11.Text = reader.GetString("room11")
Form15.ra12.Text = reader.GetString("room12")
TextBox1.Text = ""
TextBox2.Text = ""

Form10.Show()
Form10.Label1.Text = reader.GetString("lname") & "," & " " &
reader.GetString("fname")
Me.Hide()
Else
MessageBox.Show("Invalid Account/Password")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End If
conn.Close()

Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub PictureBox7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles PictureBox7.MouseHover
PictureBox7.Cursor = Cursors.Hand
End Sub
Private Sub load_table()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try

conn.Open()
Dim command As New MySqlCommand("select * from gradingdb.teacher where username
= @username", conn)
command.Parameters.Add("@username", MySqlDbType.VarChar).Value = TextBox1.Text

Dim table As New DataTable()

Dim adapter As New MySqlDataAdapter(command)

adapter.Fill(table)

If table.Rows.Count() <= 0 Then

MessageBox.Show("No Image For This Id")


Else
TextBox1.Text = table.Rows(0)(0).ToString()
Dim img() As Byte

img = table.Rows(0)(1)

Dim ms As New MemoryStream(img)

Form10.PictureBox2.Image = Image.FromStream(ms)

End If
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub
End Class

Public Class Form6

Private Sub PictureBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Form2.Show()
Me.Hide()
End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click

Form11.Show()
Me.Hide()
End Sub
Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button7.Click
Form16.Show()
Me.Hide()
End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox3.Click
If Form11.TextBox2.Text = "password" Then
If MessageBox.Show("Please Change Your Password Before You Sign Out", "Confirmation",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Me.Show()
Else
Me.Show()

End If
Else
Me.Hide()
Form3.Show()
End If

End Sub
Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button8.Click
Form19.Show()
Me.Hide()
End Sub
End Class

Imports MySql.Data.MySqlClient
Imports System.IO

Public Class Form7


Dim conn As MySqlConnection
Dim command As MySqlCommand
Dim a As OpenFileDialog = New OpenFileDialog

Private Sub TextBox17_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles user.TextChanged
user.Text = id.Text
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
If id.Text = "" Or fname.Text = "" Or lname.Text = "" Or mname.Text = "" Or day.Text = "" Or
month.Text = "" Or ye.Text = "" Or contact.Text = "" Or course.Text = "" Or year.Text = "" Or
section.Text = "" Or address.Text = "" Or elem.Text = "" Or san.Text = "" Or year1.Text = "" Or
sec.Text = "" Or sanpa.Text = "" Or year2.Text = "" Then
MessageBox.Show("All Fields Required")
Else

conn = New MySqlConnection


conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
Dim mstream As New System.IO.MemoryStream()
PictureBox2.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim arrimage() As Byte = mstream.GetBuffer()
mstream.Close()
conn.Open()

Dim query As String


query = " insert into gradingdb.std_info
(student_id,last_name,first_name,middle_name,course,year,section,contact_no,month,day,old,ad
dress,gender,username,password,elementary,san,year_graduated,secondary,sanpa,year_graduat
ed1,code1,code2,code3,code4,code5,code6,code7,code8,code9,code10,code11,code12,sub1,sub
2,sub3,sub4,sub5,sub6,sub7,sub8,sub9,sub10,sub11,sub12,uni1,uni2,uni3,uni4,uni5,uni6,uni7,un
i8,uni9,uni10,uni11,uni12,time1,time2,time3,time4,time5,time6,time7,time8,time9,time10,time1
1,time12,day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,room1,room2,roo
m3,room4,room5,room6,room7,room8,room9,room10,room11,room12,sem,image) values ('" &
id.Text & "' ,'" & lname.Text & "' , '" & fname.Text & "','" & mname.Text & "','" & course.Text & "','"
& year.Text & "','" & section.Text & "','" & contact.Text & "','" & month.Text & "','" & day.Text & "','"
& ye.Text & "','" & address.Text & "', '" & gen.Text & "' ,'" & user.Text & "','" & pass.Text & "','" &
elem.Text & "','" & san.Text & "','" & year1.Text & "','" & sec.Text & "','" & sanpa.Text & "','" &
year2.Text & "','" & code1.Text & "','" & code2.Text & "','" & code3.Text & "','" & code4.Text & "','"
& code5.Text & "','" & code6.Text & "','" & code7.Text & "','" & code8.Text & "','" & code9.Text &
"','" & code10.Text & "','" & code11.Text & "','" & code12.Text & "','" & s1.Text & "','" & s2.Text &
"','" & s3.Text & "','" & s4.Text & "','" & s5.Text & "','" & s6.Text & "','" & s7.Text & "','" & s8.Text &
"','" & sub9.Text & "','" & s10.Text & "','" & s11.Text & "','" & s12.Text & "','" & u1.Text & "','" &
u2.Text & "','" & u3.Text & "','" & u4.Text & "','" & u5.Text & "','" & u6.Text & "','" & u7.Text & "','" &
u8.Text & "','" & unit9.Text & "','" & u10.Text & "','" & u11.Text & "','" & u12.Text & "','" & t1.Text &
"','" & t2.Text & "','" & t3.Text & "','" & t4.Text & "','" & t5.Text & "','" & t6.Text & "','" & t7.Text &
"','" & t8.Text & "','" & time9.Text & "','" & t10.Text & "','" & t11.Text & "','" & t12.Text & "','" &
d1.Text & "','" & d2.Text & "','" & d3.Text & "','" & d4.Text & "','" & d5.Text & "','" & d6.Text & "','" &
d7.Text & "','" & d8.Text & "','" & days9.Text & "','" & d10.Text & "','" & d11.Text & "','" & d12.Text
& "','" & r1.Text & "','" & r2.Text & "','" & r3.Text & "','" & r4.Text & "','" & r5.Text & "','" & r6.Text &
"','" & r7.Text & "','" & r8.Text & "','" & room9.Text & "','" & r10.Text & "','" & r11.Text & "','" &
r12.Text & "','" & sem.Text & "',@image)"
command = New MySqlCommand(query, conn)
command.Parameters.AddWithValue("@image", arrimage)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
MessageBox.Show("Register Success")
PictureBox2.Image = My.Resources.h
sem.Text = ""
month.Text = ""
day.Text = ""
gen.Text = ""
course.Text = ""
year.Text = ""
section.Text = ""
lname.Text = ""
fname.Text = ""
mname.Text = ""
ye.Text = ""
contact.Text = ""
address.Text = ""
elem.Text = ""
san.Text = ""
year1.Text = ""
year2.Text = ""
sec.Text = ""
sanpa.Text = ""
code1.Text = ""
code2.Text = ""
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code11.Text = ""
code12.Text = ""

s1.Text = ""
s2.Text = ""
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = ""
u2.Text = ""
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
time9.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
days9.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
room9.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""

id.Text = "04141-"
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub id_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles id.TextChanged
user.Text = id.Text
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Try
a.Filter = " Image Files | *.jpg"
If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox2.Image = Image.FromFile(a.FileName)

End If
Catch ex As Exception

End Try
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
sem.Text = ""
month.Text = ""
day.Text = ""
gen.Text = ""
course.Text = ""
year.Text = ""
section.Text = ""
lname.Text = ""
fname.Text = ""
mname.Text = ""
ye.Text = ""
contact.Text = ""
address.Text = ""
elem.Text = ""
san.Text = ""
year1.Text = ""
year2.Text = ""
sec.Text = ""
sanpa.Text = ""
code1.Text = ""
code2.Text = ""
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code11.Text = ""
code12.Text = ""

s1.Text = ""
s2.Text = ""
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = ""
u2.Text = ""
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
time9.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
days9.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
room9.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
Form22.Show()
Me.Hide()
End Sub

Private Sub bscs()

If course.Text = "BSCS" And sem.Text = "1st" And year.Text = "1" Then

code1.Text = "GE101"
code2.Text = "GE111"
code3.Text = "GE201"
code4.Text = "CS101"
code5.Text = "CS111"
code6.Text = "GE301"
code7.Text = "GE121"
code8.Text = "PE101"
code9.Text = "NS101"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 1"


s2.Text = "FILIPINO 1"
s3.Text = "COLLEGE ALGEBRA"
s4.Text = "COM SCIE FUNDAMENTALS"
s5.Text = "COMPUTER PROGRAMMING 1"
s6.Text = "PHILLIPINE HISTORY"
s7.Text = "PHILOSOPHY OF MAN"
s8.Text = "PHYSICAL EDUCATION 1"
sub9.Text = "NSTP1"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = "3"
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "1" Then
code1.Text = "GE102"
code2.Text = "GE112"
code3.Text = "GE202"
code4.Text = "CS121"
code5.Text = "CS112"
code6.Text = "GE122"
code7.Text = "GE302"
code8.Text = "PE102"
code9.Text = "NS102"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 2"


s2.Text = "FILIPINO 2"
s3.Text = "PLANE TRIGONOMETRY"
s4.Text = "MICROSOFT OFFICE WITH INTERNET"
s5.Text = "COMPUTER PROGRAMMING 2"
s6.Text = "LOGIC"
s7.Text = "PHILIPPINE GOVT WITH NEW CONSTITUTION"
s8.Text = "PHYSICAL EDUCATION 2"
sub9.Text = "NSTP2"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = "3"
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "2" Then

code1.Text = "GE103"
code2.Text = "GE113"
code3.Text = "GE211"
code4.Text = "CS123"
code5.Text = "CS203"
code6.Text = "CS114"
code7.Text = "CS113"
code8.Text = "CS401"
code9.Text = "PE103"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 3"


s2.Text = "FILIPINO 3"
s3.Text = "PHYSICS 1"
s4.Text = "PSYCHOLOGY"
s5.Text = "PROBABILITY AND STATISTICS"
s6.Text = "WEB PROGRAMMING"
s7.Text = "OBJECT ORIENTED PROGRAMMING"
s8.Text = "FREE ELECTIVE 1"
sub9.Text = "PHYSICAL EDUCATION 3"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "2"
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "2" Then

code1.Text = "GE212"
code2.Text = "GE304"
code3.Text = "CS211"
code4.Text = "CS212"
code5.Text = "CS231"
code6.Text = "GE203"
code7.Text = "CS402"
code8.Text = "PE104"
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "PHYSICS 2"


s2.Text = "SOCIOLOGY"
s3.Text = "DATABASE SYSTEM"
s4.Text = "DATA STRUCTURE"
s5.Text = " DIGITAL DESIGN"
s6.Text = "RIZAL"
s7.Text = "FREE ELECTIVE 2"
s8.Text = "PHYSICAL EDUCATION 4"
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "3" Then

code1.Text = "CS201"
code2.Text = "CS202"
code3.Text = "CS232"
code4.Text = "CS204"
code5.Text = "CS205"
code6.Text = "GE403"
code7.Text = "CS301"
code7.Text = "CS402"
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "OPERATING SYSTEM"


s2.Text = "PROGRAMMING LANGUAGE"
s3.Text = "COMPUTER ORG AND ASSEMBLY LANGUAGE"
s4.Text = "AUTOMATA"
s5.Text = " SYSTEM ANALYSIS DESIGN"
s6.Text = "FREE ELECTIVE 3"
s7.Text = "ITE ELECTIVE 1"
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "3" Then

code1.Text = "CS213"
code2.Text = "GE305"
code3.Text = "CS207"
code4.Text = "CS404"
code5.Text = "CS302"
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "SOFTWARE ENGINEERING"


s2.Text = "ECONOMICS"
s3.Text = "NETWORK ANG INTERNET TECHNOLOGIES"
s4.Text = "FREE ELECTIVE 4"
s5.Text = " ITE ELECTIVE 2"
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "4" Then

code1.Text = "CS501"
code2.Text = "CS203"
code3.Text = "CS303"
code4.Text = "CS304"
code5.Text = ""
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "THESIS 1"


s2.Text = " PROFESSIONAL ETHICS"
s3.Text = "ITE ELECTIVE 3"
s4.Text = "ITE ELECTIVE 4"
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "4" Then

code1.Text = "CS502"
code2.Text = "CS600"
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""
s1.Text = "THESIS 2"
s2.Text = "OJT (PRACTICUM)"
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

End If

End Sub

Private Sub act()

If course.Text = "ACT" And year.Text = "1" And sem.Text = "1st" Then

code1.Text = "GE101"
code2.Text = "GE201"
code3.Text = "CS101"
code4.Text = "CS111"
code5.Text = "CS121"
code6.Text = "GE301"
code7.Text = "GE123"
code8.Text = "CS401"
code9.Text = "PE101"
code10.Text = "NS01"
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 1"


s2.Text = "COLLEGE ALGEBRA"
s3.Text = "COM SCIE FUNDAMENTALS"
s4.Text = "COMPUTER PROGRAMMING 1"
s5.Text = "MICROSOFT OFFICE WITH INTERNET"
s6.Text = "PHILLIPINE HISTORY"
s7.Text = "PSYCHOLOGY"
s8.Text = "FREE ELECTIVE 1"
sub9.Text = "PHYSICAL EDUCATION 1"
s10.Text = "NSTP1"
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "2"
u10.Text = "3"
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "1" And sem.Text = "2nd" Then

code1.Text = "GE102"
code2.Text = "GE302"
code3.Text = "GE304"
code4.Text = "GE202"
code5.Text = "GE203"
code6.Text = "CS114"
code7.Text = "CS207"
code8.Text = "CS112"
code9.Text = "CS301"
code10.Text = "PE102"
code11.Text = "NS102"
code12.Text = ""

s1.Text = "ENGLISH 2"


s2.Text = "PHILIPPINE GOVT WITH NEW CONSTITUTION"
s3.Text = "SOCIOLOGY"
s4.Text = "PLANE TRIGONOMETRY"
s5.Text = "PROBABILITY AND STATISTICS"
s6.Text = "WEB PROGRAMMING"
s7.Text = "NETWORK AND INTERNET TECHNOLOGIES"
s8.Text = "COMPUTER PROGRAMMING 2"
sub9.Text = "ITE ELECTIVE 1"
s10.Text = "PHYSICAL EDUCATION"
s11.Text = "NSTP2"
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "3"
u10.Text = "2"
u11.Text = "3"
u12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "2" And sem.Text = "1st" Then

code1.Text = "GE103"
code2.Text = "CS201"
code3.Text = "CS232"
code4.Text = "CS203"
code5.Text = "CS211"
code6.Text = "CS231"
code7.Text = "CS402"
code8.Text = "CS302"
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 3"


s2.Text = "OPERATING SYSTEM"
s3.Text = "COMPUTER ORG AND ASSEMBLY LANGUAGE"
s4.Text = "PROFESSIONALS ETHICS"
s5.Text = "DATABASE SYSTEM"
s6.Text = "DIGITAL DESIGN"
s7.Text = "FREE ELECTIVE 2"
s8.Text = "ITE ELECTIVE 2"
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "2" And sem.Text = "2nd" Then

code1.Text = "CS303"
code2.Text = "CS205"
code3.Text = "CS600"
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ITE ELECTIVE 3"


s2.Text = "SYSTEM ANALYSIS AND DESIGN"
s3.Text = "OJT (PRACTICUM)"
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

End If
End Sub

Private Sub sem_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles sem.SelectedIndexChanged
bscs()
act()

End Sub

Private Sub year_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles year.SelectedIndexChanged

bscs()
act()
End Sub
Private Sub course_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles course.SelectedIndexChanged
If course.Text = "BSCS" Then
year.Items.Clear()
year.Items.Add("")
year.Items.Add("1")
year.Items.Add("2")
year.Items.Add("3")
year.Items.Add("4")

ElseIf course.Text = "ACT" Then


year.Items.Clear()

year.Items.Add("")
year.Items.Add("1")
year.Items.Add("2")
End If
End Sub

End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Public Class Form8

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox3.Click
If MessageBox.Show("Are You Sure You Want To Sign Out", "Confirmation",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Form2.Show()
Me.Hide()
Form4.TextBox1.Text = ""
Form4.TextBox2.Text = ""

Else
Me.Show()
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
Form17.Show()
Form17.Button2.Visible = True
Form17.DataGridView1.Refresh()
Me.Hide()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form14.Show()
Me.Hide()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Form25.Show()
Me.Hide()
End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form9

Dim conn As MySqlConnection


Dim command As MySqlCommand
Dim ds As New DataTable

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
sem.Enabled = True
TextBox3.Enabled = True
last.Enabled = True
first.Enabled = True
middle.Enabled = True
gen.Enabled = True
course.Enabled = True
cn.Enabled = True
address.Enabled = True
sec.Enabled = True
year.Enabled = True
code1.Enabled = True
code2.Enabled = True
code3.Enabled = True
code4.Enabled = True
code5.Enabled = True
code6.Enabled = True
code7.Enabled = True
code8.Enabled = True
code9.Enabled = True
code10.Enabled = True
code11.Enabled = True
code12.Enabled = True
sub9.Enabled = True
s1.Enabled = True
s2.Enabled = True
s3.Enabled = True
s4.Enabled = True
s5.Enabled = True
s6.Enabled = True
s7.Enabled = True
s8.Enabled = True
s10.Enabled = True
s11.Enabled = True
s12.Enabled = True
u1.Enabled = True
u2.Enabled = True
u3.Enabled = True
u4.Enabled = True
u5.Enabled = True
u6.Enabled = True
u7.Enabled = True
u8.Enabled = True
unit9.Enabled = True
u10.Enabled = True
u11.Enabled = True
u12.Enabled = True
time9.Enabled = True
t1.Enabled = True
t2.Enabled = True
t3.Enabled = True
t4.Enabled = True
t5.Enabled = True
t6.Enabled = True
t7.Enabled = True
t8.Enabled = True
t10.Enabled = True
t11.Enabled = True
t12.Enabled = True
days9.Enabled = True
d1.Enabled = True
d2.Enabled = True
d3.Enabled = True
d4.Enabled = True
d5.Enabled = True
d6.Enabled = True
d7.Enabled = True
d8.Enabled = True
d10.Enabled = True
d11.Enabled = True
d12.Enabled = True
room9.Enabled = True
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = True
r8.Enabled = True
r10.Enabled = True
r11.Enabled = True
r12.Enabled = True

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click

If first.Text = "" Or last.Text = "" Or middle.Text = "" Or course.Text = "" Or Gender.Text = ""
Or cn.Text = "" Or address.Text = "" Or sec.Text = "" Or year.Text = "" Then
MessageBox.Show("Information Required")
Else

conn = New MySqlConnection


conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & TextBox3.Text &
"',last_name='" & last.Text & "',first_name='" & first.Text & "',middle_name='" & middle.Text & "',
gender='" & gen.Text & "',course='" & course.Text & "',contact_no='" & cn.Text & "' ,address='" &
address.Text & "',year='" & year.Text & "',section='" & sec.Text & "',code1='" & code1.Text &
"',code2='" & code2.Text & "',code3='" & code3.Text & "',code4='" & code4.Text & "',code5='" &
code5.Text & "',code6='" & code6.Text & "',code7='" & code7.Text & "',code8='" & code8.Text &
"',code9='" & code9.Text & "',code10='" & code10.Text & "',code11='" & code11.Text &
"',code12='" & code12.Text & "',sub1='" & s1.Text & "',sub2='" & s2.Text & "',sub3='" & s3.Text &
"',sub4='" & s4.Text & "',sub5='" & s5.Text & "',sub6='" & s6.Text & "',sub7='" & s7.Text &
"',sub8='" & s8.Text & "',sub9='" & sub9.Text & "',sub10='" & s10.Text & "',sub11='" & s11.Text &
"',sub12='" & s12.Text & "',uni1='" & u1.Text & "',uni2='" & u2.Text & "',uni3='" & u3.Text &
"',uni4='" & u4.Text & "',uni5='" & u5.Text & "',uni6='" & u6.Text & "',uni7='" & u7.Text &
"',uni8='" & u8.Text & "',uni9='" & unit9.Text & "',uni10='" & u10.Text & "',uni11='" & u11.Text &
"',uni12='" & u12.Text & "',time1='" & t1.Text & "',time2='" & t2.Text & "',time3='" & t3.Text &
"',time4='" & t4.Text & "',time5='" & t5.Text & "',time6='" & t6.Text & "',time7='" & t7.Text &
"',time8='" & t8.Text & "',time9='" & time9.Text & "',time10='" & t10.Text & "',time11='" &
t11.Text & "',time12='" & t12.Text & "',day1='" & d1.Text & "',day2='" & d2.Text & "',day3='" &
d3.Text & "',day4='" & d4.Text & "',day5='" & d5.Text & "',day6='" & d6.Text & "',day7='" &
d7.Text & "',day8='" & d8.Text & "',day9='" & days9.Text & "',day10='" & d10.Text & "',day11='"
& d11.Text & "',day12='" & d12.Text & "',room1='" & r1.Text & "',room2='" & r2.Text &
"',room3='" & r3.Text & "',room4='" & r4.Text & "',room5='" & r5.Text & "',room6='" & r6.Text &
"',room7='" & r7.Text & "',room8='" & r8.Text & "',room9='" & room9.Text & "',room10='" &
r10.Text & "',room11='" & r11.Text & "',room12='" & r12.Text & "',sem='" & sem.Text & "' where
student_id='" & TextBox3.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
MessageBox.Show("Update Success")
sem.Text = ""
TextBox3.Text = ""
last.Text = ""
first.Text = ""
middle.Text = ""
gen.Text = ""
course.Text = ""
cn.Text = ""
address.Text = ""
sec.Text = ""
year.Text = ""
search.Text = ""
code1.Text = ""
code2.Text = ""
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code11.Text = ""
code12.Text = ""

sub9.Text = ""
s1.Text = ""
s2.Text = ""
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = ""
u2.Text = ""
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""

room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""

sem.Enabled = False
TextBox3.Enabled = False
last.Enabled = False
first.Enabled = False
middle.Enabled = False
gen.Enabled = False
course.Enabled = False
cn.Enabled = False
address.Enabled = False
sec.Enabled = False
year.Enabled = False
code1.Enabled = False
code2.Enabled = False
code3.Enabled = False
code4.Enabled = False
code5.Enabled = False
code6.Enabled = False
code7.Enabled = False
code8.Enabled = False
code9.Enabled = False
code10.Enabled = False
code11.Enabled = False
code12.Enabled = False

sub9.Enabled = False
s1.Enabled = False
s2.Enabled = False
s3.Enabled = False
s4.Enabled = False
s5.Enabled = False
s6.Enabled = False
s7.Enabled = False
s8.Enabled = False
s10.Enabled = False
s11.Enabled = False
s12.Enabled = False

u1.Enabled = False
u2.Enabled = False
u3.Enabled = False
u4.Enabled = False
u5.Enabled = False
u6.Enabled = False
u7.Enabled = False
u8.Enabled = False
unit9.Enabled = False
u10.Enabled = False
u11.Enabled = False
u12.Enabled = False
time9.Enabled = False
t1.Enabled = False
t2.Enabled = False
t3.Enabled = False
t4.Enabled = False
t5.Enabled = False
t6.Enabled = False
t7.Enabled = False
t8.Enabled = False
t10.Enabled = False
t11.Enabled = False
t12.Enabled = False

days9.Enabled = False
d1.Enabled = False
d2.Enabled = False
d3.Enabled = False
d4.Enabled = False
d5.Enabled = False
d6.Enabled = False
d7.Enabled = False
d8.Enabled = False
d10.Enabled = False
d11.Enabled = False
d12.Enabled = False

room9.Enabled = False
r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r10.Enabled = False
r11.Enabled = False
r12.Enabled = False

Button1.Visible = False

conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End If

End Sub
Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button5.Click
Button1.Visible = False
sem.Text = ""
TextBox3.Text = ""
last.Text = ""
first.Text = ""
middle.Text = ""
gen.Text = ""
course.Text = ""
cn.Text = ""
address.Text = ""
sec.Text = ""
year.Text = ""
search.Text = ""
code1.Text = ""
code2.Text = ""
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code11.Text = ""
code12.Text = ""

sub9.Text = ""
s1.Text = ""
s2.Text = ""
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = ""
u2.Text = ""
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""

room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""

sem.Enabled = False
TextBox3.Enabled = False
last.Enabled = False
first.Enabled = False
middle.Enabled = False
gen.Enabled = False
course.Enabled = False
cn.Enabled = False
address.Enabled = False
sec.Enabled = False
year.Enabled = False
code1.Enabled = False
code2.Enabled = False
code3.Enabled = False
code4.Enabled = False
code5.Enabled = False
code6.Enabled = False
code7.Enabled = False
code8.Enabled = False
code9.Enabled = False
code10.Enabled = False
code11.Enabled = False
code12.Enabled = False

sub9.Enabled = False
s1.Enabled = False
s2.Enabled = False
s3.Enabled = False
s4.Enabled = False
s5.Enabled = False
s6.Enabled = False
s7.Enabled = False
s8.Enabled = False
s10.Enabled = False
s11.Enabled = False
s12.Enabled = False

u1.Enabled = False
u2.Enabled = False
u3.Enabled = False
u4.Enabled = False
u5.Enabled = False
u6.Enabled = False
u7.Enabled = False
u8.Enabled = False
unit9.Enabled = False
u10.Enabled = False
u11.Enabled = False
u12.Enabled = False

time9.Enabled = False
t1.Enabled = False
t2.Enabled = False
t3.Enabled = False
t4.Enabled = False
t5.Enabled = False
t6.Enabled = False
t7.Enabled = False
t8.Enabled = False
t10.Enabled = False
t11.Enabled = False
t12.Enabled = False

days9.Enabled = False
d1.Enabled = False
d2.Enabled = False
d3.Enabled = False
d4.Enabled = False
d5.Enabled = False
d6.Enabled = False
d7.Enabled = False
d8.Enabled = False
d10.Enabled = False
d11.Enabled = False
d12.Enabled = False
room9.Enabled = False
r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r10.Enabled = False
r11.Enabled = False
r12.Enabled = False
Form22.Show()
Me.Hide()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
sem.Text = ""
TextBox3.Text = ""
last.Text = ""
first.Text = ""
middle.Text = ""
gen.Text = ""
course.Text = ""
cn.Text = ""
address.Text = ""
sec.Text = ""
year.Text = ""
search.Text = ""
code1.Text = ""
code2.Text = ""
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code11.Text = ""
code12.Text = ""

sub9.Text = ""
s1.Text = ""
s2.Text = ""
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = ""
u2.Text = ""
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""

room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""

Button1.Visible = False
sem.Enabled = False
TextBox3.Enabled = False
last.Enabled = False
first.Enabled = False
middle.Enabled = False
gen.Enabled = False
course.Enabled = False
cn.Enabled = False
address.Enabled = False
sec.Enabled = False
year.Enabled = False
code1.Enabled = False
code2.Enabled = False
code3.Enabled = False
code4.Enabled = False
code5.Enabled = False
code6.Enabled = False
code7.Enabled = False
code8.Enabled = False
code9.Enabled = False
code10.Enabled = False
code11.Enabled = False
code12.Enabled = False

sub9.Enabled = False
s1.Enabled = False
s2.Enabled = False
s3.Enabled = False
s4.Enabled = False
s5.Enabled = False
s6.Enabled = False
s7.Enabled = False
s8.Enabled = False
s10.Enabled = False
s11.Enabled = False
s12.Enabled = False

u1.Enabled = False
u2.Enabled = False
u3.Enabled = False
u4.Enabled = False
u5.Enabled = False
u6.Enabled = False
u7.Enabled = False
u8.Enabled = False
unit9.Enabled = False
u10.Enabled = False
u11.Enabled = False
u12.Enabled = False

time9.Enabled = False
t1.Enabled = False
t2.Enabled = False
t3.Enabled = False
t4.Enabled = False
t5.Enabled = False
t6.Enabled = False
t7.Enabled = False
t8.Enabled = False
t10.Enabled = False
t11.Enabled = False
t12.Enabled = False

days9.Enabled = False
d1.Enabled = False
d2.Enabled = False
d3.Enabled = False
d4.Enabled = False
d5.Enabled = False
d6.Enabled = False
d7.Enabled = False
d8.Enabled = False
d10.Enabled = False
d11.Enabled = False
d12.Enabled = False

room9.Enabled = False
r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r10.Enabled = False
r11.Enabled = False
r12.Enabled = False

End Sub

Private Sub search_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles search.KeyDown
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If e.KeyCode = Keys.Enter Then
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id = '" & search.Text & "' or
last_name = '" & search.Text & "' or first_name = '" & search.Text & "' or middle_name = '" &
search.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While
If count = 1 Then

sem.Text = reader.GetString("sem")
TextBox3.Text = reader.GetString("student_id")
last.Text = reader.GetString("last_name")
first.Text = reader.GetString("first_name")
middle.Text = reader.GetString("middle_name")
gen.Text = reader.GetString("gender")
cn.Text = reader.GetString("contact_no")
course.Text = reader.GetString("course")
year.Text = reader.GetString("year")
sec.Text = reader.GetString("section")
address.Text = reader.GetString("address")
code1.Text = reader.GetString("code1")
code2.Text = reader.GetString("code2")
code3.Text = reader.GetString("code3")
code4.Text = reader.GetString("code4")
code5.Text = reader.GetString("code5")
code6.Text = reader.GetString("code6")
code7.Text = reader.GetString("code7")
code8.Text = reader.GetString("code8")
code9.Text = reader.GetString("code9")
code10.Text = reader.GetString("code10")
code11.Text = reader.GetString("code11")
code12.Text = reader.GetString("code12")
s1.Text = reader.GetString("sub1")
s2.Text = reader.GetString("sub2")
s3.Text = reader.GetString("sub3")
s4.Text = reader.GetString("sub4")
s5.Text = reader.GetString("sub5")
s6.Text = reader.GetString("sub6")
s7.Text = reader.GetString("sub7")
s8.Text = reader.GetString("sub8")
sub9.Text = reader.GetString("sub9")
s10.Text = reader.GetString("sub10")
s11.Text = reader.GetString("sub11")
s12.Text = reader.GetString("sub12")
u1.Text = reader.GetString("uni1")
u2.Text = reader.GetString("uni2")
u3.Text = reader.GetString("uni3")
u4.Text = reader.GetString("uni4")
u5.Text = reader.GetString("uni5")
u6.Text = reader.GetString("uni6")
u7.Text = reader.GetString("uni7")
u8.Text = reader.GetString("uni8")
unit9.Text = reader.GetString("uni9")
u10.Text = reader.GetString("uni10")
u11.Text = reader.GetString("uni11")
u12.Text = reader.GetString("uni12")
t1.Text = reader.GetString("time1")
t2.Text = reader.GetString("time2")
t3.Text = reader.GetString("time3")
t4.Text = reader.GetString("time4")
t5.Text = reader.GetString("time5")
t6.Text = reader.GetString("time6")
t7.Text = reader.GetString("time7")
t8.Text = reader.GetString("time8")
time9.Text = reader.GetString("time9")
t10.Text = reader.GetString("time10")
t11.Text = reader.GetString("time11")
t12.Text = reader.GetString("time12")
d1.Text = reader.GetString("day1")
d2.Text = reader.GetString("day2")
d3.Text = reader.GetString("day3")
d4.Text = reader.GetString("day4")
d5.Text = reader.GetString("day5")
d6.Text = reader.GetString("day6")
d7.Text = reader.GetString("day7")
d8.Text = reader.GetString("day8")
days9.Text = reader.GetString("day9")
d10.Text = reader.GetString("day10")
d11.Text = reader.GetString("day11")
d12.Text = reader.GetString("day12")
r1.Text = reader.GetString("room1")
r2.Text = reader.GetString("room2")
r3.Text = reader.GetString("room3")
r4.Text = reader.GetString("room4")
r5.Text = reader.GetString("room5")
r6.Text = reader.GetString("room6")
r7.Text = reader.GetString("room7")
r8.Text = reader.GetString("room8")
room9.Text = reader.GetString("room9")

r10.Text = reader.GetString("room10")
r11.Text = reader.GetString("room11")
r12.Text = reader.GetString("room12")
Button1.Visible = True
search.Text = ""

Else
MessageBox.Show("No record Found!!!!")
search.Text = ""
End If
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub

Private Sub bscs()

If course.Text = "BSCS" And sem.Text = "1st" And year.Text = "1" Then

code1.Text = "GE101"
code2.Text = "GE111"
code3.Text = "GE201"
code4.Text = "CS101"
code5.Text = "CS111"
code6.Text = "GE301"
code7.Text = "GE121"
code8.Text = "PE101"
code9.Text = "NS101"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 1"


s2.Text = "FILIPINO 1"
s3.Text = "COLLEGE ALGEBRA"
s4.Text = "COM SCIE FUNDAMENTALS"
s5.Text = "COMPUTER PROGRAMMING 1"
s6.Text = "PHILLIPINE HISTORY"
s7.Text = "PHILOSOPHY OF MAN"
s8.Text = "PHYSICAL EDUCATION 1"
sub9.Text = "NSTP1"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = "3"
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "1" Then
code1.Text = "GE102"
code2.Text = "GE112"
code3.Text = "GE202"
code4.Text = "CS121"
code5.Text = "CS112"
code6.Text = "GE122"
code7.Text = "GE302"
code8.Text = "PE102"
code9.Text = "NS102"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 2"


s2.Text = "FILIPINO 2"
s3.Text = "PLANE TRIGONOMETRY"
s4.Text = "MICROSOFT OFFICE WITH INTERNET"
s5.Text = "COMPUTER PROGRAMMING 2"
s6.Text = "LOGIC"
s7.Text = "PHILIPPINE GOVT WITH NEW CONSTITUTION"
s8.Text = "PHYSICAL EDUCATION 2"
sub9.Text = "NSTP2"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = "3"
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "2" Then

code1.Text = "GE103"
code2.Text = "GE113"
code3.Text = "GE211"
code4.Text = "CS123"
code5.Text = "CS203"
code6.Text = "CS114"
code7.Text = "CS113"
code8.Text = "CS401"
code9.Text = "PE103"
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 3"


s2.Text = "FILIPINO 3"
s3.Text = "PHYSICS 1"
s4.Text = "PSYCHOLOGY"
s5.Text = "PROBABILITY AND STATISTICS"
s6.Text = "WEB PROGRAMMING"
s7.Text = "OBJECT ORIENTED PROGRAMMING"
s8.Text = "FREE ELECTIVE 1"
sub9.Text = "PHYSICAL EDUCATION 3"
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "2"
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "2" Then

code1.Text = "GE212"
code2.Text = "GE304"
code3.Text = "CS211"
code4.Text = "CS212"
code5.Text = "CS231"
code6.Text = "GE203"
code7.Text = "CS402"
code8.Text = "PE104"
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "PHYSICS 2"


s2.Text = "SOCIOLOGY"
s3.Text = "DATABASE SYSTEM"
s4.Text = "DATA STRUCTURE"
s5.Text = " DIGITAL DESIGN"
s6.Text = "RIZAL"
s7.Text = "FREE ELECTIVE 2"
s8.Text = "PHYSICAL EDUCATION 4"
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "2"
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "3" Then

code1.Text = "CS201"
code2.Text = "CS202"
code3.Text = "CS232"
code4.Text = "CS204"
code5.Text = "CS205"
code6.Text = "GE403"
code7.Text = "CS301"
code7.Text = "CS402"
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "OPERATING SYSTEM"


s2.Text = "PROGRAMMING LANGUAGE"
s3.Text = "COMPUTER ORG AND ASSEMBLY LANGUAGE"
s4.Text = "AUTOMATA"
s5.Text = " SYSTEM ANALYSIS DESIGN"
s6.Text = "FREE ELECTIVE 3"
s7.Text = "ITE ELECTIVE 1"
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "3" Then

code1.Text = "CS213"
code2.Text = "GE305"
code3.Text = "CS207"
code4.Text = "CS404"
code5.Text = "CS302"
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "SOFTWARE ENGINEERING"


s2.Text = "ECONOMICS"
s3.Text = "NETWORK ANG INTERNET TECHNOLOGIES"
s4.Text = "FREE ELECTIVE 4"
s5.Text = " ITE ELECTIVE 2"
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "1st" And year.Text = "4" Then

code1.Text = "CS501"
code2.Text = "CS203"
code3.Text = "CS303"
code4.Text = "CS304"
code5.Text = ""
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "THESIS 1"


s2.Text = " PROFESSIONAL ETHICS"
s3.Text = "ITE ELECTIVE 3"
s4.Text = "ITE ELECTIVE 4"
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "BSCS" And sem.Text = "2nd" And year.Text = "4" Then

code1.Text = "CS502"
code2.Text = "CS600"
code3.Text = ""
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""
s1.Text = "THESIS 2"
s2.Text = "OJT (PRACTICUM)"
s3.Text = ""
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = ""
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

End If

End Sub

Private Sub act()

If course.Text = "ACT" And year.Text = "1" And sem.Text = "1st" Then

code1.Text = "GE101"
code2.Text = "GE201"
code3.Text = "CS101"
code4.Text = "CS111"
code5.Text = "CS121"
code6.Text = "GE301"
code7.Text = "GE123"
code8.Text = "CS401"
code9.Text = "PE101"
code10.Text = "NS01"
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 1"


s2.Text = "COLLEGE ALGEBRA"
s3.Text = "COM SCIE FUNDAMENTALS"
s4.Text = "COMPUTER PROGRAMMING 1"
s5.Text = "MICROSOFT OFFICE WITH INTERNET"
s6.Text = "PHILLIPINE HISTORY"
s7.Text = "PSYCHOLOGY"
s8.Text = "FREE ELECTIVE 1"
sub9.Text = "PHYSICAL EDUCATION 1"
s10.Text = "NSTP1"
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "2"
u10.Text = "3"
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "1" And sem.Text = "2nd" Then

code1.Text = "GE102"
code2.Text = "GE302"
code3.Text = "GE304"
code4.Text = "GE202"
code5.Text = "GE203"
code6.Text = "CS114"
code7.Text = "CS207"
code8.Text = "CS112"
code9.Text = "CS301"
code10.Text = "PE102"
code11.Text = "NS102"
code12.Text = ""

s1.Text = "ENGLISH 2"


s2.Text = "PHILIPPINE GOVT WITH NEW CONSTITUTION"
s3.Text = "SOCIOLOGY"
s4.Text = "PLANE TRIGONOMETRY"
s5.Text = "PROBABILITY AND STATISTICS"
s6.Text = "WEB PROGRAMMING"
s7.Text = "NETWORK AND INTERNET TECHNOLOGIES"
s8.Text = "COMPUTER PROGRAMMING 2"
sub9.Text = "ITE ELECTIVE 1"
s10.Text = "PHYSICAL EDUCATION"
s11.Text = "NSTP2"
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = "3"
u10.Text = "2"
u11.Text = "3"
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "2" And sem.Text = "1st" Then

code1.Text = "GE103"
code2.Text = "CS201"
code3.Text = "CS232"
code4.Text = "CS203"
code5.Text = "CS211"
code6.Text = "CS231"
code7.Text = "CS402"
code8.Text = "CS302"
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ENGLISH 3"


s2.Text = "OPERATING SYSTEM"
s3.Text = "COMPUTER ORG AND ASSEMBLY LANGUAGE"
s4.Text = "PROFESSIONALS ETHICS"
s5.Text = "DATABASE SYSTEM"
s6.Text = "DIGITAL DESIGN"
s7.Text = "FREE ELECTIVE 2"
s8.Text = "ITE ELECTIVE 2"
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = "3"
u5.Text = "3"
u6.Text = "3"
u7.Text = "3"
u8.Text = "3"
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = ""

time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

ElseIf course.Text = "ACT" And year.Text = "2" And sem.Text = "2nd" Then

code1.Text = "CS303"
code2.Text = "CS205"
code3.Text = "CS600"
code4.Text = ""
code5.Text = ""
code6.Text = ""
code7.Text = ""
code8.Text = ""
code9.Text = ""
code10.Text = ""
code12.Text = ""
code11.Text = ""

s1.Text = "ITE ELECTIVE 3"


s2.Text = "SYSTEM ANALYSIS AND DESIGN"
s3.Text = "OJT (PRACTICUM)"
s4.Text = ""
s5.Text = ""
s6.Text = ""
s7.Text = ""
s8.Text = ""
sub9.Text = ""
s10.Text = ""
s11.Text = ""
s12.Text = ""

u1.Text = "3"
u2.Text = "3"
u3.Text = "3"
u4.Text = ""
u5.Text = ""
u6.Text = ""
u7.Text = ""
u8.Text = ""
unit9.Text = ""
u10.Text = ""
u11.Text = ""
u12.Text = time9.Text = ""
t1.Text = ""
t2.Text = ""
t3.Text = ""
t4.Text = ""
t5.Text = ""
t6.Text = ""
t7.Text = ""
t8.Text = ""
days9.Text = ""
d1.Text = ""
d2.Text = ""
d3.Text = ""
d4.Text = ""
d5.Text = ""
d6.Text = ""
d7.Text = ""
d8.Text = ""
room9.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r10.Text = ""
r11.Text = ""
r12.Text = ""
d10.Text = ""
d11.Text = ""
d12.Text = ""
t10.Text = ""
t11.Text = ""
t12.Text = ""

End If
End Sub

Private Sub course_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles course.SelectedIndexChanged
If course.Text = "BSCS" Then
year.Items.Clear()
year.Items.Add("")
year.Items.Add("1")
year.Items.Add("2")
year.Items.Add("3")
year.Items.Add("4")
ElseIf course.Text = "ACT" Then
year.Items.Clear()

year.Items.Add("")
year.Items.Add("1")
year.Items.Add("2")
End If
End Sub

Private Sub year_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles year.SelectedIndexChanged
bscs()
act()

End Sub

Private Sub sem_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles sem.SelectedIndexChanged
bscs()
act()
End Sub

Private Sub search_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles search.TextChanged

End Sub
End Class

Public Class Form10

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox3.Click
If Form13.TextBox2.Text = "password" Then
If MessageBox.Show("Please Change Your Password Before You Sign Out", "Confirmation",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Me.Show()
Else
Me.Show()

End If
Else
Form5.Show()
Me.Hide()
End If

End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
Form15.Show()
Me.Hide()

End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Form13.Show()
Me.Hide()
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Form18.Show()
Form18.TextBox18.Focus()
Form18.subb1.Visible = False
Form18.subb2.Visible = False
Form18.subb3.Visible = False
Form18.subb4.Visible = False
Form18.subb5.Visible = False
Form18.subb6.Visible = False
Form18.subb7.Visible = False
Form18.subb8.Visible = False
Form18.subb9.Visible = False
Form18.subb10.Visible = False
Form18.subb11.Visible = False
Form18.subb12.Visible = False

Form18.sub1.Visible = True
Form18.sub2.Visible = True
Form18.sub3.Visible = True
Form18.sub4.Visible = True
Form18.sub5.Visible = True
Form18.sub6.Visible = True
Form18.sub7.Visible = True
Form18.sub8.Visible = True
Form18.sub9.Visible = True
Form18.sub10.Visible = True
Form18.sub11.Visible = True
Form18.sub12.Visible = True

Form18.Button1.Visible = True
Form18.Button2.Visible = False
Me.Hide()
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
Form20.Button2.Visible = True
Form20.ComboBox1.Text = ""
Form20.ComboBox2.Text = ""
Form20.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form17.Show()
Form17.Button1.Visible = True
Me.Hide()
End Sub
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button6.Click
Form28.Show()
Me.Hide()
End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form11

Dim conn As MySqlConnection


Dim command As MySqlCommand

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click

conn = New MySqlConnection


conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If pass1.Text = pass.Text Then

Try

conn.Open()
If user.Text = "" Or pass.Text = "" Or pass1.Text = "" Then
MessageBox.Show("All Field Required")
Else
Dim query As String
query = "update gradingdb.std_info set password='" & pass.Text & "', username = '"
& user.Text & "' where username='" & TextBox1.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
conn.Close()

MessageBox.Show("Account Changed")
TextBox2.Text = pass.Text
TextBox1.Text = user.Text
user.Text = ""
pass.Text = ""
pass1.Text = ""

Form6.Show()
Me.Hide()

End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
Else

MessageBox.Show("Password Does Not Match")


pass.Text = ""
pass1.Text = ""

End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form6.Show()
Me.Hide()
user.Text = ""
pass.Text = ""
pass1.Text = ""
End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles TextBox2.TextChanged

End Sub
End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Public Class Form12
Dim conn As MySqlConnection
Dim command As MySqlCommand
Dim a As OpenFileDialog = New OpenFileDialog

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles idn.TextChanged
user.Text = idn.Text
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
If idn.Text = "" Or first.Text = "" Or last.Text = "" Or middle.Text = "" Or con.Text = "" Or
addr.Text = "" Then
MessageBox.Show("All Fields Required")
Else
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
Dim mstream As New System.IO.MemoryStream()
PictureBox2.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim arrimage() As Byte = mstream.GetBuffer()
mstream.Close()

conn.Open()
Dim query As String
query = " insert into gradingdb.teacher
(id,fname,lname,mname,gender,contact,address,username,password,code1,code2,code3,code4,c
ode5,code6,code7,code8,code9,code10,code11,code12,code13,code14,code15,code16,time1,tim
e2,time3,time4,time5,time6,time7,time8,time9,time10,time11,time12,time13,time14,time15,tim
e16,day1,day2,day3,day4,day5,day6,day7,day8,day9,day10,day11,day12,day13,day14,day15,da
y16,room1,room2,room3,room4,room5,room6,room7,room8,room9,room10,room11,room12,room
13,room14,room15,room16,yearsec1,yearsec2,yearsec3,yearsec4,yearsec5,yearsec6,yearsec7,y
earsec8,yearsec9,yearsec10,yearsec11,yearsec12,yearsec13,yearsec14,yearsec15,yearsec16,im
age) values ('" & idn.Text & "','" & first.Text & "','" & last.Text & "','" & middle.Text & "','" &
gen.Text & "','" & con.Text & "','" & addr.Text & "','" & user.Text & "','" & pass.Text & "','" & cd1.Text
& "','" & cd2.Text & "','" & cd3.Text & "','" & cd4.Text & "','" & cd5.Text & "','" & cd6.Text & "','" &
cd7.Text & "','" & cd8.Text & "','" & cd9.Text & "','" & cd10.Text & "','" & cd11.Text & "','" &
cd12.Text & "','" & cd13.Text & "','" & cd14.Text & "','" & cd15.Text & "','" & cd16.Text & "','" &
ti1.Text & "','" & ti2.Text & "','" & ti3.Text & "','" & ti4.Text & "','" & ti5.Text & "','" & ti6.Text & "','" &
ti7.Text & "','" & ti8.Text & "','" & ti9.Text & "','" & ti10.Text & "','" & ti11.Text & "','" & ti12.Text &
"','" & ti13.Text & "','" & ti14.Text & "','" & ti15.Text & "','" & ti16.Text & "','" & da1.Text & "','" &
da2.Text & "','" & da3.Text & "','" & da4.Text & "','" & da5.Text & "','" & da6.Text & "','" & da7.Text
& "','" & da8.Text & "','" & da9.Text & "','" & da10.Text & "','" & da11.Text & "','" & da12.Text & "','"
& da13.Text & "','" & da14.Text & "','" & da15.Text & "','" & da16.Text & "','" & ra1.Text & "','" &
ra2.Text & "','" & ra3.Text & "','" & ra4.Text & "','" & ra5.Text & "','" & ra6.Text & "','" & ra7.Text &
"','" & ra8.Text & "','" & ra9.Text & "','" & ra10.Text & "','" & ra11.Text & "','" & ra12.Text & "','" &
ra13.Text & "','" & ra14.Text & "','" & ra15.Text & "','" & ra16.Text & "','" & y1.Text & "','" & y2.Text
& "','" & y3.Text & "','" & y4.Text & "','" & y5.Text & "','" & y6.Text & "','" & y7.Text & "','" & y8.Text
& "','" & y9.Text & "','" & y10.Text & "','" & y11.Text & "','" & y12.Text & "','" & y13.Text & "','" &
y14.Text & "','" & y15.Text & "','" & y16.Text & "',@image)"
command = New MySqlCommand(query, conn)
command.Parameters.AddWithValue("@image", arrimage)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
MessageBox.Show("Successfully Registered")
Form17.DataGridView1.Refresh()
PictureBox2.Image = My.Resources.h
conn.Close()
GroupBox1.Visible = True
GroupBox2.Visible = False
idn.Text = ""
first.Text = ""
last.Text = ""
middle.Text = ""
con.Text = ""
addr.Text = ""
gen.Text = ""
cd1.Text = ""
cd2.Text = ""
cd3.Text = ""
cd4.Text = ""
cd5.Text = ""
cd6.Text = ""
cd7.Text = ""
cd8.Text = ""
cd9.Text = ""
cd10.Text = ""
cd11.Text = ""
cd12.Text = ""
cd13.Text = ""
cd14.Text = ""
cd15.Text = ""
cd16.Text = ""

ti1.Text = ""
ti2.Text = ""
ti3.Text = ""
ti4.Text = ""
ti5.Text = ""
ti6.Text = ""
ti7.Text = ""
ti8.Text = ""
ti9.Text = ""
ti10.Text = ""
ti11.Text = ""
ti12.Text = ""
ti13.Text = ""
ti14.Text = ""
ti15.Text = ""
ti16.Text = ""

da1.Text = ""
da2.Text = ""
da3.Text = ""
da4.Text = ""
da5.Text = ""
da6.Text = ""
da7.Text = ""
da8.Text = ""
da9.Text = ""
da10.Text = ""
da11.Text = ""
da12.Text = ""
da13.Text = ""
da14.Text = ""
da15.Text = ""
da16.Text = ""

ra1.Text = ""
ra2.Text = ""
ra3.Text = ""
ra4.Text = ""
ra5.Text = ""
ra6.Text = ""
ra7.Text = ""
ra8.Text = ""
ra9.Text = ""
ra10.Text = ""
ra11.Text = ""
ra12.Text = ""
ra13.Text = ""
ra14.Text = ""
ra15.Text = ""
ra16.Text = ""

y1.Text = ""
y2.Text = ""
y3.Text = ""
y4.Text = ""
y5.Text = ""
y6.Text = ""
y7.Text = ""
y8.Text = ""
y9.Text = ""
y10.Text = ""
y11.Text = ""
y12.Text = ""
y13.Text = ""
y14.Text = ""
y15.Text = ""
y16.Text = ""

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click

Form22.Show()
Me.Hide()
GroupBox1.Visible = True
GroupBox2.Visible = False
Button1.Visible = False
Button2.Enabled = True
idn.Text = ""
first.Text = ""
last.Text = ""
middle.Text = ""
con.Text = ""
addr.Text = ""
gen.Text = ""
cd1.Text = ""
cd2.Text = ""
cd3.Text = ""
cd4.Text = ""
cd5.Text = ""
cd6.Text = ""
cd7.Text = ""
cd8.Text = ""
cd9.Text = ""
cd10.Text = ""
cd11.Text = ""
cd12.Text = ""

ti1.Text = ""
ti2.Text = ""
ti3.Text = ""
ti4.Text = ""
ti5.Text = ""
ti6.Text = ""
ti7.Text = ""
ti8.Text = ""
ti9.Text = ""
ti10.Text = ""
ti11.Text = ""
ti12.Text = ""

y1.Text = ""
y2.Text = ""
y3.Text = ""
y4.Text = ""
y5.Text = ""
y6.Text = ""
y7.Text = ""
y8.Text = ""
y9.Text = ""
y10.Text = ""
y11.Text = ""
y12.Text = ""

da1.Text = ""
da2.Text = ""
da3.Text = ""
da4.Text = ""
da5.Text = ""
da6.Text = ""
da7.Text = ""
da8.Text = ""
da9.Text = ""
da10.Text = ""
da11.Text = ""
da12.Text = ""

ra1.Text = ""
ra2.Text = ""
ra3.Text = ""
ra4.Text = ""
ra5.Text = ""
ra6.Text = ""
ra7.Text = ""
ra8.Text = ""
ra9.Text = ""
ra10.Text = ""
ra11.Text = ""
ra12.Text = ""
End Sub

Private Sub browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles browse.Click
Try
a.Filter = " Image Files | *.jpg"
If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox2.Image = Image.FromFile(a.FileName)

End If
Catch ex As Exception

End Try
End Sub

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If e.KeyCode = Keys.Enter Then
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "select * from gradingdb.teacher where id = '" & TextBox1.Text & "' or lname =
'" & TextBox1.Text & "' or fname = '" & TextBox1.Text & "' or mname = '" & TextBox1.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While
If count = 1 Then

idn.Text = reader.GetString("id")
last.Text = reader.GetString("lname")
first.Text = reader.GetString("fname")
middle.Text = reader.GetString("mname")
gen.Text = reader.GetString("gender")
con.Text = reader.GetString("contact")

addr.Text = reader.GetString("address")
cd1.Text = reader.GetString("code1")
cd2.Text = reader.GetString("code2")
cd3.Text = reader.GetString("code3")
cd4.Text = reader.GetString("code4")
cd5.Text = reader.GetString("code5")
cd6.Text = reader.GetString("code6")
cd7.Text = reader.GetString("code7")
cd8.Text = reader.GetString("code8")
cd9.Text = reader.GetString("code9")
cd10.Text = reader.GetString("code10")
cd11.Text = reader.GetString("code11")
cd12.Text = reader.GetString("code12")
cd13.Text = reader.GetString("code13")
cd14.Text = reader.GetString("code14")
cd15.Text = reader.GetString("code15")
cd16.Text = reader.GetString("code16")

ti1.Text = reader.GetString("time1")
ti2.Text = reader.GetString("time2")
ti3.Text = reader.GetString("time3")
ti4.Text = reader.GetString("time4")
ti5.Text = reader.GetString("time5")
ti6.Text = reader.GetString("time6")
ti7.Text = reader.GetString("time7")
ti8.Text = reader.GetString("time8")
ti9.Text = reader.GetString("time9")
ti10.Text = reader.GetString("time10")
ti11.Text = reader.GetString("time11")
ti12.Text = reader.GetString("time12")
ti13.Text = reader.GetString("time13")
ti14.Text = reader.GetString("time14")
ti15.Text = reader.GetString("time15")
ti16.Text = reader.GetString("time16")

da1.Text = reader.GetString("day1")
da2.Text = reader.GetString("day2")
da3.Text = reader.GetString("day3")
da4.Text = reader.GetString("day4")
da5.Text = reader.GetString("day5")
da6.Text = reader.GetString("day6")
da7.Text = reader.GetString("day7")
da8.Text = reader.GetString("day8")
da9.Text = reader.GetString("day9")
da10.Text = reader.GetString("day10")
da11.Text = reader.GetString("day11")
da12.Text = reader.GetString("day12")
da13.Text = reader.GetString("day13")
da14.Text = reader.GetString("day14")
da15.Text = reader.GetString("day15")
da16.Text = reader.GetString("day16")

y1.Text = reader.GetString("yearsec1")
y2.Text = reader.GetString("yearsec2")
y3.Text = reader.GetString("yearsec3")
y4.Text = reader.GetString("yearsec4")
y5.Text = reader.GetString("yearsec5")
y6.Text = reader.GetString("yearsec6")
y7.Text = reader.GetString("yearsec7")
y8.Text = reader.GetString("yearsec8")
y9.Text = reader.GetString("yearsec9")
y10.Text = reader.GetString("yearsec10")
y11.Text = reader.GetString("yearsec11")
y12.Text = reader.GetString("yearsec12")
y13.Text = reader.GetString("yearsec13")
y14.Text = reader.GetString("yearsec14")
y15.Text = reader.GetString("yearsec15")
y16.Text = reader.GetString("yearsec16")

ra1.Text = reader.GetString("room1")
ra2.Text = reader.GetString("room2")
ra3.Text = reader.GetString("room3")
ra4.Text = reader.GetString("room4")
ra5.Text = reader.GetString("room5")
ra6.Text = reader.GetString("room6")
ra7.Text = reader.GetString("room7")
ra8.Text = reader.GetString("room8")
ra9.Text = reader.GetString("room9")
ra10.Text = reader.GetString("room10")
ra11.Text = reader.GetString("room11")
ra12.Text = reader.GetString("room12")
ra13.Text = reader.GetString("room13")
ra14.Text = reader.GetString("room14")
ra15.Text = reader.GetString("room15")
ra16.Text = reader.GetString("room16")
Button1.Visible = True
Button2.Enabled = False
TextBox1.Text = ""

Else
MessageBox.Show("No record Found!!!!")
End If
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "update gradingdb.teacher set id= '" & idn.Text & "', fname='" & first.Text &
"',lname='" & last.Text & "', mname='" & middle.Text & "',contact='" & con.Text & "', address='"
& addr.Text & "', gender='" & gen.Text & "',code1='" & cd1.Text & "',code2='" & cd2.Text &
"',code3='" & cd3.Text & "',code4='" & cd4.Text & "',code5='" & cd5.Text & "',code6='" & cd6.Text
& "',code7='" & cd7.Text & "',code8='" & cd8.Text & "',code9='" & cd9.Text & "',code10='" &
cd10.Text & "',code11='" & cd11.Text & "',code12='" & cd12.Text & "',code13='" & cd13.Text &
"',code14='" & cd14.Text & "',code15='" & cd15.Text & "',code16='" & cd16.Text & "',time1='" &
ti1.Text & "',time2='" & ti2.Text & "',time3='" & ti3.Text & "',time4='" & ti4.Text & "',time5='" &
ti5.Text & "',time6='" & ti6.Text & "',time7='" & ti7.Text & "',time8='" & ti8.Text & "',time9='" &
ti9.Text & "',time10='" & ti10.Text & "',time11='" & ti11.Text & "',time12='" & ti12.Text &
"',time13='" & ti13.Text & "',time14='" & ti14.Text & "',time15='" & ti15.Text & "',time16='" &
ti16.Text & "',day1='" & da1.Text & "',day2='" & da2.Text & "',day3='" & da3.Text & "',day4='" &
da4.Text & "',day5='" & da5.Text & "',day6='" & da6.Text & "',day7='" & da7.Text & "',day8='" &
da8.Text & "',day9='" & da9.Text & "',day10='" & da10.Text & "',day11='" & da11.Text &
"',day12='" & da12.Text & "',day13='" & da13.Text & "',day14='" & da14.Text & "',day15='" &
da15.Text & "',day16='" & da16.Text & "',room1='" & ra1.Text & "',room2='" & ra2.Text &
"',room3='" & ra3.Text & "',room4='" & ra4.Text & "',room5='" & ra5.Text & "',room6='" &
ra6.Text & "',room7='" & ra7.Text & "',room8='" & ra8.Text & "',room9='" & ra9.Text &
"',room10='" & ra10.Text & "',room11='" & ra11.Text & "',room12='" & ra12.Text & "',room13='"
& ra13.Text & "',room14='" & ra14.Text & "',room15='" & ra15.Text & "',room16='" & ra16.Text &
"',yearsec1='" & y1.Text & "',yearsec2='" & y2.Text & "',yearsec3='" & y3.Text & "',yearsec4='" &
y4.Text & "',yearsec5='" & y5.Text & "',yearsec6='" & y6.Text & "',yearsec7='" & y7.Text &
"',yearsec8='" & y8.Text & "',yearsec9='" & y9.Text & "',yearsec10='" & y10.Text &
"',yearsec11='" & y11.Text & "',yearsec12='" & y12.Text & "',yearsec13='" & y13.Text &
"',yearsec14='" & y14.Text & "',yearsec15='" & y15.Text & "',yearsec16='" & y16.Text & "' where
id = '" & idn.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
MessageBox.Show("Update Success")
GroupBox1.Visible = True
GroupBox2.Visible = False
idn.Text = ""
first.Text = ""
last.Text = ""
middle.Text = ""
con.Text = ""
addr.Text = ""
gen.Text = ""
cd1.Text = ""
cd2.Text = ""
cd3.Text = ""
cd4.Text = ""
cd5.Text = ""
cd6.Text = ""
cd7.Text = ""
cd8.Text = ""
cd9.Text = ""
cd10.Text = ""
cd11.Text = ""
cd12.Text = ""
cd13.Text = ""
cd14.Text = ""
cd15.Text = ""
cd16.Text = ""

ti1.Text = ""
ti2.Text = ""
ti3.Text = ""
ti4.Text = ""
ti5.Text = ""
ti6.Text = ""
ti7.Text = ""
ti8.Text = ""
ti9.Text = ""
ti10.Text = ""
ti11.Text = ""
ti12.Text = ""
ti13.Text = ""
ti14.Text = ""
ti15.Text = ""
ti16.Text = ""

da1.Text = ""
da2.Text = ""
da3.Text = ""
da4.Text = ""
da5.Text = ""
da6.Text = ""
da7.Text = ""
da8.Text = ""
da9.Text = ""
da10.Text = ""
da11.Text = ""
da12.Text = ""
da13.Text = ""
da14.Text = ""
da15.Text = ""
da16.Text = ""

ra1.Text = ""
ra2.Text = ""
ra3.Text = ""
ra4.Text = ""
ra5.Text = ""
ra6.Text = ""
ra7.Text = ""
ra8.Text = ""
ra9.Text = ""
ra10.Text = ""
ra11.Text = ""
ra12.Text = ""
ra13.Text = ""
ra14.Text = ""
ra15.Text = ""
ra16.Text = ""

y1.Text = ""
y2.Text = ""
y3.Text = ""
y4.Text = ""
y5.Text = ""
y6.Text = ""
y7.Text = ""
y8.Text = ""
y9.Text = ""
y10.Text = ""
y11.Text = ""
y12.Text = ""
y13.Text = ""
y14.Text = ""
y15.Text = ""
y16.Text = ""
Button1.Visible = False
Button2.Enabled = True

conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
GroupBox1.Visible = True
GroupBox2.Visible = False
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
GroupBox1.Visible = False
GroupBox2.Visible = True
End Sub

Private Sub ComboBox8_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles y14.SelectedIndexChanged

End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form13
Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button1.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If pass1.Text = pass.Text Then

Try

conn.Open()
If user.Text = "" Or pass.Text = "" Or pass1.Text = "" Then
MessageBox.Show("All Field Required")
Else
Dim query As String
query = "update gradingdb.teacher set password='" & pass.Text & "', username='" &
user.Text & "' where username='" & TextBox1.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
conn.Close()

MessageBox.Show("Account Changed")

TextBox2.Text = pass.Text
TextBox1.Text = user.Text

user.Text = ""
pass.Text = ""
pass1.Text = ""
Form10.Show()
Me.Hide()
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
Else

MessageBox.Show("Password Does Not Match")


pass.Text = ""
pass1.Text = ""

End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form10.Show()
Me.Hide()
End Sub

Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Label1.Click

End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form14

Private Sub Form14_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
load_table1()
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox1.Text = "" Or ComboBox3.Text = "" Then

Else
filter_table()
End If
End Sub

Private Sub filter_table()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12'
from gradingdb.std_info where course = '" & ComboBox1.Text & "' and year = '" &
ComboBox3.Text & "' and section ='" & ComboBox2.Text & "' "
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub load_table1()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12' from
gradingdb.std_info"
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form8.Show()
Me.Hide()
ComboBox1.Text = ""
ComboBox2.Text = ""
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

Form8.Show()
Me.Hide()

ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox1.SelectedIndexChanged

If ComboBox1.Text = "" Then


ComboBox3.Text = ""
ComboBox2.Text = ""
load_table1()
End If
End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click

Try
Dim sTitle As String
sTitle = TextBox1.Text
Dim frm As New Form27(sTitle)
frm.Show()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow
row = Me.DataGridView1.Rows(e.RowIndex)

TextBox1.Text = row.Cells("Student ID").Value.ToString

End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
If ComboBox1.Text <> "" And ComboBox2.Text <> "" And ComboBox3.Text <> "" Then

Try
Dim sTitle As String
sTitle = ComboBox1.Text
Dim frm As New Form31(sTitle)
frm.Show()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
End Try
Else
Form29.Show()
End If

End Sub

Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox3.SelectedIndexChanged
If ComboBox3.Text = "1" Or ComboBox3.Text = "2" Or ComboBox3.Text = "3" Or
ComboBox3.Text = "4" Then
Button4.Visible = True
End If

End Sub
End Class
Public Class Form15

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form10.Show()
Me.Hide()
End Sub
End Class

Public Class Form16

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
Form6.Show()
Me.Hide()
End Sub

End Class

Imports MySql.Data.MySqlClient

Public Class Form17

Private Sub load_table1()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select id as 'Instructor ID',fname as 'First Name',lname as
'Last Name',mname as 'Middle Name',contact as 'Contact No.',code1 as 'Subject1',code2 as
'Subject2',code3 as 'Subject3',code4 as 'Subject4',code5 as 'Subject5',code6 as 'Subject6',code7
as 'Subject7',code8 as 'Subject8',code9 as 'Subject9',code10 as 'Subject10',code11 as
'Subject11',code12 as 'Subject12',code13 as 'Subject13',code14 as 'Subject14',code15 as
'Subject15',code16 as 'Subject16',time1 as 'First Period',time2 as 'Second Period',time3 as 'Third
Period',time4 as 'Fourth Period',time5 as 'Fifth Period',time6 as 'Sixth Period',time7 as 'Seventh
Period',time8 as 'Eight Period',time9 as 'Ninth Period',time10 as 'Tenth Period',time11 as 'Eleventh
Period',time12 as 'Twelve Period',time13 as 'Thirtheen Period',time14 as 'Fourtheen
Period',time15 as 'Fiftheen Period',time16 as 'Sixtheen Period',day1 as 'Day1',day2 as 'Day2',day3
as 'Day3',day4 as 'Day4',day5 as 'Day5',day6 as 'Day6',day7 as 'Day7',day8 as 'Day8',day9 as
'Day9',day10 as 'Day10',day11 as 'Day11',day12 as 'Day12',day13 as 'Day13',day14 as
'Day14',day15 as 'Day15',day16 as 'Day16',room1 as 'Room1',room2 as 'Room2',room3 as
'Room3',room4 as 'Room4',room5 as 'Room5',room6 as 'Room6',room7 as 'Room7',room8 as
'Room8',room9 as 'Room9',room10 as 'Room10',room11 as 'Room11',room12 as
'Room12',room13 as 'Room13',room14 as 'Room14',room15 as 'Room15',room16 as
'Room16',yearsec1 as 'Section',yearsec2 as 'Section2',yearsec3 as 'Section3',yearsec4 as
'Section4',yearsec5 as 'Section5',yearsec6 as 'Section6',yearsec7 as 'Section7',yearsec8 as
'Section8',yearsec9 as 'Section9',yearsec10 as 'Section10',yearsec11 as 'Section11',yearsec12 as
'Section12',yearsec13 as 'Section13',yearsec14 as 'Section14',yearsec15 as
'Section15',yearsec16 as 'Section16' from gradingdb.teacher"
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub Form17_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
load_table1()
DataGridView1.Refresh()
End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

If e.RowIndex >= 0 Then


Dim row As DataGridViewRow
row = Me.DataGridView1.Rows(e.RowIndex)

id.Text = row.Cells("Instructor ID").Value.ToString


fname.Text = row.Cells("First Name").Value.ToString
lname.Text = row.Cells("Last Name").Value.ToString
mname.Text = row.Cells("Middle Name").Value.ToString
con.Text = row.Cells("Contact No.").Value.ToString
cd1.Text = row.Cells("Subject1").Value.ToString
cd2.Text = row.Cells("Subject2").Value.ToString
cd3.Text = row.Cells("Subject3").Value.ToString
cd4.Text = row.Cells("Subject4").Value.ToString
cd5.Text = row.Cells("Subject5").Value.ToString
cd6.Text = row.Cells("Subject6").Value.ToString
cd7.Text = row.Cells("Subject7").Value.ToString
cd8.Text = row.Cells("Subject8").Value.ToString
cd9.Text = row.Cells("Subject9").Value.ToString
cd10.Text = row.Cells("Subject10").Value.ToString
cd11.Text = row.Cells("Subject11").Value.ToString
cd12.Text = row.Cells("Subject12").Value.ToString
cd13.Text = row.Cells("Subject13").Value.ToString
cd14.Text = row.Cells("Subject14").Value.ToString
cd15.Text = row.Cells("Subject15").Value.ToString
cd16.Text = row.Cells("Subject16").Value.ToString
ti1.Text = row.Cells("First Period").Value.ToString
ti2.Text = row.Cells("Second Period").Value.ToString
ti3.Text = row.Cells("Third Period").Value.ToString
ti4.Text = row.Cells("Fourth Period").Value.ToString
ti5.Text = row.Cells("Fifth Period").Value.ToString
ti6.Text = row.Cells("Sixth Period").Value.ToString
ti7.Text = row.Cells("Seventh Period").Value.ToString
ti8.Text = row.Cells("Eight Period").Value.ToString
ti9.Text = row.Cells("Ninth Period").Value.ToString
ti10.Text = row.Cells("Tenth Period").Value.ToString
ti11.Text = row.Cells("Eleventh Period").Value.ToString
ti12.Text = row.Cells("Twelve Period").Value.ToString
ti13.Text = row.Cells("Thirtheen Period").Value.ToString
ti14.Text = row.Cells("Fourtheen Period").Value.ToString
ti15.Text = row.Cells("Fiftheen Period").Value.ToString
ti16.Text = row.Cells("Sixtheen Period").Value.ToString

da1.Text = row.Cells("Day1").Value.ToString
da2.Text = row.Cells("Day2").Value.ToString
da3.Text = row.Cells("Day3").Value.ToString
da4.Text = row.Cells("Day4").Value.ToString
da5.Text = row.Cells("Day5").Value.ToString
da6.Text = row.Cells("Day6").Value.ToString
da7.Text = row.Cells("Day7").Value.ToString
da8.Text = row.Cells("Day8").Value.ToString
da9.Text = row.Cells("Day9").Value.ToString
da10.Text = row.Cells("Day10").Value.ToString
da11.Text = row.Cells("Day11").Value.ToString
da12.Text = row.Cells("Day12").Value.ToString
da13.Text = row.Cells("Day13").Value.ToString
da14.Text = row.Cells("Day14").Value.ToString
da15.Text = row.Cells("Day15").Value.ToString
da16.Text = row.Cells("Day16").Value.ToString

ra1.Text = row.Cells("Room1").Value.ToString
ra2.Text = row.Cells("Room2").Value.ToString
ra3.Text = row.Cells("Room3").Value.ToString
ra4.Text = row.Cells("Room4").Value.ToString
ra5.Text = row.Cells("Room5").Value.ToString
ra6.Text = row.Cells("Room6").Value.ToString
ra7.Text = row.Cells("Room7").Value.ToString
ra8.Text = row.Cells("Room8").Value.ToString
ra9.Text = row.Cells("Room9").Value.ToString
ra10.Text = row.Cells("Room10").Value.ToString
ra11.Text = row.Cells("Room11").Value.ToString
ra12.Text = row.Cells("Room12").Value.ToString
ra13.Text = row.Cells("Room13").Value.ToString
ra14.Text = row.Cells("Room14").Value.ToString
ra15.Text = row.Cells("Room15").Value.ToString
ra16.Text = row.Cells("Room16").Value.ToString

y1.Text = row.Cells("Section").Value.ToString
y2.Text = row.Cells("Section2").Value.ToString
y3.Text = row.Cells("Section3").Value.ToString
y4.Text = row.Cells("Section4").Value.ToString
y5.Text = row.Cells("Section5").Value.ToString
y6.Text = row.Cells("Section6").Value.ToString
y7.Text = row.Cells("Section7").Value.ToString
y8.Text = row.Cells("Section8").Value.ToString
y9.Text = row.Cells("Section9").Value.ToString
y10.Text = row.Cells("Section10").Value.ToString
y11.Text = row.Cells("Section11").Value.ToString
y12.Text = row.Cells("Section12").Value.ToString
y13.Text = row.Cells("Section13").Value.ToString
y14.Text = row.Cells("Section14").Value.ToString
y15.Text = row.Cells("Section15").Value.ToString
y16.Text = row.Cells("Section16").Value.ToString

End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Button1.Visible = False
Form10.Show()
id.Text = ""
fname.Text = ""
lname.Text = ""
mname.Text = ""
con.Text = ""
cd1.Text = ""
cd2.Text = ""
cd3.Text = ""
cd4.Text = ""
cd5.Text = ""
cd6.Text = ""
cd7.Text = ""
cd8.Text = ""
cd9.Text = ""
cd10.Text = ""
cd11.Text = ""
cd12.Text = ""
cd13.Text = ""
cd14.Text = ""
cd15.Text = ""
cd16.Text = ""

ti1.Text = ""
ti2.Text = ""
ti3.Text = ""
ti4.Text = ""
ti5.Text = ""
ti6.Text = ""
ti7.Text = ""
ti8.Text = ""
ti9.Text = ""
ti10.Text = ""
ti11.Text = ""
ti12.Text = ""
ti13.Text = ""
ti14.Text = ""
ti15.Text = ""
ti16.Text = ""
da1.Text = ""
da2.Text = ""
da3.Text = ""
da4.Text = ""
da5.Text = ""
da6.Text = ""
da7.Text = ""
da8.Text = ""
da9.Text = ""
da10.Text = ""
da11.Text = ""
da12.Text = ""
da13.Text = ""
da14.Text = ""
da15.Text = ""
da16.Text = ""

ra1.Text = ""
ra2.Text = ""
ra3.Text = ""
ra4.Text = ""
ra5.Text = ""
ra6.Text = ""
ra7.Text = ""
ra8.Text = ""
ra9.Text = ""
ra10.Text = ""
ra11.Text = ""
ra12.Text = ""
ra13.Text = ""
ra14.Text = ""
ra15.Text = ""
ra16.Text = ""

y1.Text = ""
y2.Text = ""
y3.Text = ""
y4.Text = ""
y5.Text = ""
y6.Text = ""
y7.Text = ""
y8.Text = ""
y9.Text = ""
y10.Text = ""
y11.Text = ""
y12.Text = ""
y13.Text = ""
y14.Text = ""
y15.Text = ""
y16.Text = ""

Me.Hide()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button4.Click
GroupBox1.Visible = True
GroupBox2.Visible = False
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button5.Click
GroupBox1.Visible = False
GroupBox2.Visible = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Button2.Visible = False
Form8.Show()
id.Text = ""
fname.Text = ""
lname.Text = ""
mname.Text = ""
con.Text = ""
cd1.Text = ""
cd2.Text = ""
cd3.Text = ""
cd4.Text = ""
cd5.Text = ""
cd6.Text = ""
cd7.Text = ""
cd8.Text = ""
cd9.Text = ""
cd10.Text = ""
cd11.Text = ""
cd12.Text = ""
cd13.Text = ""
cd14.Text = ""
cd15.Text = ""
cd16.Text = ""

ti1.Text = ""
ti2.Text = ""
ti3.Text = ""
ti4.Text = ""
ti5.Text = ""
ti6.Text = ""
ti7.Text = ""
ti8.Text = ""
ti9.Text = ""
ti10.Text = ""
ti11.Text = ""
ti12.Text = ""
ti13.Text = ""
ti14.Text = ""
ti15.Text = ""
ti16.Text = ""

da1.Text = ""
da2.Text = ""
da3.Text = ""
da4.Text = ""
da5.Text = ""
da6.Text = ""
da7.Text = ""
da8.Text = ""
da9.Text = ""
da10.Text = ""
da11.Text = ""
da12.Text = ""
da13.Text = ""
da14.Text = ""
da15.Text = ""
da16.Text = ""

ra1.Text = ""
ra2.Text = ""
ra3.Text = ""
ra4.Text = ""
ra5.Text = ""
ra6.Text = ""
ra7.Text = ""
ra8.Text = ""
ra9.Text = ""
ra10.Text = ""
ra11.Text = ""
ra12.Text = ""
ra13.Text = ""
ra14.Text = ""
ra15.Text = ""
ra16.Text = ""

y1.Text = ""
y2.Text = ""
y3.Text = ""
y4.Text = ""
y5.Text = ""
y6.Text = ""
y7.Text = ""
y8.Text = ""
y9.Text = ""
y10.Text = ""
y11.Text = ""
y12.Text = ""
y13.Text = ""
y14.Text = ""
y15.Text = ""
y16.Text = ""
Me.Hide()
End Sub
End Class

Imports MySql.Data.MySqlClient

Public Class Form18


Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As
System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox1.Text = "1" Then
q1.Enabled = True
q2.Enabled = False
q3.Enabled = False
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "2" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = False
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "3" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "4" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "5" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "6" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = True
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "7" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = True
q7.Enabled = True
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "8" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = True
q7.Enabled = True
q8.Enabled = True
q9.Enabled = False
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "9" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = True
q7.Enabled = True
q8.Enabled = True
q9.Enabled = True
q10.Enabled = False
clear()
ElseIf TextBox1.Text = "10" Then
q1.Enabled = True
q2.Enabled = True
q3.Enabled = True
q4.Enabled = True
q5.Enabled = True
q6.Enabled = True
q7.Enabled = True
q8.Enabled = True
q9.Enabled = True
q10.Enabled = True
clear()

ElseIf TextBox1.Text >= 11 Then


MessageBox.Show("Invalid Input")
TextBox1.Text = ""
q1.Enabled = False
q2.Enabled = False
q3.Enabled = False
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False
clear()
End If
End If
End Sub

Private Sub TextBox2_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox2.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox2.Text = "1" Then
a1.Enabled = True
a2.Enabled = False
a3.Enabled = False
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "2" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = False
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "3" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "4" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "5" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "6" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = True
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "7" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = True
a7.Enabled = True
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "8" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = True
a7.Enabled = True
a8.Enabled = True
a9.Enabled = False
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "9" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = True
a7.Enabled = True
a8.Enabled = True
a9.Enabled = True
a10.Enabled = False
clear1()
ElseIf TextBox2.Text = "10" Then
a1.Enabled = True
a2.Enabled = True
a3.Enabled = True
a4.Enabled = True
a5.Enabled = True
a6.Enabled = True
a7.Enabled = True
a8.Enabled = True
a9.Enabled = True
a10.Enabled = True
clear1()

ElseIf TextBox2.Text >= 11 Then


MessageBox.Show("Invalid Input")
TextBox2.Text = ""
a1.Enabled = False
a2.Enabled = False
a3.Enabled = False
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False
clear1()
End If
End If
End Sub

Private Sub TextBox3_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox3.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox3.Text = "1" Then
as1.Enabled = True
as2.Enabled = False
as3.Enabled = False
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "2" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = False
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "3" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "4" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "5" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "6" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = True
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "7" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = True
as7.Enabled = True
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "8" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = True
as7.Enabled = True
as8.Enabled = True
as9.Enabled = False
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "9" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = True
as7.Enabled = True
as8.Enabled = True
as9.Enabled = True
as10.Enabled = False
clear2()
ElseIf TextBox3.Text = "10" Then
as1.Enabled = True
as2.Enabled = True
as3.Enabled = True
as4.Enabled = True
as5.Enabled = True
as6.Enabled = True
as7.Enabled = True
as8.Enabled = True
as9.Enabled = True
as10.Enabled = True
clear2()

ElseIf TextBox3.Text >= 11 Then


MessageBox.Show("Invalid Input")
TextBox3.Text = ""
as1.Enabled = False
as2.Enabled = False
as3.Enabled = False
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False
clear2()
End If
End If
End Sub

Private Sub TextBox4_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox4.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox4.Text = "1" Then
r1.Enabled = True
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "2" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "3" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "4" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "5" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "6" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "7" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = True
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "8" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = True
r8.Enabled = True
r9.Enabled = False
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "9" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = True
r8.Enabled = True
r9.Enabled = True
r10.Enabled = False
clear3()
ElseIf TextBox4.Text = "10" Then
r1.Enabled = True
r2.Enabled = True
r3.Enabled = True
r4.Enabled = True
r5.Enabled = True
r6.Enabled = True
r7.Enabled = True
r8.Enabled = True
r9.Enabled = True
r10.Enabled = True
clear3()

ElseIf TextBox4.Text >= 11 Then


MessageBox.Show("Invalid Input")
TextBox4.Text = ""
r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False
clear3()
End If
End If
End Sub

Private Sub TextBox5_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox5.KeyDown
If e.KeyCode = Keys.Enter Then
If TextBox5.Text = "1" Then
w1.Enabled = True
w2.Enabled = False
w3.Enabled = False
w4.Enabled = False
w5.Enabled = False
clear4()

ElseIf TextBox5.Text = "2" Then


w1.Enabled = True
w2.Enabled = True
w3.Enabled = False
w4.Enabled = False
w5.Enabled = False
clear4()

ElseIf TextBox5.Text = "3" Then


w1.Enabled = True
w2.Enabled = True
w3.Enabled = True
w4.Enabled = False
w5.Enabled = False
clear4()

ElseIf TextBox5.Text = "4" Then


w1.Enabled = True
w2.Enabled = True
w3.Enabled = True
w4.Enabled = True
w5.Enabled = False
clear4()

ElseIf TextBox5.Text = "5" Then


w1.Enabled = True
w2.Enabled = True
w3.Enabled = True
w4.Enabled = True
w5.Enabled = True
clear4()

ElseIf TextBox5.Text >= 6 Then


MessageBox.Show("Invalid Input")
TextBox5.Text = ""
w1.Enabled = False
w2.Enabled = False
w3.Enabled = False
w4.Enabled = False
w5.Enabled = False
clear4()

End If
End If
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com1.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid='" & midd.Text &
"',fin='" & fin.Text & "',tage='" & tage.Text & "',marks='" & marks.Text & "',grade='" & grade.Text
& "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub
Private Sub compute()
TextBox6.Text = (Val(q1.Text) + Val(q2.Text) + Val(q3.Text) + Val(q4.Text) + Val(q5.Text) +
Val(q6.Text) + Val(q7.Text) + Val(q8.Text) + Val(q9.Text) + Val(q10.Text)) / Val(TextBox1.Text)
TextBox7.Text = (Val(a1.Text) + Val(a2.Text) + Val(a3.Text) + Val(a4.Text) + Val(a5.Text) +
Val(a6.Text) + Val(a7.Text) + Val(a8.Text) + Val(a9.Text) + Val(a10.Text)) / Val(TextBox2.Text)
TextBox8.Text = (Val(as1.Text) + Val(as2.Text) + Val(as3.Text) + Val(as4.Text) + Val(as5.Text)
+ Val(as6.Text) + Val(as7.Text) + Val(as8.Text) + Val(as9.Text) + Val(as10.Text)) /
Val(TextBox3.Text)
TextBox9.Text = (Val(r1.Text) + Val(r2.Text) + Val(r3.Text) + Val(r4.Text) + Val(r5.Text) +
Val(r6.Text) + Val(r7.Text) + Val(r8.Text) + Val(r9.Text) + Val(r10.Text)) / Val(TextBox4.Text)
TextBox10.Text = (Val(w1.Text) + Val(w2.Text) + Val(w3.Text) + Val(w4.Text) + Val(w5.Text)) /
Val(TextBox5.Text)
TextBox11.Text = (Val(TextBox6.Text) + Val(TextBox7.Text) + (TextBox8.Text) +
Val(TextBox9.Text) + Val(TextBox10.Text)) / 5 * 0.7

TextBox12.Text = (Val(att.Text) + Val(cha.Text)) / 2 * 0.1


TextBox13.Text = (Val(fin.Text) + Val(tag.Text)) / 2 * 0.2
tage.Text = Val(TextBox11.Text) + Val(TextBox12.Text) + Val(TextBox13.Text)

If tage.Text >= 97 And tage.Text <= 100 Then


grade.Text = "1.00"
marks.Text = "PASSED"

ElseIf tage.Text >= 96 And tage.Text < 97 Then


grade.Text = "1.25"
marks.Text = "PASSED"
ElseIf tage.Text >= 94 And tage.Text <= 96 Then
grade.Text = "1.25"
marks.Text = "PASSED"

ElseIf tage.Text >= 93 And tage.Text < 94 Then


grade.Text = "1.50"
marks.Text = "PASSED"
ElseIf tage.Text >= 91 And tage.Text <= 93 Then
grade.Text = "1.50"
marks.Text = "PASSED"

ElseIf tage.Text >= 90 And tage.Text < 91 Then


grade.Text = "1.75"
marks.Text = "PASSED"
ElseIf tage.Text >= 88 And tage.Text <= 90 Then
grade.Text = "1.75"
marks.Text = "PASSED"

ElseIf tage.Text >= 87 And tage.Text < 88 Then


grade.Text = "2.00"
marks.Text = "PASSED"
ElseIf tage.Text >= 85 And tage.Text <= 87 Then
grade.Text = "2.00"
marks.Text = "PASSED"

ElseIf tage.Text >= 84 And tage.Text < 85 Then


grade.Text = "2.25"
marks.Text = "PASSED"
ElseIf tage.Text >= 82 And tage.Text <= 84 Then
grade.Text = "2.25"
marks.Text = "PASSED"

ElseIf tage.Text >= 81 And tage.Text < 82 Then


grade.Text = "2.50"
marks.Text = "PASSED"
ElseIf tage.Text >= 79 And tage.Text <= 81 Then
grade.Text = "2.50"
marks.Text = "PASSED"

ElseIf tage.Text >= 78 And tage.Text < 79 Then


grade.Text = "2.75"
marks.Text = "PASSED"
ElseIf tage.Text >= 76 And tage.Text <= 78 Then
grade.Text = "2.75"
marks.Text = "PASSED"

ElseIf tage.Text >= 75 Then


grade.Text = "3.00"
marks.Text = "PASSED"

Else
grade.Text = "5.00"
marks.Text = "FAILED"

End If

End Sub

Private Sub TextBox18_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles TextBox18.KeyDown
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

If e.KeyCode = Keys.Enter Then


conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

id.Text = reader.GetString("student_id")
ln.Text = reader.GetString("last_name")
fn.Text = reader.GetString("first_name")
mn.Text = reader.GetString("middle_name")
sub1.Text = reader.GetString("sub1")
sub2.Text = reader.GetString("sub2")
sub3.Text = reader.GetString("sub3")
sub4.Text = reader.GetString("sub4")
sub5.Text = reader.GetString("sub5")
sub6.Text = reader.GetString("sub6")
sub7.Text = reader.GetString("sub7")
sub8.Text = reader.GetString("sub8")
sub9.Text = reader.GetString("sub9")
sub10.Text = reader.GetString("sub10")
sub11.Text = reader.GetString("sub11")
sub12.Text = reader.GetString("sub12")
Else
MessageBox.Show("No Record Found")
TextBox18.Text = ""
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub sub1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub1.Click

conn = New MySqlConnection


conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage")
grade.Text = reader.GetString("grade")
marks.Text = reader.GetString("marks")
tag.Text = reader.GetString("tage1")

subject.Text = sub1.Text

com1.Visible = True
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = True
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub sub1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub1.MouseHover
sub1.Cursor = Cursors.Hand
End Sub

Private Sub sub2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub2.MouseHover
sub2.Cursor = Cursors.Hand
End Sub

Private Sub sub3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub3.MouseHover
sub3.Cursor = Cursors.Hand
End Sub

Private Sub sub4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub4.MouseHover
sub4.Cursor = Cursors.Hand
End Sub

Private Sub sub5_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub5.MouseHover
sub5.Cursor = Cursors.Hand
End Sub
Private Sub sub6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles
sub6.MouseHover
sub6.Cursor = Cursors.Hand
End Sub

Private Sub sub7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub7.MouseHover
sub7.Cursor = Cursors.Hand
End Sub

Private Sub sub8_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub8.MouseHover
sub8.Cursor = Cursors.Hand
End Sub

Private Sub sub9_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub9.MouseHover
sub9.Cursor = Cursors.Hand
End Sub

Private Sub sub10_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub10.MouseHover
sub10.Cursor = Cursors.Hand
End Sub

Private Sub sub11_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub11.MouseHover
sub11.Cursor = Cursors.Hand
End Sub

Private Sub sub12_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


sub12.MouseHover
sub12.Cursor = Cursors.Hand
End Sub

Private Sub com2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com2.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid2='" & midd.Text &
"',fin2='" & fin.Text & "',tage2='" & tage.Text & "',marks2='" & marks.Text & "',grade2='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub sub2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub2.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage2")
grade.Text = reader.GetString("grade2")
marks.Text = reader.GetString("marks2")
tag.Text = reader.GetString("tage22")

subject.Text = sub2.Text

com1.Visible = False
com2.Visible = True
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = True
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub sub3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub3.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage3")
grade.Text = reader.GetString("grade3")
marks.Text = reader.GetString("marks3")
tag.Text = reader.GetString("tage33")
subject.Text = sub3.Text

com1.Visible = False
com2.Visible = False
com3.Visible = True
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = True
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub com3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com3.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid3='" & midd.Text &
"',fin3='" & fin.Text & "',tage3='" & tage.Text & "',marks3='" & marks.Text & "',grade3='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
midd.Text = ""
fin.Text = ""
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""
w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
midd.Text = ""
fin.Text = ""
Form20.Show()
Me.Hide()
End Sub

Private Sub sub4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub4.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage4")
grade.Text = reader.GetString("grade4")
marks.Text = reader.GetString("marks4")
tag.Text = reader.GetString("tage44")

subject.Text = sub4.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = True
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = True
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False

trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub com4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com4.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid4='" & midd.Text &
"',fin4='" & fin.Text & "',tage4='" & tage.Text & "',marks4='" & marks.Text & "',grade4='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub

Private Sub clear()

q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""
att.Text = ""
cha.Text = ""
tage.Text = ""
grade.Text = ""
marks.Text = ""

End Sub
Private Sub clear1()
a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

End Sub
Private Sub clear2()
as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

End Sub
Private Sub clear3()
r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

End Sub
Private Sub clear4()

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""
End Sub
Private Sub trans()
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""

q1.Enabled = False
q2.Enabled = False
q3.Enabled = False
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False

a1.Enabled = False
a2.Enabled = False
a3.Enabled = False
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False

as1.Enabled = False
as2.Enabled = False
as3.Enabled = False
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False

r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False

w1.Enabled = False
w2.Enabled = False
w3.Enabled = False
w4.Enabled = False
w5.Enabled = False
End Sub

Private Sub com11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com11.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid='" & midd.Text &
"',fin='" & fin.Text & "',tage1='" & tage.Text & "',marks1='" & marks.Text & "',grade1='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub compute1()


TextBox6.Text = (Val(q1.Text) + Val(q2.Text) + Val(q3.Text) + Val(q4.Text) + Val(q5.Text) +
Val(q6.Text) + Val(q7.Text) + Val(q8.Text) + Val(q9.Text) + Val(q10.Text)) / Val(TextBox1.Text)
TextBox7.Text = (Val(a1.Text) + Val(a2.Text) + Val(a3.Text) + Val(a4.Text) + Val(a5.Text) +
Val(a6.Text) + Val(a7.Text) + Val(a8.Text) + Val(a9.Text) + Val(a10.Text)) / Val(TextBox2.Text)
TextBox8.Text = (Val(as1.Text) + Val(as2.Text) + Val(as3.Text) + Val(as4.Text) + Val(as5.Text)
+ Val(as6.Text) + Val(as7.Text) + Val(as8.Text) + Val(as9.Text) + Val(as10.Text)) /
Val(TextBox3.Text)
TextBox9.Text = (Val(r1.Text) + Val(r2.Text) + Val(r3.Text) + Val(r4.Text) + Val(r5.Text) +
Val(r6.Text) + Val(r7.Text) + Val(r8.Text) + Val(r9.Text) + Val(r10.Text)) / Val(TextBox4.Text)
TextBox10.Text = (Val(w1.Text) + Val(w2.Text) + Val(w3.Text) + Val(w4.Text) + Val(w5.Text)) /
Val(TextBox5.Text)
TextBox11.Text = (Val(TextBox6.Text) + Val(TextBox7.Text) + (TextBox8.Text) +
Val(TextBox9.Text) + Val(TextBox10.Text)) / 5 * 0.7

TextBox12.Text = (Val(att.Text) + Val(cha.Text)) / 2 * 0.1


TextBox13.Text = Val(midd.Text) * 0.2
tage.Text = Val(TextBox11.Text) + Val(TextBox12.Text) + Val(TextBox13.Text)

If tage.Text >= 97 And tage.Text <= 100 Then


grade.Text = "1.00"
marks.Text = "PASSED"

ElseIf tage.Text >= 96 And tage.Text < 97 Then


grade.Text = "1.25"
marks.Text = "PASSED"
ElseIf tage.Text >= 94 And tage.Text <= 96 Then
grade.Text = "1.25"
marks.Text = "PASSED"

ElseIf tage.Text >= 93 And tage.Text < 94 Then


grade.Text = "1.50"
marks.Text = "PASSED"
ElseIf tage.Text >= 91 And tage.Text <= 93 Then
grade.Text = "1.50"
marks.Text = "PASSED"

ElseIf tage.Text >= 90 And tage.Text < 91 Then


grade.Text = "1.75"
marks.Text = "PASSED"
ElseIf tage.Text >= 88 And tage.Text <= 90 Then
grade.Text = "1.75"
marks.Text = "PASSED"

ElseIf tage.Text >= 87 And tage.Text < 88 Then


grade.Text = "2.00"
marks.Text = "PASSED"
ElseIf tage.Text >= 85 And tage.Text <= 87 Then
grade.Text = "2.00"
marks.Text = "PASSED"

ElseIf tage.Text >= 84 And tage.Text < 85 Then


grade.Text = "2.25"
marks.Text = "PASSED"
ElseIf tage.Text >= 82 And tage.Text <= 84 Then
grade.Text = "2.25"
marks.Text = "PASSED"

ElseIf tage.Text >= 81 And tage.Text < 82 Then


grade.Text = "2.50"
marks.Text = "PASSED"
ElseIf tage.Text >= 79 And tage.Text <= 81 Then
grade.Text = "2.50"
marks.Text = "PASSED"

ElseIf tage.Text >= 78 And tage.Text < 79 Then


grade.Text = "2.75"
marks.Text = "PASSED"
ElseIf tage.Text >= 76 And tage.Text <= 78 Then
grade.Text = "2.75"
marks.Text = "PASSED"

ElseIf tage.Text = 75 Then


grade.Text = "3.00"
marks.Text = "PASSED"

Else
grade.Text = "5.00"
marks.Text = "FAILED"

End If

End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com22.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid2='" & midd.Text &
"',fin2='" & fin.Text & "',tage22='" & tage.Text & "',marks22='" & marks.Text & "',grade22='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub
Private Sub com33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles com33.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid3='" & midd.Text &
"',fin3='" & fin.Text & "',tage33='" & tage.Text & "',marks33='" & marks.Text & "',grade33='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com44_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com44.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid4='" & midd.Text &
"',fin4='" & fin.Text & "',tage44='" & tage.Text & "',marks44='" & marks.Text & "',grade44='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com5.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid5='" & midd.Text &
"',fin5='" & fin.Text & "',tage5='" & tage.Text & "',marks5='" & marks.Text & "',grade5='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub

Private Sub com55_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com55.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid5='" & midd.Text &
"',fin5='" & fin.Text & "',tage55='" & tage.Text & "',marks55='" & marks.Text & "',grade55='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub sub5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub5.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage5")
grade.Text = reader.GetString("grade5")
marks.Text = reader.GetString("marks5")
tag.Text = reader.GetString("tage55")

subject.Text = sub5.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = True
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = True
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub com6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com6.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid6='" & midd.Text &
"',fin6='" & fin.Text & "',tage6='" & tage.Text & "',marks6='" & marks.Text & "',grade6='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If

End Sub

Private Sub com66_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com66.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then
Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid6='" & midd.Text &
"',fin6='" & fin.Text & "',tage66='" & tage.Text & "',marks66='" & marks.Text & "',grade66='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub sub6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub6.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage6")
grade.Text = reader.GetString("grade6")
marks.Text = reader.GetString("marks6")
tag.Text = reader.GetString("tage66")
subject.Text = sub6.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = True
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = True
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub7.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage7")
grade.Text = reader.GetString("grade7")
marks.Text = reader.GetString("marks7")
tag.Text = reader.GetString("tage77")

subject.Text = sub7.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = True
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = True
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub8.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage8")
grade.Text = reader.GetString("grade8")
marks.Text = reader.GetString("marks8")
tag.Text = reader.GetString("tage88")

subject.Text = sub8.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = True
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = True
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


sub9.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage9")
grade.Text = reader.GetString("grade9")
marks.Text = reader.GetString("marks9")
tag.Text = reader.GetString("tage99")

subject.Text = sub9.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = True
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = True
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles sub10.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage10")
grade.Text = reader.GetString("grade10")
marks.Text = reader.GetString("marks10")
tag.Text = reader.GetString("mid100")

subject.Text = sub10.Text
com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = True
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = True
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles sub11.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage11")
grade.Text = reader.GetString("grade11")
marks.Text = reader.GetString("marks11")
tag.Text = reader.GetString("tage111")

subject.Text = sub11.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = True
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = True
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub sub12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles sub12.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & TextBox18.Text & "' or
last_name='" & TextBox18.Text & "' or first_name='" & TextBox18.Text & "' or middle_name='" &
TextBox18.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage12")
grade.Text = reader.GetString("grade12")
marks.Text = reader.GetString("marks12")
tag.Text = reader.GetString("tage112")

subject.Text = sub12.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = True

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = True
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub com7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com7.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid7='" & midd.Text &
"',fin7='" & fin.Text & "',tage7='" & tage.Text & "',marks7='" & marks.Text & "',grade7='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com77_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com77.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid7='" & midd.Text &
"',fin7='" & fin.Text & "',tage77='" & tage.Text & "',marks77='" & marks.Text & "',grade77='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com8.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid8='" & midd.Text &
"',fin8='" & fin.Text & "',tage8='" & tage.Text & "',marks8='" & marks.Text & "',grade8='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com88_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com88.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid8='" & midd.Text &
"',fin8='" & fin.Text & "',tage88='" & tage.Text & "',marks88='" & marks.Text & "',grade88='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""
att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


com9.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid9='" & midd.Text &
"',fin9='" & fin.Text & "',tage9='" & tage.Text & "',marks9='" & marks.Text & "',grade9='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com99.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid9='" & midd.Text &
"',fin9='" & fin.Text & "',tage99='" & tage.Text & "',marks99='" & marks.Text & "',grade99='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com10.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid10='" & midd.Text &
"',fin10='" & fin.Text & "',tage10='" & tage.Text & "',marks10='" & marks.Text & "',grade10='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com100_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com100.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid10='" & midd.Text &
"',fin10='" & fin.Text & "',tage100='" & tage.Text & "',marks100='" & marks.Text & "',grade100='"
& grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub coms11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles coms11.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid11='" & midd.Text &
"',fin11='" & fin.Text & "',tage11='" & tage.Text & "',marks11='" & marks.Text & "',grade11='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""
a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com111_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com111.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid11='" & midd.Text &
"',fin11='" & fin.Text & "',tage111='" & tage.Text & "',marks111='" & marks.Text & "',grade111='"
& grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com12.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then

Else
compute()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid12='" & midd.Text &
"',fin12='" & fin.Text & "',tage12='" & tage.Text & "',marks12='" & marks.Text & "',grade12='" &
grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
fin.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub

Private Sub com122_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles com122.Click
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox5.Text = "" Then
Else
compute1()
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "update gradingdb.std_info set student_id='" & id.Text & "',last_name='" &
ln.Text & "',first_name='" & fn.Text & "',middle_name='" & mn.Text & "',mid12='" & midd.Text &
"',fin12='" & fin.Text & "',tage112='" & tage.Text & "',marks112='" & marks.Text & "',grade112='"
& grade.Text & "' where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
dis()
midd.Text = ""
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
conn.Close()

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End If
End Sub
Private Sub dis()
q1.Enabled = False
q2.Enabled = False
q3.Enabled = False
q4.Enabled = False
q5.Enabled = False
q6.Enabled = False
q7.Enabled = False
q8.Enabled = False
q9.Enabled = False
q10.Enabled = False

a1.Enabled = False
a2.Enabled = False
a3.Enabled = False
a4.Enabled = False
a5.Enabled = False
a6.Enabled = False
a7.Enabled = False
a8.Enabled = False
a9.Enabled = False
a10.Enabled = False

as1.Enabled = False
as2.Enabled = False
as3.Enabled = False
as4.Enabled = False
as5.Enabled = False
as6.Enabled = False
as7.Enabled = False
as8.Enabled = False
as9.Enabled = False
as10.Enabled = False

r1.Enabled = False
r2.Enabled = False
r3.Enabled = False
r4.Enabled = False
r5.Enabled = False
r6.Enabled = False
r7.Enabled = False
r8.Enabled = False
r9.Enabled = False
r10.Enabled = False

w1.Enabled = False
w2.Enabled = False
w3.Enabled = False
w4.Enabled = False
w5.Enabled = False
End Sub

Private Sub subb1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb1.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String

query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage")
grade.Text = reader.GetString("grade")
marks.Text = reader.GetString("marks")
tag.Text = reader.GetString("tage1")
subject.Text = subb1.Text

com1.Visible = True
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = True
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub subb2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb2.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage2")
grade.Text = reader.GetString("grade2")
marks.Text = reader.GetString("marks2")
tag.Text = reader.GetString("tage22")
subject.Text = subb2.Text

com1.Visible = False
com2.Visible = True
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = True
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub subb3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb3.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage3")
grade.Text = reader.GetString("grade3")
marks.Text = reader.GetString("marks3")
tag.Text = reader.GetString("tage33")

subject.Text = subb3.Text

com1.Visible = False
com2.Visible = False
com3.Visible = True
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = True
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub subb4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb4.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage4")
grade.Text = reader.GetString("grade4")
marks.Text = reader.GetString("marks4")
tag.Text = reader.GetString("tage44")

subject.Text = subb4.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = True
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = True
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False

trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb5.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage5")

grade.Text = reader.GetString("grade5")
marks.Text = reader.GetString("marks5")
tag.Text = reader.GetString("tage55")

subject.Text = subb5.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = True
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = True
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb6.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage6")
grade.Text = reader.GetString("grade6")
marks.Text = reader.GetString("marks6")
tag.Text = reader.GetString("tage66")
subject.Text = subb6.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = True
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = True
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb7.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage7")
grade.Text = reader.GetString("grade7")
marks.Text = reader.GetString("marks7")
tag.Text = reader.GetString("tage77")

subject.Text = subb7.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = True
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = True
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb8.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage8")
grade.Text = reader.GetString("grade8")
marks.Text = reader.GetString("marks8")
tag.Text = reader.GetString("tage88")

subject.Text = subb8.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = True
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = True
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb9.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage9")
grade.Text = reader.GetString("grade9")
marks.Text = reader.GetString("marks9")
tag.Text = reader.GetString("tage99")

subject.Text = subb9.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = True
com10.Visible = False
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = True
com100.Visible = False
com111.Visible = False
com122.Visible = False
trans()

End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb10.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

tage.Text = reader.GetString("tage10")
grade.Text = reader.GetString("grade10")
marks.Text = reader.GetString("marks10")
tag.Text = reader.GetString("tage100")
subject.Text = subb10.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = True
coms11.Visible = False
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = True
com111.Visible = False
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb11.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

grade.Text = reader.GetString("grade11")
marks.Text = reader.GetString("marks11")
tage.Text = reader.GetString("tage11")
tag.Text = reader.GetString("tage111")
subject.Text = subb11.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = True
com12.Visible = False

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = True
com122.Visible = False
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles subb12.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"

Try
conn.Open()
Dim query As String
query = "select * from gradingdb.std_info where student_id='" & id.Text & "'"
command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = command.ExecuteReader

Dim count As Integer


count = 0
While reader.Read
count = count + 1
End While

If count = 1 Then

grade.Text = reader.GetString("grade12")
marks.Text = reader.GetString("marks12")
tage.Text = reader.GetString("tage12")
tag.Text = reader.GetString("tage112")

subject.Text = subb12.Text

com1.Visible = False
com2.Visible = False
com3.Visible = False
com4.Visible = False
com5.Visible = False
com6.Visible = False
com7.Visible = False
com8.Visible = False
com9.Visible = False
com10.Visible = False
coms11.Visible = False
com12.Visible = True

com11.Visible = False
com22.Visible = False
com33.Visible = False
com44.Visible = False
com55.Visible = False
com66.Visible = False
com77.Visible = False
com88.Visible = False
com99.Visible = False
com100.Visible = False
com111.Visible = False
com122.Visible = True
trans()

End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub subb1_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb1.MouseHover
subb1.Cursor = Cursors.Hand
End Sub

Private Sub subb2_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb2.MouseHover
subb2.Cursor = Cursors.Hand
End Sub

Private Sub subb3_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb3.MouseHover
subb3.Cursor = Cursors.Hand
End Sub

Private Sub subb4_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb4.MouseHover
subb4.Cursor = Cursors.Hand
End Sub

Private Sub subb5_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb5.MouseHover
subb5.Cursor = Cursors.Hand
End Sub

Private Sub subb6_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb6.MouseHover
subb6.Cursor = Cursors.Hand
End Sub

Private Sub subb7_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb7.MouseHover
subb7.Cursor = Cursors.Hand
End Sub

Private Sub subb8_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb8.MouseHover
subb8.Cursor = Cursors.Hand
End Sub

Private Sub subb9_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles


subb9.MouseHover
subb9.Cursor = Cursors.Hand
End Sub

Private Sub subb10_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles subb10.MouseHover
subb10.Cursor = Cursors.Hand
End Sub

Private Sub subb11_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles subb11.MouseHover
subb11.Cursor = Cursors.Hand
End Sub

Private Sub subb12_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs)


Handles subb12.MouseHover
subb12.Cursor = Cursors.Hand
End Sub

Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox4.Text = ""
TextBox5.Text = ""
q1.Text = ""
q2.Text = ""
q3.Text = ""
q4.Text = ""
q5.Text = ""
q6.Text = ""
q7.Text = ""
q8.Text = ""
q9.Text = ""
q10.Text = ""

a1.Text = ""
a2.Text = ""
a3.Text = ""
a4.Text = ""
a5.Text = ""
a6.Text = ""
a7.Text = ""
a8.Text = ""
a9.Text = ""
a10.Text = ""

as1.Text = ""
as2.Text = ""
as3.Text = ""
as4.Text = ""
as5.Text = ""
as6.Text = ""
as7.Text = ""
as8.Text = ""
as9.Text = ""
as10.Text = ""

r1.Text = ""
r2.Text = ""
r3.Text = ""
r4.Text = ""
r5.Text = ""
r6.Text = ""
r7.Text = ""
r8.Text = ""
r9.Text = ""
r10.Text = ""

w1.Text = ""
w2.Text = ""
w3.Text = ""
w4.Text = ""
w5.Text = ""

att.Text = ""
cha.Text = ""
midd.Text = ""
fin.Text = ""
Form10.Show()
Me.Hide()
End Sub

End Class

Imports MySql.Data.MySqlClient
Public Class Form19

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form6.Show()
Me.Hide()
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

Try
Dim grade As String
grade = lblid.Text
Dim frm As New Form32(grade)
frm.Show()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
End Try
End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form20

Private Sub Form20_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
load_table1()
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox1.Text = "" Or ComboBox3.Text = "" Then

Else
filter_table()
End If
End Sub

Private Sub filter_table()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12'
from gradingdb.std_info where course = '" & ComboBox1.Text & "' and year = '" &
ComboBox3.Text & "' and section ='" & ComboBox2.Text & "' "
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub load_table1()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12' from
gradingdb.std_info"
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form8.Show()
Me.Hide()
ComboBox1.Text = ""
ComboBox2.Text = ""
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click

Form10.Show()
Me.Hide()

ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox1.SelectedIndexChanged
If ComboBox1.Text = "" Then
ComboBox3.Text = ""
ComboBox2.Text = ""
load_table1()
End If
End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

If e.RowIndex >= 0 Then


Dim row As DataGridViewRow
row = Me.DataGridView1.Rows(e.RowIndex)

Form18.id.Text = row.Cells("Student ID").Value.ToString


Form18.fn.Text = row.Cells("Name").Value.ToString
Form18.ln.Text = row.Cells("Lastname").Value.ToString
Form18.mn.Text = row.Cells("Middlename").Value.ToString
Form18.subb1.Text = row.Cells("Subject1").Value.ToString
Form18.subb2.Text = row.Cells("Subject2").Value.ToString
Form18.subb3.Text = row.Cells("Subject3").Value.ToString
Form18.subb4.Text = row.Cells("Subject4").Value.ToString
Form18.subb5.Text = row.Cells("Subject5").Value.ToString
Form18.subb6.Text = row.Cells("Subject6").Value.ToString
Form18.subb7.Text = row.Cells("Subject7").Value.ToString
Form18.subb8.Text = row.Cells("Subject8").Value.ToString
Form18.subb9.Text = row.Cells("Subject9").Value.ToString
Form18.subb10.Text = row.Cells("Subject10").Value.ToString
Form18.subb11.Text = row.Cells("Subject11").Value.ToString
Form18.subb12.Text = row.Cells("Subject12").Value.ToString
Form18.Show()
Form18.subb1.Visible = True
Form18.subb2.Visible = True
Form18.subb3.Visible = True
Form18.subb4.Visible = True
Form18.subb5.Visible = True
Form18.subb6.Visible = True
Form18.subb7.Visible = True
Form18.subb8.Visible = True
Form18.subb9.Visible = True
Form18.subb10.Visible = True
Form18.subb11.Visible = True
Form18.subb12.Visible = True

Form18.sub1.Visible = False
Form18.sub2.Visible = False
Form18.sub3.Visible = False
Form18.sub4.Visible = False
Form18.sub5.Visible = False
Form18.sub6.Visible = False
Form18.sub7.Visible = False
Form18.sub8.Visible = False
Form18.sub9.Visible = False
Form18.sub10.Visible = False
Form18.sub11.Visible = False
Form18.sub12.Visible = False

Me.Hide()

Form18.Button1.Visible = False
Form18.Button2.Visible = True

End If
End Sub

End Class

Imports MySql.Data.MySqlClient
Imports System.IO
Public Class Form21

Dim conn As MySqlConnection


Dim command As MySqlCommand
Dim a As OpenFileDialog = New OpenFileDialog

Private Sub Form21_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load

End Sub

Private Sub browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles browse.Click
Try
a.Filter = " Image Files | *.jpg"
If a.ShowDialog() = Windows.Forms.DialogResult.OK Then
PictureBox2.Image = Image.FromFile(a.FileName)

End If
Catch ex As Exception

End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
Dim mstream As New System.IO.MemoryStream()
PictureBox2.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
Dim arrimage() As Byte = mstream.GetBuffer()
mstream.Close()

conn.Open()
Dim query As String
query = "insert into
gradingdb.admin(id,username,password,name,lname,mname,mnth,day,year,cn,gender,addr,ima
ge) values ('" & idn.Text & "','" & user.Text & "','" & pass.Text & "','" & first.Text & "','" & last.Text &
"','" & middle.Text & "','" & month.Text & "','" & day.Text & "','" & ye.Text & "','" & con.Text & "','" &
gen.Text & "','" & addr.Text & "',@image)"
command = New MySqlCommand(query, conn)
command.Parameters.AddWithValue("@image", arrimage)
Dim reader As MySqlDataReader
reader = command.ExecuteReader
MessageBox.Show("Successfully Registered")
PictureBox2.Image = My.Resources.h
conn.Close()

idn.Text = ""
first.Text = ""
middle.Text = ""
last.Text = ""
month.Text = ""
day.Text = ""
ye.Text = ""
gen.Text = ""
con.Text = ""
addr.Text = ""

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Form22.Show()
Me.Hide()
idn.Text = ""
first.Text = ""
middle.Text = ""
last.Text = ""
month.Text = ""
day.Text = ""
ye.Text = ""
gen.Text = ""
con.Text = ""
addr.Text = ""
End Sub
End Class
Public Class Form22

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click
Form7.Show()
Me.Hide()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
Form9.Show()
Me.Hide()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button6.Click
Form12.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form24.Show()
Me.Hide()
End Sub

Private Sub PictureBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox3.Click
If Form24.TextBox2.Text = "encoder" Then
If MessageBox.Show("Please Change Your Password Before You Sign Out", "Confirmation",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
Me.Show()
Else
Me.Show()

End If
Else
Me.Hide()
Form23.Show()
End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form21.Show()
Form21.idn.Focus()
Me.Hide()
End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form23
Dim conn As MySqlConnection
Dim command As MySqlCommand

Private Sub PictureBox6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox6.Click
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
Form2.Show()
Me.Hide()
End Sub

Private Sub PictureBox7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles PictureBox7.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
Try
conn.Open()
Dim query As String
query = "select * from gradingdb.encoder where username = '" & TextBox1.Text & "' and
password = '" & TextBox2.Text & "'"
Command = New MySqlCommand(query, conn)
Dim reader As MySqlDataReader
reader = Command.ExecuteReader
Dim count As Integer
count = 0
While reader.Read
count = count + 1
End While

If count >= 1 Then


Form24.TextBox1.Text = reader.GetString("username")
Form24.TextBox2.Text = reader.GetString("password")
Form24.fn.Text = reader.GetString("name")
Form24.ln.Text = reader.GetString("lname")
Form24.mn.Text = reader.GetString("mname")
Form22.Show()
Me.Hide()
TextBox1.Text = ""
TextBox2.Text = ""

Else
MessageBox.Show("Invalid Account/Password")
TextBox1.Text = ""
TextBox2.Text = ""
TextBox1.Focus()
End If
conn.Close()

Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub
End Class

Imports MySql.Data.MySqlClient

Public Class Form24


Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Form22.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If pass1.Text = pass.Text Then

Try

conn.Open()
If user.Text = "" Or pass.Text = "" Or pass1.Text = "" Then
MessageBox.Show("All Field Required")
Else
Dim query As String
query = "update gradingdb.encoder set name='" & fn.Text & "',mname='" & mn.Text
& "',lname='" & ln.Text & "', password='" & pass.Text & "', username='" & user.Text & "' where
username='" & TextBox1.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
conn.Close()

MessageBox.Show("Account Changed")

TextBox2.Text = pass.Text
TextBox1.Text = user.Text

user.Text = ""
pass.Text = ""
pass1.Text = ""
Form22.Show()
Me.Hide()
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
Else

MessageBox.Show("Password Does Not Match")


pass.Text = ""
pass1.Text = ""

End If
End Sub
End Class

Imports MySql.Data.MySqlClient
Public Class Form25
Dim conn As MySqlConnection
Dim command As MySqlCommand
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles Button2.Click
Form8.Show()
Me.Hide()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
conn = New MySqlConnection
conn.ConnectionString =
"server=localhost;username=root;password=1111111111;database=gradingdb"
If pass1.Text = pass.Text Then

Try

conn.Open()
If user.Text = "" Or pass.Text = "" Or pass1.Text = "" Then
MessageBox.Show("All Field Required")
Else
Dim query As String
query = "update gradingdb.admin set name='" & fn.Text & "',mname='" & mn.Text &
"',lname='" & ln.Text & "', password='" & pass.Text & "', username='" & user.Text & "' where
username='" & TextBox1.Text & "'"

command = New MySqlCommand(query, conn)


Dim reader As MySqlDataReader
reader = command.ExecuteReader
conn.Close()

MessageBox.Show("Account Changed")

TextBox2.Text = pass.Text
TextBox1.Text = user.Text

user.Text = ""
pass.Text = ""
pass1.Text = ""
Form8.Show()
Me.Hide()
End If

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
Else

MessageBox.Show("Password Does Not Match")


pass.Text = ""
pass1.Text = ""

End If
End Sub
End Class

Imports CrystalDecisions.CrystalReports.Engine
Imports MySql.Data.MySqlClient
Imports CrystalDecisions.Shared
Public Class Form27

Dim da As MySqlDataAdapter
Dim ds As DataSet
Dim p(7) As MySqlParameter
Dim con As New
MySqlConnection("host=localhost;username=root;password=1111111111;database=gradingdb")

Public Sub New(ByVal sTitle As String)


InitializeComponent()

Try
Dim ds As New DataSet
Dim query As String
p(0) = New MySqlParameter("@studentid", MySqlDbType.String)
p(0).Value = sTitle
query = "select * from std_info where student_id = @studentid "
Dim dscmd As New MySqlDataAdapter(query, con)
dscmd.SelectCommand.Parameters.Add(p(0))
dscmd.Fill(ds, "model")
con.Close()
Dim cryds As New rep
cryds.SetDataSource(ds.Tables(0))
CrystalReportViewer1.ReportSource = cryds
CrystalReportViewer1.Refresh()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
con.Close()
End Try
con.Close()

End Sub

End Class

Imports MySql.Data.MySqlClient
Public Class Form28

Private Sub Form28_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
load_table1()
End Sub

Private Sub ComboBox2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox2.SelectedIndexChanged
If ComboBox1.Text = "" Or ComboBox3.Text = "" Then

Else
filter_table()
End If
End Sub

Private Sub filter_table()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12'
from gradingdb.std_info where course = '" & ComboBox1.Text & "' and year = '" &
ComboBox3.Text & "' and section ='" & ComboBox2.Text & "' "
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try
End Sub

Private Sub load_table1()

Dim conn As New


MySqlConnection("server=localhost;username=root;password=1111111111;database=gradingd
b")
Dim command As New MySqlCommand
Dim ds As New DataTable
Dim da As New MySqlDataAdapter
Dim bs As New BindingSource

Try
conn.Open()
command.Connection = conn
command.CommandType = CommandType.Text
command.CommandText = "select student_id as 'Student ID',last_name as
'Lastname',first_name as 'Name',middle_name as 'Middlename',gender as 'Gender',section as
'Section',course as 'Course',year as 'Year',sub1 as 'Subject1',sub2 as 'Subject2',sub3 as
'Subject3',sub4 as 'Subject4',sub5 as 'Subject5',sub6 as 'Subject6',sub7 as 'Subject7',sub8 as
'Subject8',sub9 as 'Subject9',sub10 as 'Subject10',sub11 as 'Subject11',sub12 as 'Subject12' from
gradingdb.std_info"
da.SelectCommand = command
da.Fill(ds)
bs.DataSource = ds
DataGridView1.DataSource = bs
da.Update(ds)
DataGridView1.Refresh()
conn.Close()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
Finally
conn.Dispose()
End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button1.Click
Form8.Show()
Me.Hide()
ComboBox1.Text = ""
ComboBox2.Text = ""
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button2.Click
Form10.Show()
Me.Hide()

ComboBox1.Text = ""
ComboBox2.Text = ""
ComboBox3.Text = ""
End Sub

Private Sub ComboBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox1.SelectedIndexChanged

If ComboBox1.Text = "" Then


ComboBox3.Text = ""
ComboBox2.Text = ""
load_table1()
End If

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button3.Click

Try
Dim sTitle As String
sTitle = TextBox1.Text
Dim frm As New Form27(sTitle)
frm.Show()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
End Try
End Sub

Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick
If e.RowIndex >= 0 Then
Dim row As DataGridViewRow
row = Me.DataGridView1.Rows(e.RowIndex)

TextBox1.Text = row.Cells("Student ID").Value.ToString

End If
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles Button4.Click
If ComboBox1.Text <> "" And ComboBox2.Text <> "" And ComboBox3.Text <> "" Then

Try
Dim sTitle As String
sTitle = ComboBox1.Text
Dim frm As New Form30(sTitle)
frm.Show()
Catch ex As MySqlException
MessageBox.Show(ex.Message)
End Try
Else
Form29.Show()
End If

End Sub

Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ComboBox3.SelectedIndexChanged
If ComboBox3.Text = "1" Or ComboBox3.Text = "2" Or ComboBox3.Text = "3" Or
ComboBox3.Text = "4" Then
Button4.Visible = True
End If

End Sub
End Class

You might also like