Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Junior High School Enrollment System: Analyzed, Designed and Coded by

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

Wesleyan University-Philippines

Mabini Extension,Cabanatuan City

Junior High
school
Enrollment
System
Analyzed,Designed and Coded by
Princess Joy O. Cabrera
Aileen F. Lanzona

December 2017
Language used: Microsoft Visual Studio 2015

SOURCE CODE

Public Class frmMain


Private Sub btnStudent_Click(sender As Object, e As
EventArgs) Handles btnStudent.Click
frmAdd.Show()
End Sub

Private Sub btnPayment_Click(sender As Object, e As


EventArgs) Handles btnPayment.Click
frmpymnt.Show()
End Sub

Private Sub btnMasterfile_Click(sender As Object, e As


EventArgs) Handles btnMasterfile.Click
frmmf.Show()
End Sub
End Class
TABLE NAME: Student
PRIMARY KEY: StudentID

FIELD NAME DATA SIZE DESCRIPTION


TYPE
Student ID Text 10 Student ID Number
Registration ID Text 10 Registration Number
Transaction ID Text 10 Transaction Number
Student Last Name Text 25 Student Last Name
Student First Name Text 25 Student First Name
Student Middle Name Text 25 Student Middle Name
Address Text 50 Student Address
Birthday Date - Student Birthday
Name of Guardian Text 50 Name of Guardian
Guardian No. Text 11 Guardian Mobile
Number
School Last Attended Text 50 School Last
attended
Year Text 10 School Year
DATABASE
SOURCE CODE

Imports System.Data.OleDb
Public Class frmAdd
Dim provider As String
Dim datafile As String
Dim connstring As String
Dim myconnection As OleDbConnection = New OleDbConnection
Dim command As OleDbCommand
Dim str As String
Dim Reader As OleDbDataReader
Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles
btnSave.Click
provider = "provider=microsoft.Ace.OLEDB.12.0;data source="
datafile = "C:\Users\CabreraPJO\Desktop\Aicessy\Dtbase.accdb"
connstring = provider & datafile
myconnection.ConnectionString = connstring
myconnection.Open()

str = "Insert into [Student] ([Student ID], [Registration ID], [Student


Last Name], [Student First Name], [Student Middle Name],[Address], [Birthday],
[Name of Guardian],[Guardian Mobile No], [School Last attended], [Year Level])
values (?,?,?,?,?,?,?,?,?,?,?)"
Dim cmd As OleDbCommand = New OleDbCommand(str, myconnection)
cmd.Parameters.Add(New OleDbParameter("Student ID", CType(txtStudID.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("Registration ID",
CType(txtregID.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Student Last Name",
CType(txtStudLastName.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Student First Name",
CType(txtStudentFirstName.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Student Middle Name",
CType(txtStudMiddleName.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Address", CType(txtAddress.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("Birthday", CType(txtbirthday.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("Name of Guardian",
CType(txtguardian.Text, String)))
cmd.Parameters.Add(New OleDbParameter("Guardian Mobile No",
CType(txtgmob.Text, String)))
cmd.Parameters.Add(New OleDbParameter("School Last attended",
CType(txtlastschool.Text, String)))
cmd.Parameters.Add(New OleDbParameter("School Year", CType(cmbSchYr.Text,
String)))
cmd.Parameters.Add(New OleDbParameter("Year Level", CType(cmbSchYr.Text,
String)))
MsgBox("Please check the data carefully.If yes, Please Proceed", vbOKOnly
+ vbInformation + vbCancel, "SAVE")
Try
cmd.ExecuteNonQuery()
cmd.Dispose()
myconnection.Close()
txtStudID.Clear()
txtregID.Clear()
txtStudLastName.Clear()
txtStudentFirstName.Clear()
txtStudMiddleName.Clear()
txtAddress.Clear()
txtbirthday.Clear()
txtguardian.Clear()
txtgmob.Clear()
txtlastschool.Clear()

Catch ex As Exception
MsgBox(ex.Message)
myconnection.Close()
End Try
If txtStudID.Text = "" Then
MsgBox("Please enter Student ID No.", vbExclamation & vbOKOnly, "")
txtStudID.Focus()
Exit Sub
End If
If txtregID.Text = "" Then
MsgBox("Please enter Registration ID", vbExclamation & vbOKOnly, "")
txtregID.Focus()
Exit Sub

End If

End Sub

Private Sub btnAdd_Click(sender As Object, e As EventArgs) Handles btnAdd.Click


DataGridView1.Rows.Add(txtStudID.Text, txtregID.Text, cbmYearlvel.Text,
cmbSchYr.Text, txtStudLastName.Text, txtStudentFirstName.Text, txtStudMiddleName.Text,
txtAddress.Text, txtbirthday.Text, txtguardian.Text, txtgmob.Text)

End Sub

Private Sub btnClear_Click(sender As Object, e As EventArgs) Handles btnClear.Click

End Sub
End Class
TABLE NAME: ENROLLMENT
PRIMARY KEY: Registration ID

FIELD NAME DATA TYPE SIZE DESCRIPTION


Registration ID Text 10 Registration ID Number
Student ID Text 10 Student ID Number
Date Enrolled Date/Time - Enrollment Date

TABLE NAME: TRANSACTION


PRIMARY KEY: Transaction ID

FIELD NAME DATA SIZE DESCRIPTION


TYPE
Transaction ID Text 10 Transaction ID Number
Registration ID Registration ID Number
Student ID Text 10 Student ID Number
Amount Paid Money - Downpayment

You might also like