Upload
independent
View
0
Download
0
Embed Size (px)
Citation preview
Chapter I
THE PROBLEM
Introduction
Computerization of every process reduces human
errors and processing time, it can also boost up
productivity. “Computers are the best means for storage
and management of data; they can serve as huge knowledge
bases and can be harnessed for all sorts of financial
transactions owing to their processing power and storage
capacities. As computers are a daily utility, they have
gained immense importance in day-to-day life.”
Sta.AnaCentralElementary School, a government owned
educational institutions experiencing problems on
processing papers ever since it was founded. Currently,
the school is composed of approximately 4,000 students
from kindergarten up to grade 6. Since the large-scale of
students’ population is selected, the time for enrollment
and the updates of reports becomes hustle without a
computerized system. With their 81 sections of all
different grade level, problem of the enrolment process
and the update of reports between teacher-to-principal
and principal-to-teacher is a problem. The school
personnel itself are hands-on upon checking all of the
school operations. The work within the transactions takes
a lot of time and hectic both in the students and in the
school personnel.
1
As of now, the school is still dependent on the
traditional paper-based method of enrolling students.
Thus, it had caused difficulty to the transactions of the
principal, guidance counselors and teachers.
Random sectioning is done by the principal, and she
must be acquainted of the general average of each student
because she needs to separate the students having above
average and those with below average mark. Since the
school did not implement the honor class/first honor
sections, the principal will be the one to distribute the
students to the number of sections accordingly.
Also, the submission of promotional reports is being
manually operated by teacher-to-principal andprincipal-
to-teacher.All teachers in different grade level will
have to submit a promotional report at the end of the
school year. This report shows the list of students who
passed, and students who are unable to reach the passing
average required by the school. Thus, the report shall be
classified according to its grade level and section.
After which, the report must be submitted into three
different areas; the district, the division and the
region. Provided, that each area must have its own copy
and copy also for the school itself.
These problems stated can be addressed through
Information Systems. From the manual process, the
researchers will automate their traditional paper-based
2
system. Thus, their school transactions will be efficient
and fast. A technical system can provide you with fast,
reliable and much organized information so you know
exactly the information in times of retrieving the data.
Given the three problems and current situations, the
teachers and school personnel are not the sole people to
benefit, but also thestudents.With the advancement of the
proposed information system, automating and improving
business processes in an effort to reduce costs, increase
productivity, and improve quality of the existing system.
Statement of the Problem
In general, the traditional way of enrolment
processes in Sta.AnaCentralElementary School is
encountering difficulties in managing the school
operations.
Specifically, the study sought to answer the
following problems:
1. Random sectioning is time consuming
According to the principal, it is hard for them to
assign a section since the school does not implement
honor class sectioning. The number of students is
distributed randomly. The principal is in-charge of the
school management and is responsible for assigning the
class sections of the teachers.
3
At the end of the school year, the general average of
the promoted students submitted by the teachers is
compiled by the principal. The list shall be classified
according to its grade level and section. Because of the
large number of grade sections, the process of
distribution becomes slow. For example list of promoted
students from grade 2 are compiled. The list of promoted
students includes their name and grades beside it. Those
will be cut individually then the teachers will separate
the students having 75-79 in a bowl from those who have
80-85 average in a separate bowl, the gender will also be
considered. The principal will gather all the teachers of
grade 3 and then they will have to pick the names of
students from the bowl which will complete their
tentative list per section.
2. Difficulty in searching and retrieval of students’ records
If a student decides to transfer to other school and
claims her/his form-137, the guidance counselor will have
a hard time to get the file because she need to go
through the entire wooden cabinet which serves as the
storage area of school files.Presently, the school
handles a summation of approximately 4000 student.
During the enrolment process, the grade head or the
person in-charge during the enrolment finds it hard to
search the section of a student. The picking of names
from the bowl makes the tentative list of students which
will be submitted to the grade head assigned on a certain
4
level. During the enrolment period, if a student on the
list enrolls, the grade head needs to go through the
entire list to confirm where section the student will
belong.
In some cases that concern late enrollees, they
cannot immediately access updated reports of master list
of student by grade level. The principal is the one who
process the transactions. The principal needs to go at
the guidance office to have the information of the class
population by every section. After that, she’ll need to
check the official list of section to identify the
section with the least students then eventually put the
late enrollees there. The process also applies to the
case of the transfer students.
The whole process takes time and great effort of the
principal since he needs to go to the guidance office to
inquiry about the students’ class information.
3. Inadequate space for the storage of students’ records.
It is mandated by the Department of Education not to
decline students enrolling in public schools. With this,
the admission of excessive number of enrollees is
inevitable. The guidance office which serves as the
repository of all the students’ records became congested.
Due to the overflowing files stored on the school
cabinets which occupy a huge space in the guidance
office, storage now became a dilemma. Furthermore, if
certain commotion will appear like fire or flood, losing
the records may cause big problem.
5
4. Difficulty in generating accurate composite sheet.
The submission of grades from the adviser to the
guidance office is essential. Therefore, every grading or
by quarter all advisers are required to submit a
composite grade report. The composite sheet contains the
grade of all subjects given by the subject teacher to the
adviser. From grade 4 up to grade 6 students, they have
different subject teachers. Unlike students from
kindergarten thru grade 3, they only have one teacher who
teaches in a particular class. Way back to grade 4 up to
grade 6 students, a subject teacher must submit a subject
rating sheet to the adviser; this subject rating sheet
contains an average grade of a student in a particular
subject that she handles. In addition, an adviser of a
section must collect the subject rating sheet from the
subject teachers. The problem arise during the handover
of the subject rating sheet into the composite sheet,
there is a big possibility of typographical error which
the teachers conformed that this really happens. Because
of the number of paper works to check, re-checking of the
composite sheet does not always guarantee accuracy.
6
Project Goals
The purpose of our system is to transform the
current system from manual to automate. It includes the
enrollment system, quarterly report of grading system and
promotional report by the teachers. By the time of
automation of the 3 processes, the pace of the processes
and transactions will increase by 50 %.
System Objectives
Based on the identified problems, the researchers
come up with these proposed solutions.
1. To provide fast and accurate random sectioning process
After the enrollment period, the proposed system
will provide the number of sections based on the number
of enrolled students. Each section is composed of 40
students with a combination of below and average coed
students. The system also generates separate sections
for the above average students.
2. To provide fast retrieval of students records
The proposed system can automatically search
and print the student's record by its student ID
number. It can also view list of students per section
per year level and per adviser. With this, it will help
the user be able to locate the student’s record faster.
7
3. To provide a centralized database for student records.
The proposed system will create a database for the
school that will serve as storage for all student
records. Also, the proposed system will archive the
students’ records such as birth certificates, form 137
and reports through scanner that can lessen the
physical storage of the students’ records.
4. To provide user accounts for fast generation of
accurate composite sheet
The proposed system prompts the user both regular
teachers and administration personnel such as the
principal and guidance adviser. For instances that the
subject teacher submitsthesubject rating sheet, she’ll
directly encode it to the system which is accessible to
restricted people.Thus, it will avoid typographical
error from the subject teacher and it will lessen the
effort of the adviser in collectingthe subject rating
sheetsand transferring it to the composite sheet. The
purpose of having user accounts is to secure the
students’ grade. With this, it gives an authority for
the admin personnel to check the grade report submitted
by the subject teachers and to provide a faster
generation of composite sheet thru advisers.
8
Scope and Limitation
Sta.Ana Central Elementary School, located in
Uyanguren St. DavaoCity is the primary benefactor of this
study. The study will focus in creating a network-based
enrolment system, records and student information
management, grading system and reports that would help
the school’s transactions to be fast, accurate, reliable
and productive. The said system will have the capability
to define the user accounts, in which the system will
prompt the user (the regular or the admin). Then the user
can fill-up the forms of registration of the new student
and later on it can be saved into the database and can be
directly printed out for back-up purposes. The system can
also monitor the reports such as grade and promotional
reports with summary of both. The system has the
capability to generate students’ form 137 and master list
and promotional reports for the faculties. The system has
the capability to archive the students’ record at the
guidance office. Then lastly, the system lets the user to
access of files and track records. With regards to the
offices involved, the system is networked by these two
offices; the guidance’ and the principal’s office.
Thus, the system will not cater to online monitoring
due to the company’s request. They wanted all information
to be secure and they believe that online transactions
9
are prone to disclosure of data because there are some
tendencies that it might be hacked.
Definition of TermsThe following terms are defined conceptually and
operationally for common understanding of the terms:
Sta. Ana Central Elementary School. A highly urbanized
community, within the business and commercial centers
called Chinatown of Davao City. Parents and stakeholders
are office workers, businessmen and mostly are laborers.
Operationally, the school is the beneficiary of the
system that the Bachelor of Science in Information
Technology students of University of Mindanao has
proposed.
Promotional Reports. Qualified students who will proceed to
the next grade level are written in a list together with
the grade they had garnered on the previous year.
Regular Plan. A whole-day class schedule wherein the
students must attend their classes by 7:30 am up to 4:30
pm.
Emergency Plan. It is divided into two sessions: the
morning and afternoon session. Students who prefer
10
morning session must attend their classes by 6:30 am up
to 12:00 noon. Likewise, afternoon session class starts
at 12:00 up to 5:45.
Management. Act of managing something through System
analyst
Operationally, it is the record of the student that, the
guidance counselor can manage the data he handling.
Operationally, it is process to keep the records of the
students secured in the system.
System. It is an organized and coordinated method or set
of procedure for achieving something.
Operationally, it is a procedure or process which the
main objective is to manage the school’s transactions
etc.
Grade Head. Grade head is a teacher assigned from Grade 2
up to grade 6 enrollees or we called as in-charge to
accommodate during the enrollment process.
Enrollment System.An enrolment system is the process of
being enrolled, the act of enrolling or the number of the11
people enrolled. An enrollment could also be a record or
an entry. To enroll is to enlist or write a name of the
person in a register.
Form 137. Form 137 is a report card form, used by the
school system in the Philippines.
Subject Rating Sheet. It is a report sheet that contains the
students’ grade per subject. Latter will be submitted to
the class adviser to be transferred on the school grade
card.
Composite Sheet. After transferring all the grades submitted
by the subject teachers to the grade card,the adviser
must submit the complete subject grade report to the
guidance office for record purposes.
User Requirements Definition
The Sta. Ana Central Elementary School will use the
Automated Enrollment System in order for the researchers
and users of the school to gather accurate features to
help them to have an Automated Enrollment System. The
features are:
1. User Friendly Interface
This helps the users to operate easily and
accurately to the systems functionalities.
2. Time-efficiency
12
Random sectioning, viewing list of students and
retrieval of student records will lessen the time
process and lightens the effort of the users.
3. Speed and Accuracy of calculations
This will help in recording of grades and creating
reportsto be fast and accurate.
4. Lessens physical storage of students’ record
Instead of using cabinets as storage, student
records are kept in a database for easy access and
lessen the physical storage of students’ record.
5. Security
This will help to secure information to assure
accuracy of data.
Chapter IIDATA COLLECTION AND ANALYSIS
Introduction
13
In spite today’s rapid modernization, there are
still existing establishments that utilizemanual work.
Often, this leads to delay, inaccuracy and loss of data
which will be addressed by this study.
This researchaims to address the needs of Sta. Ana
Central Elementary School, a publiceducational
institution located along the streets of Ramon Magsaysay
Avenue commonly known as Uyanguren Street. The enrolment
system, grading scheme and accurate generation of reports
are the focus of the implementation of the system.
Historical BackgroundOn 1916, Sta. Ana Central Elementary School (SACES)
was first established in an offshore area at Piapi, Davao
City. Being named after its patron saint, Saint Anne, the
latter institution promotes a God-loving, patriotic,
environment-friendly and competitive environment.
However, it was only in 1935 that SACES was
transferred and had occupied its present school site.
Currently, the school occupies a 4,023 square meter land
area with 81 classrooms through Presidential Decree 282
surveyed on July 25, 1984 and approved on September 21,
1984, signed by Corazon Aquino which is shared with Sta.
Ana National High School.
Presently, the faculty is comprised of a total of 90
members including 7 grade heads, 2 part time mentors and
14
81 regular teachers that handle a summation of
approximately 4000 student.
SACES is proud of its graduates. In point of fact,
our Davao City Mayor, Hon. Rodrigo Duterte is a proud
alumnus of SACES. His mother, Mrs. Soledad Duterte was
once a teacher. Thus, spells the legacy this institution
carries.
Vision & Mission
Sta. Ana Central Elementary School envisions
developing Filipino learners equipped with basic and
updated trends in education, skills, attitudes and
positive values to become productive citizen of our
country.
It provides quality learning in a conductive
environment, adequate modern facilities and innovative
curriculum leading towards God-loving, patriotic,
environment-friendly and competitive learners.
Goals
Primarily, the school’s goals are classified by five
core focus: the Curriculum Development and Management,
Staff Management and Development, Learning Environment,
Resources Mobilization and Management and Community
Partnership.
Curriculum Development and Management aims to
provide a comprehensive curriculum that caters the
15
CRISTELYN M. FELIX
Principal II
GUIDANCE COORDINATOR
GRADE HEADS
P T C A STAKEHOLD
ERS
SCHOOL GOVERNING COUNCIL
TEACHERS CLUB
SUBJECT COORDINATOR
S
individual needs and abilities of all pupils and to
support their academic and personal development while
Staff Management and Development aims to develop and
implement school management policies and practices that
support efficient and effective administration,
professional development of staff and community members
and effective communication and decision making practices
that encourage positive contributions from everyone.
Moreover, Learning Environment aims to develop a
conducive, stimulating and friendly environment where
mutual respect and harmonious relationship is
demonstrated among pupils, teachers and parents.
Furthermore, Resources Mobilization and Management aims
to develop, maintain and allocate physical and financial
resources in line with the school goals improvement
areas. Lastly, Community Partnershipaims to develop a
positive relationship between the school and the
stakeholders.
Organizational Chart
16
MR. CARLITO MAGALLANO JR.
PHYSICAL EDUCATION
GRADE IMRS. ANECITA
CALZADA
GRADE IIMRS. CARINA ARCANGEL
GRADE VIMRS. MARY JANE
SARILLANA
GRADE IVMS. HANNAH
CORRAL
GRADE VMS. IMELDA
GAMALE
GRADE IIIMRS. FELICITA T. QUIBOL
MS. HAYDEE BUAL
ENGLISH
MRS. ANANIA SALAUM
MATHEMATICS
MS. FAITH BALINO
SCIENCE & HEALTH
MS. DIVIGRACE TABADA
FILIPINO
MS. LORIE ANN SIMOGAN
MAKABAYAN
Business Environment
School is one of the most important institutions in
the society. It bridges the gap between ignorance and
literacy. It is an instrument towards development and
progress since education is harbinger of changes that
will bring people from obscurity to certainty.
Unfortunately, education among the ordinary inhabitants
of the Municipality of Davao during the early years was a
nightmare. Thus, the creation of public high school paves
the way to more promising perspective for low-income who
can't afford to send their children in private schools -
where high tuition fees are collected.
SACES was first established in an offshore area at
Piapi, Davao City last 1916. It was only in 1935 that
17
SACES was transferred and occupied its present school
site. The school occupies a 4,023 square meter land area
through Presidential Decree 282surveyed on July 25, 1984
and approved on September 21, 1984, signed by Corazon
Aquino which is shared with Sta. Ana National High
School. Other nearby public elementary schools are Jose
Rizal Elementary School, Manuel L. Quezon Elementary
School, Manuel Roxas Elementary School and Carlos P.
Garcia Elementary School.
Products and Services
Sta. Ana Central Elementary School is a public
educational institution that caters the academic and
curricular requirements of the students enrolled. The
school accepts as young as Kindergarten enrollees and
regular grade from 1 to 6s.
There are two kinds of session plan which indicates
the class schedule of the students, first is the regular
plan and the second one is the emergency plan. Regular plan
is a whole-day class schedule wherein the students must
attend their classes by 7:30 am up to 4:30 pm. However,
the emergency plan is divided into two session, the
morning and afternoon session. Students who prefer
morning session must attend their classes by 6:30 am up
to 12:00 noon. Likewise, afternoon session class starts
at 12:00 up to 5:45. With regards to the school,
currently they are now using the emergency plan due to
18
overpopulation of the students and also the lack of their
classrooms.
On the other hand, the school is supported by the
government programs known as Special Education (SPED) and
Special Science Elementary School (SSES).These two
programs are raised through funds or donations from the
city government. SPED is exclusive for those special
children and SSES is also for the fast-learner children
support system.
School Processes
At the end of the school year, teachers do have a
procedure regarding on the preparation of the incoming
enrolment. They will list the names of the students
including the general averages of those who qualify in a
particular grade level. These lists will be divided
according to the number of sections in a particular grade
level. For instance, there are 500 students who passed in
grade 1, and there are given 12 sections in grade two.
The entire 500 students will be divided into 12;
therefore approximately there are 41 students per
classroom. Furthermore, all sections in grade two will
have their tentative list of students which already
disseminated.
By the time of enrolment comes, 1 grade head will be
in charge for grade 2 up to grade 6
enrollees.Kindergartens and grade 1 are exempted since
they’re first timers. All the teachers in kinder and
19
grade 1 are obliged to participate since they’ll be in
charge in accommodating and assisting the students
through the enrolment process. A particular grade head
will have a copy for the master list of tentative
students per section. During the process, the student
requirement is optional; the enrollee may present his
card or simply just find which section he belongs because
the school has a copy of their form 137. Unlike for
transferee students, those who don’t have school records
will have to present his card to the grade head. After
the process, the enrollee is now officially enrolled once
he was confirmed by the grade head. Grade heads and
teachers of kindergarten and grade one will list the
official enrolled students in different section and will
be forwarded to the guidance counselor for storage and
documentation purposes.
Grade Reports and Record Management
The submission of grades from the adviser to the
guidance office is necessary. Therefore, every
grading/quarter all advisers must submit a composite
grade report which is done by the advisers. Composite
sheet contains the grade of all subjects given by the
subject teacher to the adviser. From grade 4 up to grade
6 students, they have different teachers or we called as
subject teacher. Unlike students from kindergarten and
grade 1, they only have one teacher who teaches in a
particular class. Way back to grade 4 up to grade 6
students, a subject teacher must submit a subject rating
20
sheet to the adviser; this subject rating sheet contains
an average grade of a student in a particular subject
that she handles. In addition, an adviser of a section
must collect the subject rating sheet from the subject
teachers.
Also the submission of promotional report is a
protocol given by the DepEd. All teachers must submit a
promotional report; this form, accomplished in
triplicate, should serve as a permanent record of all
promotions during, or at the end of the school years in
Grades IV – VI, inclusive.
Description of the Existing System
The significance of the Description of the Existing
System is to know the problems behind the existing system
that the school is currently using. This will let the
Researchers to gather ideas upon making a solution to the
said problem.
Since 1916, Sta. Ana Central Elementary School does
different transactions in managing students’ needs in
information management system. The institution must carry
out any requested transactions from the student in
managing student's information; upon enrolment: (1) new
student must present birth certificate, proof that he/she
graduated from kinder( for grade 1) and good moral
certificate to the assigned grade head; (2) he/she must
fill-up the registration form given by the grade head;21
(3) when enrolment is done, all the documents are placed
in an envelope with the student's corresponding names;(4)
the guidance councillor is assigned for keeping the
records in a wooden Cabinet alphabetically in the
guidance office; and (5) the guidance will search and
locate individually the filled envelope in the wooden
cabinet if the student has a query.
While old students only present their report card to
be able to enrol but its only optional because they have
records at the guidance office; (2) the grade heads will
get the requirements and the student's information’s
presented by the student; (3)Since old students are
assigned already in his section, grade heads must inform
the students where section he belongs and confirms the
enrolee that he is now enrolled; (4) Grade head will list
the enrolled students classified by different grade level
and section; (5)That list will now be forwarded at the
guidance office (6) As the guidance counsellor is now
informed to the list of students in a school year, she
will be the one to pass those list accordingly to the
section assigned by the advisers; (7) Advisers will post
their list of students classroom-to-classroom.
Grade reports and record management
In grade reports, the faculty is utilizing the
traditional way of recording grade which is done by the
class advisers and then submit it to the guidance office.
22
The guidance councillor will keep the student record. The
teacher also submits a promotional report to determine
the numbers of students who passed and failed for the
entire school year.
23
Context Flow Diagram
25
Grade Head
GuidanceCouncilor
Student
Existing Manual EnrolmentSystem
Of Sta. Ana Elementary
School
Teacher
Report Card
TentativeList of
Enrolment
AverageGrades
Report Card
Principal
StudentData
Promotional Report
Promotional Report
Final ListOf
Form 137Final List
Of
Copy ofFinal List
OfStudent Profiles
Results of the Company Interview
The interview started 8:00 am last June 19, 2013. It was
held in the office of the principal of Sta. Ana Central
Elementary School.
Darwin: Good Morning Ma’am!
Principal: Good Morning too.
Darwin: We have here some questions with regards to your
transaction and processes of your organization. Is it
okay to you ma’am that we will conduct an interview?
Principal: Okay
Darwin: What is the background of your company?
Principal: On 1916, Sta. Ana Central Elementary School
(SACES) was first established in an offshore area at
Piapi, Davao City. Being named after its patron saint,
Saint Anne, the latter institution promotes a God-
loving, patriotic, environment-friendly and competitive
environment. However, it was only in 1935 that SACES was
26
transferred and had occupied its present school
site.Currently, the school occupies a 4,023 square meter
land area with 81 classrooms through Presidential Decree
282 surveyed on July 25, 1984 and approved on September
21, 1984, signed by Corazon Aquino which is shared with
Sta. Ana National High School. Presently, the faculty is
comprised of a total of 90 members including 7 grade
heads, 2 part time mentors and 81 regular teachers that
handle a summation of approximately 4000 student. SACES
is proud of its graduates. In point of fact, our Davao
City Mayor, Hon. Rodrigo Duterte is a proud alumnus of
SACES. His mother, Mrs. Soledad Duterte was once a
teacher. Thus, spells the legacy this institution
carries.
Victor: What is the vision, mission and goals of your
company?
Principal: Sta. Ana Central Elementary School envisions
developing Filipino learners equipped with basic and
updated trends in education, skills, attitudes and
positive values to become productive citizen of our
country. It provides quality learning in a conductive
environment, adequate modern facilities and innovative
curriculum leading towards God-loving, patriotic,
environment-friendly and competitive learners. Primarily,
the school’s goals are classified by five core focus: the
Curriculum Development and Management, Staff Management
and Development, Learning Environment, Resources
Mobilization and Management and Community Partnership.
27
Curriculum Development and Management aims to provide a
comprehensive curriculum that caters the individual needs
and abilities of all pupils and to support their academic
and personal development while Staff Management and
Development aims to develop and implement school
management policies and practices that support
efficient and effective administration, professional
development of staff and community members and effective
communication and decision making practices that
encourage positive contributions from everyone.
Victor: When did you establish that company?
Principal: Since 1916, the school had been established.
Darwin: How many teachers do you have?
Principal: There are 81 regular teachers and 9 subject
teachers with the total of 90 teachers.
Darwin: How do you manage to keep the records?
Principal: The guidance counselor is in-charge for
keeping the records. She manages the records through
classifying the files from kindergarten up to grade 6
students.
Darwin: What are you services?
Principal: This government owned educational institution
offers a quality education for grade school students from
kindergarten up to grade 6.
Darwin: What is the process during enrollment time?
Principal: During enrollment time there are 5 grade heads
per level to accommodate of the student to enroll. All
teachers from kindergarten and grade 1 students are
28
obliged to accommodate the parent of the student to
enroll since they’re first timers.
Darwin: Ma’am, thank you for the time and effort that
you’ve given to use and also to all the information that
you have stated. But furthermore if we may encounter
problems concerning the system that we will be making, we
will come back.
Result of the Survey
OnJune 19, 2013, the group conducted a survey at Sta.
Ana Elementary School having Mrs. Cristelyn M. Felix, the
principal of the latter school, as the interviewee who
had answered the interview questions verbally and
elaborately.
1. What are the transactions or processes that you wish
us to address in the school?
Enrollment Process, Grade Reports, and Records
Management.
2. Can you specify the schools problem on the
transaction or processes that you have mentioned?
Enrollment. Their enrolment process takes too much
time since, they are using manual method. Before the
29
student will be officially enrolled, the teachers
need to go through the long list of the previously
enrolled students from the grade head.
Grade Reports. The data storage of the grades is
unreliable because of the method. Thus, it often
cause inadequate information.
Record Management. The records are kept in a cabinet
which serves as the data storage.Thus, it is prone
to insect infestation and other inevitable problem
that might destroy the files.
3. Who is in charge or the person involved in those
stated processes?
The enrollment have the grade head from grade 2 – 6
as the one responsible in the enrollment process.
For the kindergarten and grade 1, there’s a certain
teacher that is assigned to assists their concerns.
The grade reports is given by the subject teacher to
the class adviser, then she will forward it to the
guidance adviser who is in charge of record
management.
30
4. How do the teachers identify the class section of
the students?
Students having 80 above and 79 – 75 average scores
every level are separated in two bowls to be picked
by the teachers later. The sum of the names in the
bowl is divided by the number of existing sections
5. Are you satisfied with your current system?
No, because the process in seeking data takes a lot
of time since we need to go through the long list of
information manually.
6. What features would you like to see in the system
that we would make for your school?
A system that we can use for our enrollment as well
as to record the student account. Can generate
reports by teachers.
7. Is it fine for you to use network based system?
Yes, but some of our computer unit are non-
functional. Only 2 sets of unit are available to
use.
31
Document Analysis
Figure 1.1Elementary School Permanent Record (Form 137)
The data includes the educational background of the
child which is scrutinized below.
Elementary School Progress- the educational standing of the
students regarding their results in school is depicted on
32
the Form 137. Thus, it shows the evaluation of the
students, if they had failed or passed from grade 1 to
grade 6
Character Building- the attitude of the student from grade 1-
6 in the school can also be seen in the Form 137 through
the following letter symbols: A- Outstanding, B- Very
Satisfactory, C- Satisfactory and D- Needs Improvement.
Figure 1.2Enrolment Form Slip
33
This slip is given by the grade head to every
enrollee. This document is for new and old student which
serves as a registration form. Students must fill-up this
form because it will serve as a student profile of an
enrollee.
34
Figure 1.3Early Registration Form
This form is used for early enrolment by the grade
head or the in-charge of a particular grade level to
encode the students’ information that has been submitted
by theguidance counsellor. Using this form, it lists the
students’ basic information that enrolled in the school.
Chapter III
ANALYSIS OF SYSTEM ALTERNATIVE
This chapter presents the different alternatives for
Sta. Ana Central Elementary School to meet the needs of
the school and in order for us to determine which is the
best alternative to use in the proposed system that meet
35
all the researcher’s goals and objectives of it. The
following are the alternatives:
First Alternative: Network-based Enrolment and Student
Information Management System
The first alternative system proposed by the
researchers for Sta. Ana Central Elementary School is a
Network-based Enrolment and Student Information
Management System. Network system is a distribution
application structure that partitions tasks or workloads
between the providers of a resource or service and the
one who needed the resource. It communicates over a
computer network on separate hardware, but both may
reside in the same system. It is a network of
interconnected computers that enable users to share
information and allow company to centralize and manage
data and application. The advantages of a network system
are ease of maintenance, greater security controls,
updates of data are far easier and it functions with
multiple different capabilities.
In this alternative, the hardware components namely
the computer, the scanner and the system aforementioned
are networked. Thus, the school administrator can allow
data sharing of the database of students’ records. The
guidance counsellor can easily and directly access the
student’s records for the basis of students’ inquiries.
The teachers have an access to view the student’s records
and manipulate the computation of grades. In general,
they can share information in each other using different
36
computer units at a time. It is possible to replace,
repair, upgrade, or even relocate a server while the
users remain both unaware and unaffected by that change.
All data is stored on the servers, which have far greater
security controls.
Feasibility Studies
Technical Feasibility
The data being gathered by the researchers makes the
group conclude that the use of this alternative is
technically feasible since the school has already
acquired computers with complete installation of the
software to be used in running the system. In fact, they
already have LAN connection both in school offices and
classrooms. However, increasing hardware capacity will
make the most difference in overall performance. In this
alternative, computers need to be networked to enable the
sharing of information and data within the school.
Economic Feasibility
This alternative proposed by the researchers is
economically feasible and is somehow costly based on the
requirements for the peripherals needed. If the school
decided to upgrade their hardware and purchase software,
there are reasonable prices of computer packages and
software available in the market today. Furthermore, the
37
school has enough budgets to upgrade their system unit.
The researchers also recommend incorporating a technical
training for the school personnel to be well equipped in
this matter.
Operational Feasibility
This alternative proposed by the researchers is
operationally feasible because of its usability. The
proposed system is easy to install and operate. The
process is no longer manual, thus, it reduces time and
effort in accomplishing the tasks. The users must undergo
a training program for them to be knowledgeable in using
this application and the equipment that has been using.
The researchers will also provide a manual for the
proposed system and how the equipment will be used for
them to be guided accordingly and navigate functions
easily.
Cost and Benefit Analysis (CBA)
Cost Benefit
Hardware cost Organize business
transaction
Increases the amount of
data storage
Centralize the flow of
38
data
Update transaction
recordsSystem Cost Fast transaction
Easily monitored
transaction records
Avoids inaccurate data
inputs
Provides organize
records
Provides improvement to
schools’ businessEmployee Training Cost Smooth transactions
Familiarize the system’s
functionality
Network Installation
Cost Data would be stored indatabase and would beshared.
Fast businesstransaction
LAN connection would beset up
Software and Hardware Requirements
Software Specifications Price
Windows 7 Ultimate (Licensed) Operating
SystemAvailable
39
Microsoft Windows XP Service Pack 2 Available
Microsoft Office 2007 (MS Excel, Word) Available
Total Cost ***********
Hardware Requirements Price
1 PC Unit with
AMD Athlon X2
Dual Core
Quality
Motherboard
1GB DDR3
memory
160GB SATA
Hard Drives
DVD writer
SATA
Built-in
audio, video, LAN
ATX case w/
power supply
15.6” CRT Monitor
Brother DCP – J125 Printer
Available
Available
Total Price Available
40
Network specification
Requirements
Price
UTP Cable (100 meters)
RJ 45 (20 pieces)
TP-Link TL-SF1016D 16-port Router
Php 1,000.00
Php 100.00
Available
Total Network Requirements P 1,100.00
Total: Php 1,100.00
41
Grade Head
Network Based Enrolment and
Student Information Management System
Student
Teacher
Report Card
Student Profiles
Form 137List of Students
Report Card StudentData
Final List Of Enrolment
PrincipalPromotional Report
Promotional Report
Student Profiles
Guidance Councilor
Master Listm
Master Listm
Context Flow Diagram(First Alternative)
43
Second Alternative: Stand-Alone Enrolment and Student
Information Management System
The second alternative system proposed by the
researchers for Sta. Ana Central Elementary School is a
stand-alone Enrolment and Student Information Management
System. Stand-Alone System is a system that operates
independently or is not connected to an electric
transmission and distribution network. The advantages of
a stand-alone system are low initial cost, centralized,
simplified management, easy to make back up files and
easy to replace it if necessary. The standalone system is
a one-stop box for all maintenance work. Consequently,
backups, disaster recovery and debugging can be
simplified.
Furthermore, this proposed alternative system
lessens the paper works of the user in doing all the
transactions of the school. Aside from that, they can
easily access the files and generate reports easily and
immediately.
Through this alternative system, the user could
easily access all the information and data that they
need. For this reason, it will have a faster and easier
way in doing the registration, computing of grades and
summarizes all the reports. This system will reduce the
workload of the user in doing her/his daily transactions
and it will also provide a security that will secure the
school’s important and confidential information, hence
45
only the guidance counsellor and authorized personnel can
access the system.
Feasibility Studies
Technical Feasibility
The school has already one available computer unit
which is functional for their existing system using
Excel. The researchers doesn’t recommend for another
computer because the proposed system is fully functional
to use in their current computer unit. Since the school
is using the Microsoft Windows XP Professional which is
compatible for that kind of application. There’s no need
to enhance the system unit because it is suitable for the
system. The application will work in different system
units. If the system unit falls below the hardware
specification, it can still be used. The school will not
be having a hard time to look for a computer unit and in
case of a need to upgrade the hardware capacity there
will be no much trouble for that because it is already
available in the market.
Economic Feasibility
The school already has a functional computer unit to
access on. It is a big advantage for the school because
they will not able to purchase another computer unit. If
the school decided to upgrade their hardware and purchase
software, there are reasonable prices of computer
46
packages and software available in the market today. The
total cost of the proposed system includes the training
of the user who will operate of the system, system manual
and upgrade of the system.
Operational Feasibility
This is operationally feasible because the proposed
system is easy to install and operate.The school has a
guidance counsellor to administer the system and appoint
authorized personnel to take charge. Users can easily
adopt a computerized information system since they are
familiarized to computers. In this alternative, the
researchers will provide a manual for the users of the
system for them to be guided accordingly and navigate the
commands and functions easily.
47
Cost and Benefit Analysis (CBA)
48
Cost Benefit
System Cost Upgrades school’s existing
system
Avoids inaccurate data
inputs
Provides organize records
of student
Fast transaction
Efficient business process
Provides improvement to
schools’ businessEmployee Training Cost Increase accuracy to their
works
Lessen multiple data works
Familiarize the system’s
functionality
Makes work faster and
easierSystem Installation Well organized files
Generate reports
immediately
Provide accurate data and
computation
Accuracy and data integrity
will be maintained
Efficient processing of
transactions
Effective file security
Greater security controls
Software and Hardware Requirements
Software Specification Cost
Windows 7 Ultimate Operating System (Licensed) Available
XAMPP(Cross-platform Apache, MySQL, PHP,
PhpMyAdmin) Free
Microsoft Office Tools 2007 Available
TOTAL COST *********
Hardware Specification Cost
Processor AMD Athlon X2 Dual Core Available
Memory 1GB DDR3 Memory Available
Hard Drive 600GB SATA Hard Drive Available
Monitor 17" Lenovo LCD Monitor Available
49
Input
Devices
Keyboard/Mouse Available
Casing/
Chassis
RW Casing Orion 5827 BB Available
DVD ROM DVD Super Multi Driver Available
TOTAL COST ********
Hardware Requirements Price
1 PC Unit with
AMD Athlon x2
5200(AM2)
Quality
Motherboard
1GB DDR3 memory
160GB SATA Hard
Drives
DVD writer SATA
Built-in audio,
Available
50
video, LAN
ATX case w/
power supply
15.6” CRT Monitor
Brother DCP – J125 Printer
Available
Total Price ***********
51
Enrolment and Student Information Management System
Student
Teacher
Report Card
Student Profiles
Form 137List Of Students
Report Card StudentData
Final List Of Enrolment
PrincipalPromotional Report
Promotional Report
Grade HeadGuidance Councilor
Context Flow Diagram(Second Alternative)
54
Third Alternative: Web-based Enrolment and Student
Information Management System
The third alternative system proposed by the
researchers for Sta. Ana Central Elementary School is
aWeb-based Enrolment and Student Information Management
System.Online system is a system that indicates a state
of connectivity and it can be access anytime and anywhere
but must have an access to the internet. In this modern
time of computer and internet technology, companies and
businesses are necessary to adapt in order to be
competitive and keep up with the changing times. These
changes made them switch from traditional systems into
advanced systems utilizing the newest services for their
daily operations.
It is an effective alternative because all the
transactions can be done online and it requires only a
computer with internet access and a web browser.
Moreover, it required a domain that will serve as the
internet address to the school’s website. The parents or
guardians spend less time especially for the working
parents. They can enroll their child through online
anywhere when they are out of town and no time to go to
school for enrolment processes. With this alternative,
the school’s vision to enhance and globally competitive
will be met.
Feasibility Issues
56
Technical Feasibility
This alternative proposed by the researchers is
technically feasible because any technical requirements
are evidently viable since there are various hardware
stores in the local market. The disk space must be
enhanced so that it will have be more spaces for the pre
installations of the software and for the databases (file
storage). Implementing an online system requires
additional devices such as modem and router/switch and
these devices is another important thing to consider
since it serves as the internet address of the webpage.
Economic Feasibility
This alternative proposed by the researchers is
economically feasible because this can meet the expense
of all the possible cost to purchase the system and other
online peripherals as well as cost of the domain. The
school will have to consider the cost of maintaining the
domain, deploying a web developer, system administrator
and Internet Service Provider (ISP). Moreover, to obtain
this, the school should consider expenses for desired
specifications of hardware requirements. There are
reasonable prices of the hardware requirements available
in the market today.
57
Operational Feasibility
This alternative proposed by the researchers is
operationally feasible because it is a good option for
the school that they will able to advertise their school
not just locally but globally. The users must undergo a
training program for them to be knowledgeable in using
this application and the equipment that has been used for
the set up. The researchers will also provide a manual
for the proposed system and how the equipment will be
used or work for them to be guided accordingly and
navigate functions easily.
Cost and Benefit Analysis (CBA)
58
Cost Benefit
Hardware cost Organize business
transaction
Better security of
records
Web access transaction
Increases the amount of
data storage
Centralize the flow of
data
System Cost Upgrades school’s
existing system
Fast business
transactions
Efficient business
process
Avoids inaccurate data
inputs
Records and business
files are easy to update
Provides organize
records
Provides improvement to
schools’ business
Enables file-sharing
procedure
Accessible in online
Web system offers are 59
available
Centralized business
transaction
School Personnel
Training Cost
Executes process and
transaction accurately
Lessen multiple data
works
Familiarize the system’s
functionality
Makes work faster and
easier
Web Maintenance Cost Records and business
files are easy to update
Easy managing students’
record
Good transaction through
web application
Software and Hardware Requirements
Software Specifications Price
Windows XP Professional (Licensed)
Operating SystemAvailable
Microsoft Windows XP Service Pack 2 Available
Microsoft Office 2007 (MS Excel, Word) Available
Total ***********
60
Hardware Requirements Price
1 PC Unit with
AMD Athlon x2 Dual Core
Quality Motherboard
1GB DDR3 memory
160GB SATA Hard Drives
DVD writer SATA
Built-in audio, video, LAN
ATX case w/ power supply
15.6” CRT Monitor
Brother DCP – J125 Printer
(Upgrade computer unit) 500GB WD Hard disk
Available
Available
Php2,495.00
Total Price Php 2,495.00
Online Specification Price
Internet Service
Provider
Php 1,100.00
per month
Php 1,000.00
61
Grade HeadGuidance Councilor
Web Based Enrolment and Student Information
Management System
Student
Teacher
Grade
Student Profiles
Form 137 List Of Students
Report Card Picture
StudentData
Final List Of Enrolment
PrincipalPromotional Report
Promotional Report
Student ProfileMaster List
Context Flow Diagram(Third Alternative)
65
Chapter IV
RECOMMENDED ALTERNATIVE
Based in the study conducted by the group, the best
and suitable solution to the current problem cited for
Sta. Ana Central Elementary School is the first
alternative which is the Network-based Enrolment and
Student Information Management System. This is the
alternative that the researchers suggest because it suits
the school’s specifications and needs. The students’
records will be managed by two admins; the guidance
counsellor and the principal, for them to manage the
school process efficiently.
The aforementioned school wanted improvement in the
system that they are currently using to uplift their
recent operations and able to apply technology in it. The
researchers and the school management both decided the
Network-based Enrolment and Student Information
Management System becomes the most suitable among the
three alternatives. With this, the school can manipulate
processes in their enrolment, can produce files in less
time consumed and can retrieve data in an easier and
faster way. With the centralized database of student
records, school admins will allow sharing of data in
which they will not have to go to other offices for data
inquiry. Furthermore, the system can archive the paper
69
documents which will lessen the physical storage of the
guidance office.
The researchers did not consider the second
alternative which is the Stand-Alone Enrolment and
Student Information Management System, which is also
technically and economically significant for the reason
that the school’s needs will not be met since large-scale
of student population is prioritized. Frequent task could
not be handled by only one computer because school have
different offices involved.
Lastly, the third alternative which is the Web-Based
was also shortlisted. The management is open for a wide
horizon of possibility unfortunately due to budget
constraintsthe school refuses to adopt the online base
system for the reason that they do not have the budget
for the internet interconnection. If they will request
the budget to the Department of Budget & Management
(DBM), the process takes long since they have to follow
procedures. Also, it would not be a guarantee that once
request is forwarded to the DBM, assurance of budget is
granted. Most of the time due to long deliberation, the
ending of the long story is rejection. Therefore, the
school opted not to choose web-based in order to
implement the system with no hassle.
70
The system shall have user accounts foradministrators and regular users. A login screen forentering the user name and password for the operatorwill be provided.
Student Registration
The system shall provide a mechanism for adding,editing and deleting a student record. Subsequently,the records added in the system shall have amechanism to view a single record.
Grade Head Menu Screen
The system shall have an account for grade headteachers. Using this system, each grade level with agrade head shall manage the student records at thesame time the school requirement needed to submitevery quarter.
Principal Menu Screen and Guidance Counsellor Menu Screen
The system shall have an account for these twoadministrators. Using this system, the principal andthe guidance counselorare able to access the overallrecords of the system.
Teacher Menu Screen
The system shall have an account for teachers. Itprovides a window form which displays the list ofrandomized students’ enrollee where school adviserswill be informed by their students per section.
Usability and Navigation
The system has user-definable fields throughout theapplication that are fully reportable.
Drop down menus are available for data entry, log-inform, Student Permanent Record form with dataentries of grades.
72
The system provides the ability to designate certainfields as required data entry fields that preventthe user from continuing until data is entered (e.g.faculties’ reports; student data).
Error detection/correction employed and smart dataentry features available to enhance accuracy of databy editing date ranges, numeric vs. alphanumeric,valid number range, etc.
School Management and Enrolment Process
A Student form 137, a form that interfaces with thestudents’ previous records in the school, isavailable. It is generated for the purposeofvalidation. When an old student will enroll the Form137 will be the basis of his qualification toproceedto the next grade level.
Has a built in ability to create grade reports anduser defined outcome measures.
Case Reports
This module is used to see the number of studentsenrolled per section. The system is designed to helpthe personnel of Records office to generate fastsectioning process.
Integrates Records
One database networked link
NON FUNCTIONAL REQUIREMENTS
System Attributes
Reliability
73
The system is designed to have very simple databasejust to serve the exact need of the port. It istested for all the constraints at the developmentstage.
Availability
The system shall be operational 24 hours a day, 7days a week.
Security
This system is provided with the authenticationwithout which no user can pass. Thus, only therespective users are allowed to use the application.
Any modification (insert and update) for theDatabase shall be synchronized and done only by theadministrator in the ward.
Maintainability
There will be less maintenance required for the
software through updating an antivirus.
The system shall provide the capability to back-up
the Data.A better solution is to use an archiver
(such as WinZip) or a backup utility to create a
single compressed file from a collection of data
files, and to split this over as many diskettes as
required. This uses fewer diskettes and allows large
files to be backed up even if the file is larger
than a diskette can hold.
74
Student
Grade Head
Teacher Principal
Submitrequirement
ProvidesClass section
Endorsetransferee
Generate official sections
Disapprove/Approve
endorsementSubmit rate sheet & composite sheet
Submit ratingSheet per quarter
Enrollsubjects
Usecase Diagram
75
DATA DICTIONARY NETWORK-BASED DESIGN
Table Name Attribute Name Description Type Range REQ’D PK OR FK
Fk Reference Table
Student Student_ID Student unique ID Int Y PKLRN Learning Reference
NumberInt Y
Student_Lname Last name Varchar 0-50 YStudent_Fname First name Varchar 0-50 YStudent_Mname Middle name Varchar 0-50 YAge Age Int YGender Gender Varchar 0-50 YMonth Birth Month Varchar 0-50 YDay Birth Day Int YYear Birth Year Varchar 0-50 YPlace_of_birth Birth Place Varchar 0-50 YTribe Student Tribe Varchar 0-50 YReligion Student Religion Varchar 0-50 YOther_tribe Student Other Tribe Varchar 0-50 YOther_religion Student Other
ReligionVarchar 0-50 Y
Address Student Address Varchar 0-50 Y
78
Student_type Type of student Varchar 0-50 YPICE_first_name (Person In Case Of
Emergency) First NameVarchar 0-50 Y
PICE_last_name (Person In Case Of Emergency) Last Name
Varchar 0-50 Y
PICE_mid_name (Person In Case Of Emergency) Middle Name
Varchar 0-50 Y
PICE_relation (Person In Case Of Emergency) Relatonship to Student
Varchar 0-50 Y
PICE_contact_no. (Person In Case Of Emergency) Contact Number
Varchar 0-50 Y
PICE_addess (Person In Case Of Emergency) Address
Varchar 0-50 Y
PICE_occupation (Person In Case Of Emergency) Occupation
Varchar 0-50 Y
PICE_other_occupation
(Person In Case Of Emergency) Other Occupation
Varchar 0-50 Y
DPDE_others Other Documents Presented During
Varchar 0-50 Y
79
EnrollmentDPDE_report_card Report Card Presented
During EnrollmentVarchar 0-50 Y
DPDE_birth_certificate
Birth Certificate Presented During Enrollment
Varchar 0-50 Y
Teacher Teacher_ID Teacher unique ID Int Y PKTeacher_Fname First name Varchar 0-50 YTeacher_Lname Last name Varchar 0-50 YTeacher_Mname Middle name Varchar 0-50 YTeacher_Age Age of prof Int 0-50 YTeacher_Address Address Varchar 0-50 YGender_name Gender Varchar 0-50 YTeacher_designation
Designation Varchar 0-50 Y
Teacher_blood_type
Blood Type Char 0-10 Y
Teacher_month Birth Month Varchar 0-50 YTeacher_year Birth Year Int YTeacher_day Birth Day Int YTeacher_tin Tin_number int YTeacher_GSIS GSIS_number Int YTeacher_philhealt Philhealth_number Int Y
80
hLevel_no Level_assigned Int YTeacher_icoe_contact_number
In case of emergency_contact_number
Int Y
Teacher_en En_ number Int YTeacher_pag_ibig Pag_ibig_number Int YTeacher_icoe_Mname
In case of emergency_middle_Name
Varchar 0-50 Y
Teacher_icoe_Fname
In case of emergency_first_Name
Varchar 0-50 Y
Teacher_icoe_Lname
In case of emergency_Last_Name
Varchar 0-50 Y
Teacher_icoe_relationship
In case of emergency_relation
Varchar 0-50 Y
Teacher_icoe_address
In case of emergency_address
Varchar 0-50 Y
Subject Subject_No Subject code Int Y PKSubject_name Subject_name Varchar 0-50 YLevel_no Subject_grade_level Varchar 0-50 Y FK LevelSubject_Desc Title of subject Varchar 0-50 YSubject_No Subject code Int Y FK SubjectTeacher_ID Prof ID Int Y FK TeacherSy_no School Year number Int Y FK School
81
YearRoom_no Room number Int Y FK RoomTime_no Time number Int Y FK Time
Section Section_no Section Unique ID Int Y PKSection_name Section Name Varchar 0-50 YLevel_no Section Level 0-50 Y FK Level
Time Time_no Time unique ID Int Y PKTime_desc Time description Varchar 0-50 YSession_no Unique ID Int Y FK Session
Room Room_no Room number Int Y PKRoom_name Room name Varchar 0-50 Y
Grade Grade_no Grade unique ID Int Y PKSet_no. Set ID Number Int Y FK SetPeriod_no. Period ID Number Int Y FK PeriodValue Grade_value Int Y
Set Set_no Unique ID Int Y PKStudent_id Student ID Int Y FK StudentSubject_no Subject Code Int Y FK SubjectTime_no Time ID Int Y FK TimeEffectivity_no Effectivity_ID Int Y FK Effectiv
ityUser_no User ID Int Y FK UserRoom_no Room Number Int Y FK Room
Level Level_no Level Number Int Y PK
82
Grade_Level Level Description Varchar YUser Accounts User_No User unique ID Int Y PK
Username Unique Username Varchar 0-50 YPassword User Password Varchar 0-50 YPrincipal Principal account
typeAdmin Admin account type Varchar 0-50 YGuidance_counselor
Guidance_counselor account type
Y
Grade_head Grade_head account type
Y
Teacher Teacher account type YStatus Status YGender_desc Gender Description Varchar Y
Assign1 No. Unique ID for Assign1 Int Y PK
Section_No. Section Number Int Y FK Section
Session_No. Session Number Int Y FK Session
Effectivity_No. School Year Int Y FK Effectivity
Student_No. Control Number Int Y FK Student
Assign2 No. Unique id for assign2 Int Y PK
83
User_No. Unique ID for User Int Y FK User
Section_No. Section Number Int Y FK Section
Effectivity_No. Scool Year Int Y FK Effectivity
Period Period_No. Unique ID Int Y PK
Name Description Varchar 0-50 Y
Session Session_No. Unique ID Int Y PK
Name Session Description Varchar 0-50 Y
Effectivity Effectivity_No. Unique ID Int Y PK
School_Year School Year Varchar Y
84
Prototypes Specification
Figure 1.1 Login Screen
The system shall prompt the user to enter the username
and password in order to gain access to the system once it is
loaded. It functions as security to prevent unauthorized
personnel from entering the system.
Figure 1.2 Grade Head Menu Screen
85
The system shall have an account for grade head teachers.
Using this system, each grade level with a grade head shall
manage the students, records and the school requirements that
are to be submitted every quarter.
Figure 1.3 Principal Menu Screen
The system shall have an account for principal as one of
the administrators. It is the user menu screen in which the
administrator could access the overall processes of the
system. It also has a unique function, the random sectioning
process for all enrolled students, which only the principal
can generate.
86
Figure 1.4Student Enrolment Form
The system shall provide a mechanism for adding,
editing and deleting a student record. A window form
which requires the filing of basic student information
which requires their name, address, age and other data
needed for enrolling students.Subsequently, the records
added in the system shall have a mechanism which enables
them to view a single record.
Figure 1.5Add New Subject Form
The system shall provide a mechanism for adding,
editing and deleting a subject record. A window form that87
is used for utilities where admins could simply save the
subject records in the database.
Figure 1.6Composite Sheets
The system shall provide a composite sheet report, a
window form which was generated from the class record
into subject rating sheet and composite rating sheet,
which entail the average of the student per subject areas
and by grading period.
Chapter VI
Source Code
Main_form
PublicClassmain_form
PrivateSub btn_students_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_students.MouseEnter
88
btn_students.BackgroundImage = My.Resources.btn_students_hoverEndSub
PrivateSub btn_students_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_students.MouseLeave btn_students.BackgroundImage = My.Resources.btn_studentsEndSub
PrivateSub btn_subjects_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_subjects.MouseEnter btn_subjects.BackgroundImage = My.Resources.btn_subjects_hoverEndSub
PrivateSub btn_subjects_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_subjects.MouseLeave btn_subjects.BackgroundImage = My.Resources.btn_subjectsEndSub
PrivateSub btn_grades_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_grades.MouseEnter btn_grades.BackgroundImage = My.Resources.btn_grades_hoverEndSub
PrivateSub btn_grades_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_grades.MouseLeave btn_grades.BackgroundImage = My.Resources.btn_gradesEndSub
PrivateSub btn_sections_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_sections.MouseEnter btn_sections.BackgroundImage = My.Resources.btn_sections_hoverEndSub
PrivateSub btn_sections_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_sections.MouseLeave btn_sections.BackgroundImage = My.Resources.btn_sectionsEndSub
PrivateSub btn_rooms_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_rooms.MouseEnter btn_rooms.BackgroundImage = My.Resources.btn_rooms_hoverEndSub
PrivateSub btn_rooms_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_rooms.MouseLeave btn_rooms.BackgroundImage = My.Resources.btn_roomsEndSub
PrivateSub btn_enrollment_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_enrollment.MouseEnter btn_enrollment.BackgroundImage = My.Resources.btn_enrollment_hoverEndSub
89
PrivateSub btn_enrollment_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_enrollment.MouseLeave btn_enrollment.BackgroundImage = My.Resources.btn_enrollmentEndSub
PrivateSub btn_users_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_users.MouseEnter btn_users.BackgroundImage = My.Resources.btn_users_hoverEndSub
PrivateSub btn_users_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_users.MouseLeave btn_users.BackgroundImage = My.Resources.btn_usersEndSub
PrivateSub btn_account_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_account.MouseEnter btn_account.BackgroundImage = My.Resources.btn_account_hoverEndSub
PrivateSub btn_account_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_account.MouseLeave btn_account.BackgroundImage = My.Resources.btn_accountEndSub
PrivateSub btn_reports_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_reports.MouseEnter btn_reports.BackgroundImage = My.Resources.btn_reports_hoverEndSub
PrivateSub btn_reports_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_reports.MouseLeave btn_reports.BackgroundImage = My.Resources.btn_reportsEndSub
PrivateSub btn_logout_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_logout.MouseEnter btn_logout.BackgroundImage = My.Resources.btn_logout_hoverEndSub
PrivateSub btn_logout_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_logout.MouseLeave btn_logout.BackgroundImage = My.Resources.btn_logoutEndSub
PrivateSub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick lbl_datetime.Text = Format(Now, "hh:mmtt ddddd MM-dd-yyyy")EndSub
PrivateSub btn_students_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_students.Click
90
'students_form.Location = New Point(10, 140)'students_form.Location.Ystudents_form.ShowDialog()EndSub
PrivateSub btn_subjects_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_subjects.Clicksubjects_form.ShowDialog()
EndSub
PrivateSub btn_grades_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_grades.Click'grades_options.ShowDialog() setOptions(grades_options, Panel1) Timer2.Start()
EndSub
PrivateSub btn_sections_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sections.Click'sections_options.ShowDialog() setOptions(sections_options, Panel1) Timer2.Start()
EndSub
PrivateSub btn_rooms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_rooms.Clickrooms_form.ShowDialog()
EndSub
PrivateSub btn_enrollment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_enrollment.Click'enrollment_options.ShowDialog() setOptions(enrollment_options, Panel1) Timer2.Start()
EndSub
PrivateSub btn_users_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_users.Click'users_options.ShowDialog() setOptions(users_options, Panel1) Timer2.Start()
EndSub
PrivateSub btn_account_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_account.Click
91
EndSub
PrivateSub btn_reports_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_reports.Click'reports_options.ShowDialog() setOptions(reports_options, Panel1) Timer2.Start()EndSub
PrivateSub btn_logout_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_logout.Clicklogin_form.Show()Me.Hide()EndSub
PrivateSub main_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.LoadIf current_user.type = "Teacher"Then btn_students.Enabled = False btn_subjects.Enabled = False btn_sections.Enabled = False btn_rooms.Enabled = False btn_enrollment.Enabled = False btn_users.Enabled = False btn_reports.Enabled = FalseEndIf
If current_user.type = "Admin"Then btn_students.Enabled = True btn_subjects.Enabled = True btn_sections.Enabled = True btn_rooms.Enabled = True btn_enrollment.Enabled = True btn_users.Enabled = True btn_reports.Enabled = TrueEndIf
EndSub
PrivateSub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.TickIf Panel1.Height = 400 Then Timer2.Stop()Else Panel1.Height = Panel1.Height + 50EndIfEndSubEndClass
Login_form
PublicClasslogin_form
92
PrivateSub login_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load txt_username.Focus()
EndSub
PrivateSub btn_login_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_login.ClickIf user_login("SELECT * FROM [User] WHERE Status = 'Active' AND Username= '"& txt_username.Text &"'", txt_password.Text) Then MsgBox("Login Successful")main_form.Show()Me.Hide()
Else MsgBox("Login Failed")EndIfEndSub
PrivateSub btn_exit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_exit.ClickMe.Close()
EndSubEndClass
Test
Imports Microsoft.Win32Imports System.DataImports System.Data.OleDbImports System.WindowsImports System.IO
PublicClasstest
'Dim mystream As StreamDim mystream As IO.MemoryStream
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'With OpenFileDialog1' .InitialDirectory = "C:\"' .Filter = "All Files|*.*|Bitmaps|*.bmp|GIFs|*.gif|JPEGs|*.dwg"' .FilterIndex = 2
93
'End WithIf OpenFileDialog1.ShowDialog() = DialogResult.OK Then TextBox1.Text = OpenFileDialog1.FileNameEndIf' '04-03' With PicSave' .Image = Image.FromFile(OpenFileDialog1.FileName)' .SizeMode = PictureBoxSizeMode.CenterImage' .BorderStyle = BorderStyle.Fixed3D' End With' '---------------' Label1.Text = Val(odlg.FileName)
'End If
EndSub
PrivateSub sve_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickMy.Computer.FileSystem.CopyFile(TextBox1.Text, "C:\Users\Roderica Deguitos\Desktop\A\"& OpenFileDialog1.SafeFileName)
'Dim ms As New IO.MemoryStream()
'PicSave.Image.Save(ms, PicSave.Image.RawFormat)
'Dim arrImage() As Byte = ms.GetBuffer()
'' Dim arrImage() As Byte = mystream.GetBuffer
''mystream.Close()
'Dim strFilename As String = TextBox1.Text.Substring(TextBox1.Text.LastIndexOf("\") + 1)'' Dim strFilename As String = Label1.Text.Substring(Label1.Text.LastIndexOf("\") + 1)'Dim connectionstring As String'connectionstring = "Provider=SQLNCLI;Server=Rey-PC\SQLEXPRESS;Database=STA ANA ELEM DB;Uid=server; Pwd=admin;"
94
'Dim cnn As New OleDbConnection(connectionstring)
'' connectionstring = "Data Source=CTECH002\SQLEXPRESS;initial catalog =TRACKERDB;USER ID=sa;password=sa"'cnn.Open()'Dim strSQL As String = "INSERT INTO Student(Image) VALUES(?)"'Dim cmd As New OleDbCommand(strSQL, cnn)
'With cmd' ' .Parameters.Add(New OleDbParameter("@Filename", OleDbType.VarChar, 50)).Value = strFilename' .Parameters.Add("?", OleDbType.LongVarBinary).Value = arrImage 'mystream
'End With
'cmd.ExecuteNonQuery()
'cnn.Close()'MsgBox("Updated")
EndSub
'Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click' Form2.Show()' Me.Hide()
'End Sub
PrivateSub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
EndSub
PrivateSub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click'connect.Open()
'Dim command As New OleDbCommand("SELECT Image FROM Student WHERE Student_no = '133'", connect)'Dim reader As OleDbDataReader = command.ExecuteReader
''If reader.HasRows Then'' reader.Read()'' PictureBox1.Image = reader(0)
95
'' Dim cmd As New System.Data.SqlClient.SqlCommand("select D1 from DBFile where mem_no=2")'' cmd.Connection = cn'reader.Read()
'command.CommandType = CommandType.Text
'Dim ImgStream As New IO.MemoryStream(CType(reader(0), Byte()))
'PictureBox1.Image = Image.FromStream(ImgStream)
'ImgStream.Dispose()
'connect.Close() PictureBox1.ImageLocation = "C:\Users\Roderica Deguitos\Desktop\A\"& OpenFileDialog1.SafeFileName
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImageEndSubEndClass
Function_module
Imports System.DataImports System.Data.OleDbImports System.IOImports System.Security.CryptographyImports System.Text
Modulefunction_modulePublic connectString AsString = "Provider=SQLNCLI;Server=Rey-PC\SQLEXPRESS;Database=STA ANA ELEM DB;Uid=server; Pwd=admin;"Public connect AsNewOleDbConnection(connectString)Public key AsString = "&1?@*>5>"Public current_user AsUser
PublicStructureUserPublic no AsIntegerPublic username AsStringPublic password AsStringPublic type AsString
EndStructure
PublicSub connectionUpdate()
If connect.State = ConnectionState.Closed Then connect.Open()
96
Else connect.Close()
EndIfEndSub
PublicSub add_edit_delete(ByVal query AsString)Dim command AsNewOleDbCommand(query, connect)Try connectionUpdate() command.ExecuteNonQuery() connectionUpdate()Catch ex AsOleDbException MsgBox(ex.ToString)EndTryEndSub
PublicSub randomSection(ByVal level_no AsString, ByVal session_no AsString, ByVal effectivity_no AsString)Try connectionUpdate()
Dim command_section AsNewOleDbCommand("SELECT Section_no FROM Section WHERE Level_no = "& level_no &" AND Type = 'Regular'", connect)Dim record_section AsOleDbDataReader = command_section.ExecuteReaderDim section_count AsInteger = 0
If record_section.HasRows Then
While record_section.Read() section_count += 1
EndWhileEndIfDim section(section_count) AsInteger record_section.Close()
Dim record_section2 AsOleDbDataReader = command_section.ExecuteReader
Dim counter AsInteger = 0If record_section2.HasRows Then
While record_section2.Read() section(counter) = record_section2(0) counter += 1EndWhileEndIf
Dim command AsNewOleDbCommand("SELECT Student.Student_no, Student.Gender, Enrollment.Enrollment_no FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Enrollment.Enrollment_no = Assign1.Enrollment_no WHERE
97
Enrollment.Level_no = '"& level_no &"' AND Enrollment.Session_no ='"& session_no &"' AND Enrollment.Effectivity_no ='"& effectivity_no &"' ANDAssign1.Enrollment_no IS NULL ", connect)Dim record AsOleDbDataReader = command.ExecuteReader
Dim count AsInteger = 0Dim insertion AsString = "INSERT INTO Assign1(Enrollment_no,Section_no) "
Dim general_averageDim a AsInteger = 0Dim b AsInteger = 0Dim c AsInteger = 0Dim d AsInteger = 0Dim succeeding_row = False
Dim total_enrolled AsInteger = 0If record.HasRows Then
While record.Read()Dim command2 AsNewOleDbCommand("SELECT COUNT(*) as 'TotalSubject', Sum(Grade.Value) as 'TotalGrade' FROM Enrollment " _&"INNER JOIN Student ON Enrollment.Student_no = Student.Student_no " _&"INNER JOIN Grade ON Student.Student_no = Grade.Student_no " _&"INNER JOIN [Set] ON Grade.Set_no = [Set].Set_no " _&"WHERE Student.Student_no = '"& record(0).ToString &"' AND (Enrollment.Session_no = [Set].Session_no) AND (Enrollment.Effectivity_no = [Set].Effectivity_no)", connect)
Dim record2 AsOleDbDataReader = command2.ExecuteReader
If record2.HasRows Then record2.Read()If record2(0) > 0 Then general_average = record2(1) / record2(0)
If record(1) = "Male"ThenIf general_average >= 75 And general_average <= 79 ThenIf a = section_count Then a = 0EndIf
If succeeding_row Then insertion = insertion + " UNION ALL "EndIf
insertion = insertion &"SELECT '"& record(2).ToString &"' as 'Enrollment_no','"& section(a).ToString &"' as'Section_no' " a += 1 succeeding_row = True total_enrolled += 1
98
ElseIf general_average <= 85 And general_average >= 80 ThenIf b = section_count Then b = 0EndIf
If succeeding_row Then insertion = insertion + " UNION ALL "EndIf
insertion = insertion &"SELECT '"& record(2).ToString &"' as 'Enrollment_no','"& section(b).ToString &"' as'Section_no' " b += 1 succeeding_row = True total_enrolled += 1EndIfElseIf general_average >= 75 And general_average <= 79 ThenIf c = section_count Then c = 0EndIf
If succeeding_row Then insertion = insertion + " UNION ALL "EndIf
insertion = insertion &"SELECT '"& record(2).ToString &"' as 'Enrollment_no','"& section(c).ToString &"' as'Section_no' "' MsgBox(insertion + " " + general_average.ToString + " " + record(1)) c += 1 succeeding_row = True total_enrolled += 1ElseIf general_average <= 85 And general_average >= 80 ThenIf d = section_count Then d = 0EndIf
If succeeding_row Then insertion = insertion + " UNION ALL "EndIf insertion = insertion &"SELECT '"& record(2).ToString &"' as 'Enrollment_no','"& section(d).ToString &"' as'Section_no' " d += 1 succeeding_row = True total_enrolled += 1EndIfEndIfEndIf
99
EndIf count = count + 1EndWhileEndIfDim sample AsString = ""
If total_enrolled > 0 ThenDim cmdinsert AsNewOleDbCommand(insertion, connect)
cmdinsert.ExecuteNonQuery()
MsgBox("Total Number of Student Assigned: " + total_enrolled.ToString)Else MsgBox("Nothing happen")EndIf connectionUpdate()
Catch ex AsException
EndTry
EndSub
PublicSub fillComboBox(ByRef cb AsComboBox, ByVal table AsString, ByVal vm AsString, ByVal dm AsString, ByVal query AsString)
Try connectionUpdate()
Dim da AsNewOleDbDataAdapter(query, connect)Dim ds AsNewDataSet da.Fill(ds, table)
With cb .DataSource = ds.Tables(table) .ValueMember = vm .DisplayMember = dmEndWith connectionUpdate()
Catch ex AsException
EndTry
EndSub
PublicSub fillDataGridView(ByRef dgv AsDataGridView, ByVal query AsString)Try connectionUpdate()While dgv.RowCount > 0
100
dgv.Rows.Remove(dgv.Rows(0))EndWhile
Dim da AsNewOleDbDataAdapter(query, connect)Dim ds AsNewDataSet()
If da.Fill(ds) Then dgv.DataSource = ds.Tables(0)EndIf connectionUpdate()Catch ex AsException
EndTryEndSub
Function user_login(ByVal query AsString, ByVal password AsString) AsBooleanTry connect.Open()Dim command AsNewOleDbCommand(query, connect)
Dim record AsOleDbDataReader = command.ExecuteReader()
If record.HasRows Then record.Read()If password = record("Password").ToString ThenWith current_user .no = record("User_no") .username = record("Username") .password = record("Password") 'decryptString(record(5))EndWith connect.Close() retrieveUserType("SELECT [Type].Name FROM [Type] INNER JOIN [User] ON [User].Type_no = [Type].Type_no WHERE [User].User_no = '"& current_user.no &"'")
ReturnTrueElse connect.Close()
ReturnFalseEndIf
Else connect.Close()
ReturnFalse
101
EndIf
Catch ex AsException MsgBox(ex.ToString)
ReturnFalseEndTryEndFunction
PublicSub retrieveUserType(ByVal query AsString)Try connect.Open()Dim command AsNewOleDbCommand(query, connect)
Dim record AsOleDbDataReader = command.ExecuteReader()
If record.HasRows Then record.Read() current_user.type = record(0)EndIf connect.Close()
Catch ex AsException MsgBox(ex.ToString)EndTryEndSub
PublicSub retrieveGenAve(ByVal student_no AsString, ByVal effectivity_noAsString)Try connect.Open()Dim command AsNewOleDbCommand("SELECT Enrollment.Enrollment_no, Enrollment.Effectivity_no, Level.Level_no as 'Level_no', Level.Name FROMEnrollment INNER JOIN Level ON Enrollment.Level_no = Level.Level_no WHERE Student_no = '"& student_no &"' ORDER BY Enrollment.Effectivity_noDESC", connect)Dim reader AsOleDbDataReader = command.ExecuteReaderDim enrollment_no AsStringDim new_effectivity_no AsStringDim level_name AsStringIf reader.HasRows Then reader.Read() enrollment_no = reader(0).ToString new_effectivity_no = reader("Effectivity_no").ToString level_name = reader("Name").ToString
Dim grade_command AsNewOleDbCommand("SELECT COUNT(*) as 'TotalSubject', Sum(Grade.Value) as 'TotalGrade' FROM Enrollment " _&"INNER JOIN Student ON Enrollment.Student_no = Student.Student_no " _&"INNER JOIN Grade ON Student.Student_no = Grade.Student_no " _&"INNER JOIN [Set] ON Grade.Set_no = [Set].Set_no " _
102
&"WHERE (Enrollment.Session_no = [Set].Session_no) AND (Enrollment.Effectivity_no = [Set].Effectivity_no) AND Enrollment.Enrollment_no = '"& enrollment_no &"'", connect)
Dim grade_reader AsOleDbDataReader = grade_command.ExecuteReader
Dim general_average = 0
If grade_reader.HasRows Then grade_reader.Read()
If grade_reader(0) > 0 Then general_average = grade_reader(1) / grade_reader(0)
EndIf
manage_enrollment.txt_level.Text = level_name.ToString manage_enrollment.txt_genave.Text = general_average.ToString manage_enrollment.cmb_level.SelectedValue = reader("Level_no") manage_enrollment.cmb_level.Enabled = False
manage_enrollment.btn_enroll.Enabled = TrueEndIfEndIf
manage_enrollment.btn_enroll.Enabled = True
connect.Close()
Catch ex AsException
EndTry
EndSub
PublicSub loadUserData(ByVal user_no AsString)Try connect.Open()Dim command AsNewOleDbCommand("SELECT * FROM [User] WHERE User_no = '"& user_no &"'", connect)Dim reader AsOleDbDataReader = command.ExecuteReader
If reader.HasRows Then
103
reader.Read()
With manage_account .txtbox_lname.Text = reader("Lname").ToString .txtbox_mname.Text = reader("Mname").ToString .txtbox_fname.Text = reader("Fname") .dtp_date_of_birth.Text = reader("Date_of_birth") .txtbox_place_of_birth.Text = reader("Place_of_birth") .txtbox_address.Text = reader("Address") .cmb_gender.Text = reader("Gender") .cmb_blood_type.Text = reader("Blood_type") .txtbox_tin.Text = reader("Tin") .txtbox_philhealth.Text = reader("Philhealth") .txtbox_gsis.Text = reader("Gsis") .txtbox_en.Text = reader("En") .txtbox_pag_ibig.Text = reader("Pag_ibig") .txtbox_guardian_mname.Text = reader("Ptbiicoe_Mname") .txtbox_guardian_fname.Text = reader("Ptbiicoe_Fname") .txtbox_guardian_lname.Text = reader("Ptbiicoe_Lname") .cmb_relationship.Text = reader("Ptbiicoe_relationship") .txtbox_contact_number.Text = reader("Ptbiicoe_contact") .txtbox_guardian_address.Text = reader("Ptbiicoe_address")EndWith
EndIf
connect.Close()Catch ex AsException ex.ToString()EndTry
EndSub
PublicSub setOptions(ByRef form1 AsForm, ByRef panel1 AsPanel) panel1.Controls.Clear() form1.TopLevel = False panel1.Controls.Add(form1) panel1.Height = 50 panel1.Visible = True form1.Show()EndSub
PublicFunction encryptString(ByVal strtext AsString) AsStringReturn Encrypt(strtext, key)EndFunction
104
PublicFunction decryptString(ByVal strtext AsString) AsStringReturn Decrypt(strtext, key)EndFunction
PrivateFunction Encrypt(ByVal strText AsString, ByVal strEncrKey _AsString) AsStringDim byKey() AsByte = {}Dim IV() AsByte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}
Try byKey = System.Text.Encoding.UTF8.GetBytes(Left(strEncrKey, 8))
Dim des AsNewDESCryptoServiceProvider()Dim inputByteArray() AsByte = Encoding.UTF8.GetBytes(strText)Dim ms AsNewMemoryStream()Dim cs AsNewCryptoStream(ms, des.CreateEncryptor(byKey, IV), CryptoStreamMode.Write) cs.Write(inputByteArray, 0, inputByteArray.Length) cs.FlushFinalBlock()ReturnConvert.ToBase64String(ms.ToArray())
Catch ex AsExceptionReturn ex.MessageEndTryEndFunction
PrivateFunction Decrypt(ByVal strText AsString, ByVal sDecrKey _AsString) AsStringDim byKey() AsByte = {}Dim IV() AsByte = {&H12, &H34, &H56, &H78, &H90, &HAB, &HCD, &HEF}Dim inputByteArray(strText.Length) AsByte
Try byKey = System.Text.Encoding.UTF8.GetBytes(Left(sDecrKey, 8))Dim des AsNewDESCryptoServiceProvider() inputByteArray = Convert.FromBase64String(strText)Dim ms AsNewMemoryStream()Dim cs AsNewCryptoStream(ms, des.CreateDecryptor(byKey, IV), CryptoStreamMode.Write)
cs.Write(inputByteArray, 0, inputByteArray.Length) cs.FlushFinalBlock()Dim encoding As System.Text.Encoding = System.Text.Encoding.UTF8
Return encoding.GetString(ms.ToArray())
Catch ex AsExceptionReturn ex.MessageEndTryEndFunction
105
EndModule
Account_options
PublicClassaccount_options
PrivateSub btn_manage_account_Click(ByVal sender As System.Object, ByVale As System.EventArgs) Handles btn_manage_account.Clickmanage_account.ShowDialog()
EndSub
PrivateSub btn_change_password_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_change_password.Clickchange_password.ShowDialog()
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Change_password
PublicClasschange_password
PrivateSub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.ClickIf txt_old.Text = ""Or txt_new.Text = ""Or txt_retype.Text = ""Then MsgBox("Fill in all fields")ElseIf txt_old.Text = current_user.password Then
If txt_new.Text = txt_retype.Text Then add_edit_delete("UPDATE [User] SET Password = '"& txt_new.Text &"' WHERE User_no = '"& current_user.no &"'")
106
current_user.password = txt_new.Text MsgBox("Change Successful")Else MsgBox("Password Doesn't Match")EndIf
Else MsgBox("Password Incorrect")
EndIfEndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Manage_account
PublicClassmanage_account
PrivateSub manage_account_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) HandlesMyBase.Load loadUserData(current_user.no)EndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.ClickTryIfMessageBox.Show("Are you sure?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Update [User] set "& _" Fname = '"& txtbox_lname.Text &"',"& _" Mname = '"& txtbox_mname.Text &"',"& _" Lname = '"& txtbox_fname.Text &"',"& _" Date_of_birth = '"& dtp_date_of_birth.Text &"',"& _" Place_of_birth = '"& txtbox_place_of_birth.Text &"',"& _" Address = '"& txtbox_address.Text &"',"& _" Gender = '"& cmb_gender.Text &"',"& _" Blood_type = '"& cmb_blood_type.Text &"',"& _" Tin = '"& txtbox_tin.Text &"',"& _" Philhealth = '"& txtbox_philhealth.Text &"',"& _" Gsis = '"& txtbox_gsis.Text &"',"& _" En = '"& txtbox_en.Text &"',"& _" Pag_ibig = '"& txtbox_pag_ibig.Text &"',"& _" Ptbiicoe_Mname = '"& txtbox_guardian_mname.Text &"',"& _" Ptbiicoe_Fname = '"& txtbox_guardian_fname.Text &"',"& _
107
" Ptbiicoe_Lname = '"& txtbox_guardian_lname.Text &"',"& _" Ptbiicoe_relationship = '"& cmb_relationship.Text &"',"& _" Ptbiicoe_contact = '"& txtbox_contact_number.Text &"',"& _" Ptbiicoe_Address = '"& txtbox_guardian_address.Text &"'"& _" WHERE User_no = '"& current_user.no &"'") MsgBox("Record Successfully Updated", MsgBoxStyle.Information)Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit SubEndIfCatch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_reset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_reset.Click loadUserData(current_user.no)EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Enrollment_options
PublicClassenrollment_options
PrivateSub btn_manage_enrollment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_manage_enrollment.Clickmanage_enrollment.ShowDialog()
EndSub
PrivateSub btn_manage_effectivity_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_manage_effectivity.Clickmanage_effectivity.ShowDialog()
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
EndClass
108
Manage_effectivity
PublicClassmanage_effectivity
PrivateSub refreshGrid() fillDataGridView(dgvEffectivity, "SELECT * FROM Effectivity WHERE Effectivity.Start_date LIKE '%"& txtbox_search.Text &"%' OR Effectivity.Start_date LIKE '%"& txtbox_search.Text &"%'")EndSub
PrivateSub manage_effectivity_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load refreshGrid()EndSub
PrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged refreshGrid()EndSub
PublicSub enableOrDisableAll(ByVal pass AsBoolean) txtbox_effectivity_no.Clear() txtbox_search.Clear()EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False
btn_cancel.Enabled = True
txtbox_effectivity_no.Clear()
EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False
Try
IfMessageBox.Show("Do you really want to add this Effectivity on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
109
add_edit_delete("Insert into Effectivity(Start_date,End_date,Status) "& _"values ('"& dtp_start.Text &"','"& dtp_end.Text &"', 'Unlock')")
MsgBox("Record Successfully Added", MsgBoxStyle.Information) refreshGrid() enableOrDisableAll(True)
Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit Sub
EndIf
Catch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False
btn_cancel.Enabled = True
TryIfMessageBox.Show("Do you really want to update this Effectivity on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("Update Effectivity set "& _" Start_date = '"& dtp_start.Text &"'"& _" End_date = '"& dtp_end.Text &"'"& _" WHERE Effectivity_no = '"& txtbox_effectivity_no.Text &"'") MsgBox("Record Successfully Updated", MsgBoxStyle.Information)Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit SubEndIfCatch ex AsException MsgBox(ex.Message)EndTry
refreshGrid() enableOrDisableAll(True)EndSub
110
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = FalseEndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub dgvEffectivity_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvEffectivity.CellClick btn_update.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If (dgvEffectivity.SelectedRows.Count > 0) Then txtbox_effectivity_no.Text = dgvEffectivity.CurrentRow.Cells(0).Value.ToString() dtp_start.Text = dgvEffectivity.CurrentRow.Cells(1).Value.ToString() dtp_end.Text = dgvEffectivity.CurrentRow.Cells(2).Value.ToString()EndIf
EndSubEndClass
Manage_enrollment
PublicClassmanage_enrollment
PrivateSub manage_enrollment_Load(ByVal sender As System.Object, ByVal eAs System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC")
fillComboBox(cmb_effectivity_enrolled, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as
111
varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") fillComboBox(cmb_level_enrolled, "Level", "Level_no", "Name", "SELECT * FROM Level") fillComboBox(cmb_session_enrolled, "Session", "Session_no", "Name", "SELECT * FROM Session")
Try fillDataGridView(dgvStudents, "SELECT DISTINCT Student.Student_no as 'No',dbo.Student.Lname + ', ' + dbo.Student.Fname + ' ' + dbo.Student.Mname AS 'Student', Gender as 'Gender', Type as 'Type' FROM Student LEFT JOIN Enrollment ON Student.Student_no = Enrollment.Student_no WHERE Enrollment.Student_no IS NULL OR Enrollment.Effectivity_no <> '"& cmb_effectivity.SelectedValue.ToString &"'") fillDataGridView(dgv_students_enrolled, "SELECT Student.Student_no as 'No', dbo.Student.Lname + ', ' + dbo.Student.Fname+ ' ' + dbo.Student.Mname AS 'Student', Student.Gender as 'Gender', Student.Type as 'Type' FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level_enrolled.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity_enrolled.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity_enrolled.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session_enrolled.SelectedValue.ToString &"'")Catch ex AsException
EndTry
EndSub
PrivateSub btn_enroll_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_enroll.Click
Try add_edit_delete("INSERT INTO Enrollment(Student_no,Level_no,Session_no,Effectivity_no) VALUES('"& dgvStudents.CurrentRow.Cells(0).Value.ToString &"','"& cmb_level.SelectedValue.ToString &"','"& cmb_session.SelectedValue.ToString &"','"& cmb_effectivity.SelectedValue.ToString &"')")
Try fillDataGridView(dgvStudents, "SELECT DISTINCT Student.Student_no as 'No',dbo.Student.Lname + ', ' + dbo.Student.Fname + ' ' + dbo.Student.Mname AS 'Student', Gender as 'Gender', Type as 'Type' FROM Student LEFT JOIN Enrollment ON Student.Student_no = Enrollment.Student_no WHERE Enrollment.Student_no IS NULL OR
112
Enrollment.Effectivity_no <> '"& cmb_effectivity.SelectedValue.ToString &"'") fillDataGridView(dgv_students_enrolled, "SELECT Student.Student_no as 'No', dbo.Student.Lname + ', ' + dbo.Student.Fname+ ' ' + dbo.Student.Mname AS 'Student', Student.Gender as 'Gender', Student.Type as 'Type' FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level_enrolled.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity_enrolled.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity_enrolled.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session_enrolled.SelectedValue.ToString &"'")Catch ex AsException
EndTry btn_enroll.Enabled = False MsgBox("Enroll Successful")Catch ex AsException MsgBox("Fail")EndTry
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub dgvStudents_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvStudents.CellClick txt_level.Clear() txt_genave.Clear()TryIf dgvStudents.CurrentRow.Cells("Type").Value.ToString = "New"Then cmb_level.SelectedIndex = 0 cmb_level.Enabled = False btn_enroll.Enabled = TrueElseIf dgvStudents.CurrentRow.Cells("Type").Value.ToString = "Old"Then retrieveGenAve(dgvStudents.CurrentRow.Cells(0).Value.ToString, cmb_effectivity.SelectedValue.ToString)ElseEndIfCatch ex AsException
EndTry
113
EndSub
PrivateSub cmb_enrolled_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_level_enrolled.SelectedIndexChanged, cmb_session_enrolled.SelectedIndexChanged, cmb_effectivity_enrolled.SelectedIndexChangedTry fillDataGridView(dgv_students_enrolled, "SELECT Student.Student_no as 'No', dbo.Student.Lname + ', ' + dbo.Student.Fname+ ' ' + dbo.Student.Mname AS 'Student', Student.Gender as 'Gender', Student.Type as 'Type' FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level_enrolled.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity_enrolled.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity_enrolled.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session_enrolled.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSubEndClass
Grade_options
PublicClassgrades_options
PrivateSub btn_manage_grades_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_manage_grades.Clickmanage_grades.ShowDialog()
EndSub
PrivateSub btn_student_grades_Click(ByVal sender As System.Object, ByVale As System.EventArgs) Handles btn_student_grades.Clickstudent_grades.ShowDialog()
EndSub
114
PrivateSub btn_transferee_grades_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_transferee_grades.Clicktransferee_grades.ShowDialog()
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub btn_mg_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_manage_grades.MouseEnter btn_manage_grades.BackgroundImage = My.Resources.btn_hover btn_manage_grades.BackgroundImageLayout = ImageLayout.StretchEndSub
PrivateSub btn_mg_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_manage_grades.MouseLeave btn_manage_grades.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_vg_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_student_grades.MouseEnter btn_student_grades.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_vg_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_student_grades.MouseLeave btn_student_grades.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_close_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_close.MouseEnter btn_close.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_close_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_close.MouseLeave btn_close.BackgroundImage = My.Resources.btnEndSub
EndClassManage_grades
PublicClassmanage_grades
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
115
EndSub
PrivateSub refreshGrid()Try fillDataGridView(dgvStudent, "SELECT Student.Student_no as'No.', Student.Fname, Student.Mname, Student.Gender, Student.Lname FROMAssign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN Student ON Enrollment.Student_no = Student.Student_no where Assign1.Section_no = '"& cmb_section.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString.ToString &"'") fillDataGridView(dgvSubject, "SELECT [Set].Set_no AS'Set Number', Subject.Name, Subject.Description FROM [Set] INNER JOIN SubjectON [Set].Subject_no = Subject.Subject_no WHERE [Set].Section_no = '"& cmb_section.SelectedValue.ToString &"' AND [Set].Session_no = '"& cmb_session.SelectedValue.ToString &"' AND [Set].Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSub
PrivateSub cmb_section_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_section.SelectedIndexChanged
refreshGrid()
EndSub
PrivateSub grades_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_section, "Set", "Section_no", "Name", "SELECT *FROM Section") fillComboBox(cmb_period, "Period", "Period_no", "Name", "SELECT * FROM Period") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC")
EndSub
116
PrivateSub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click add_edit_delete("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('"& dgvStudent.CurrentRow.Cells(0).Value.ToString &"','"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"','"& cmb_period.SelectedValue.ToString &"','"& txt_grade.Text &"')")'MsgBox("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('" & dgvStudent.CurrentRow.Cells(0).Value.ToString & "','" & dgvSubject.CurrentRow.Cells(0).Value.ToString & "','" & cmb_period.SelectedValue.ToString & "','" & txt_grade.Text & "'") txt_grade.Clear()Try fillDataGridView(dgvGrade, "SELECT Period.Name AS 'Period',Subject.Name AS 'Subject', Grade.Value AS 'Grade'" _&" FROM Enrollment INNER JOIN " _&" [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN " _&" Session ON Enrollment.Session_no = Session.Session_no INNER JOIN " _&" Effectivity ON Enrollment.Effectivity_no = Effectivity.Effectivity_no INNER JOIN " _&" Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN " _&" Section ON Section.Section_no = Assign1.Section_no INNER JOIN " _&" Student ON Enrollment.Student_no = Student.Student_no INNER JOIN " _&" Grade ON Student.Student_no = Grade.Student_no INNER JOIN "_&" Period ON Grade.Period_no = Period.Period_no INNER JOIN " _&" [Set] ON Grade.Set_no = [Set].Set_no INNER JOIN " _&" Subject ON [Set].Subject_no = Subject.Subject_no " _&" WHERE Enrollment.Effectivity_no = [Set].Effectivity_no AND Enrollment.Session_no = [Set].Session_no AND Student.Student_no ='"& dgvStudent.CurrentRow.Cells(0).Value.ToString() &"' AND Subject.Subject_no = '"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"' AND Section.Section_no = '"& cmb_section.SelectedValue.ToString &"' AND Effectivity.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Session.Session_no = '"& cmb_session.SelectedValue.ToString &"'")
Catch ex AsException
EndTry MsgBox("Successful")EndSub
PrivateSub cmb_session_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_session.SelectedIndexChanged refreshGrid()
117
EndSub
PrivateSub cmb_effectivity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_effectivity.SelectedIndexChanged refreshGrid()
EndSub
PrivateSub dgvStudent_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvStudent.CellClickTry fillDataGridView(dgvGrade, "SELECT Period.Name AS 'Period',Subject.Name AS 'Subject', Grade.Value AS 'Grade'" _&" FROM Enrollment INNER JOIN " _&" [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN " _&" Session ON Enrollment.Session_no = Session.Session_no INNER JOIN " _&" Effectivity ON Enrollment.Effectivity_no = Effectivity.Effectivity_no INNER JOIN " _&" Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN " _&" Section ON Section.Section_no = Assign1.Section_no INNER JOIN " _&" Student ON Enrollment.Student_no = Student.Student_no INNER JOIN " _&" Grade ON Student.Student_no = Grade.Student_no INNER JOIN "_&" Period ON Grade.Period_no = Period.Period_no INNER JOIN " _&" [Set] ON Grade.Set_no = [Set].Set_no INNER JOIN " _&" Subject ON [Set].Subject_no = Subject.Subject_no " _&" WHERE Enrollment.Effectivity_no = [Set].Effectivity_no AND Enrollment.Session_no = [Set].Session_no AND Student.Student_no ='"& dgvStudent.CurrentRow.Cells(0).Value.ToString() &"' AND Subject.Subject_no = '"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"' AND Section.Section_no = '"& cmb_section.SelectedValue.ToString &"' AND Effectivity.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Session.Session_no = '"& cmb_session.SelectedValue.ToString &"'")
Catch ex AsException
EndTryEndSub
PrivateSub dgvSubject_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSubject.CellContentClickTry fillDataGridView(dgvGrade, "SELECT Period.Name AS 'Period',Subject.Name AS 'Subject', Grade.Value AS 'Grade'" _
118
&" FROM Enrollment INNER JOIN " _&" [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN " _&" Session ON Enrollment.Session_no = Session.Session_no INNER JOIN " _&" Effectivity ON Enrollment.Effectivity_no = Effectivity.Effectivity_no INNER JOIN " _&" Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN " _&" Section ON Section.Section_no = Assign1.Section_no INNER JOIN " _&" Student ON Enrollment.Student_no = Student.Student_no INNER JOIN " _&" Grade ON Student.Student_no = Grade.Student_no INNER JOIN "_&" Period ON Grade.Period_no = Period.Period_no INNER JOIN " _&" [Set] ON Grade.Set_no = [Set].Set_no INNER JOIN " _&" Subject ON [Set].Subject_no = Subject.Subject_no " _&" WHERE Enrollment.Effectivity_no = [Set].Effectivity_no AND Enrollment.Session_no = [Set].Session_no AND Student.Student_no ='"& dgvStudent.CurrentRow.Cells(0).Value.ToString() &"' AND Subject.Subject_no = '"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"' AND Section.Section_no = '"& cmb_section.SelectedValue.ToString &"' AND Effectivity.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Session.Session_no = '"& cmb_session.SelectedValue.ToString &"'")
Catch ex AsException
EndTryEndSub
EndClass
Student_grades
PublicClassstudent_grades
PrivateSub btn_proceed_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_proceed.Click fillDataGridView(dgvGrades, "SELECT Student.Fname,Subject.Name, Period.Name , Grade.Value " _&" FROM Enrollment INNER JOIN " _&" [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN " _&" Session ON Enrollment.Session_no = Session.Session_no INNER JOIN " _&" Student ON Enrollment.Student_no = Student.Student_no INNER JOIN " _&" Grade ON Student.Student_no = Grade.Student_no INNER JOIN "_&" Period ON Grade.Period_no = Period.Period_no INNER JOIN " _
119
&" [Set] ON Grade.Set_no = [Set].Set_no INNER JOIN " _&" Subject ON [Level].Level_no = Subject.Level_no " _&" WHERE Student.Lrn ='"& txtbox_stud_no.Text &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"'")EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
PrivateSub grades_view_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC")EndSubEndClass
Transferee_grades
PublicClasstransferee_grades
PrivateSub refreshGrid()Try fillDataGridView(dgvSubject, "SELECT [Set].Set_no AS 'Set Number', Subject.Name, Subject.Description, [Level].Level_no "& _" FROM [Set] INNER JOIN "& _" Subject ON [Set].Subject_no = Subject.Subject_no INNER JOIN"& _" [Level] ON Subject.Level_no = [Level].Level_no WHERE [Level].Level_no= '"& cmb_level.SelectedValue.ToString &"' AND [Set].Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString.ToString &"'")Catch ex AsExceptionEndTryEndSub
PrivateSub transferee_grades_Load(ByVal sender As System.Object, ByVal eAs System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") refreshGrid()EndSub
120
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChanged refreshGrid()EndSub
PrivateSub cmb_effectivity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_effectivity.SelectedIndexChanged refreshGrid()EndSub
PrivateSub btn_save_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_save.Click add_edit_delete("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('','"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"','1','"& txt_grade_period1.Text &"')") add_edit_delete("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('','"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"','2','"& txt_grade_period2.Text &"')") add_edit_delete("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('','"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"','3','"& txt_grade_period3.Text &"')") add_edit_delete("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('','"& dgvSubject.CurrentRow.Cells(0).Value.ToString &"','4','"& txt_grade_period4.Text &"')")
'MsgBox("INSERT INTO Grade(Student_no,Set_no,Period_no,Value) VALUES('" & dgvStudent.CurrentRow.Cells(0).Value.ToString & "','" & dgvSubject.CurrentRow.Cells(0).Value.ToString & "','" & cmb_period.SelectedValue.ToString & "','" & txt_grade.Text & "'") MsgBox("Assigning of Grades to Transferees has benn succesfull")
EndSubEndClass
Composite_sheet
121
PublicClasscomposite_sheet
PrivateSub composite_sheet_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") fillComboBox(cmb_period, "Period", "Period_no", "Name", "SELECT * FROM Period")EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChanged fillComboBox(cmb_section, "Section", "Section_no", "Name", "SELECT * FROM Section WHERE Level_no ='"& cmb_level.SelectedValue.ToString &"'")
EndSub
PrivateSub btn_generate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_generate.Click'fillDataGridView(dgvReport, "SELECT dbo.[Level].Name AS [Level], dbo.Section.Name AS Section, dbo.Session.Name AS Session, dbo.Effectivity.School_year, " _' & " dbo.Student.Lname + ', ' + dbo.Student.Fname + ' ' + dbo.Student.Mname AS Student, Student.Gender as 'Gender', Subject.Name as 'Subject', Period.Name as 'Period', Grade.Value as 'Grade', dbo.[User].Lname + ', ' + dbo.[User].Fname + ' ' + dbo.[User].Mname AS Adviser " _' & " FROM dbo.Enrollment INNER JOIN " _' & " dbo.Student ON dbo.Enrollment.Student_no = dbo.Student.Student_no INNER JOIN " _' & " dbo.[Level] ON dbo.Enrollment.Level_no = dbo.[Level].Level_no INNER JOIN " _' & " dbo.Session ON dbo.Enrollment.Session_no = dbo.Session.Session_no INNER JOIN " _' & " dbo.Effectivity ON dbo.Enrollment.Effectivity_no = dbo.Effectivity.Effectivity_no INNER JOIN " _' & " dbo.Assign1 ON dbo.Enrollment.Enrollment_no = dbo.Assign1.Enrollment_no INNER JOIN " _' & " dbo.Section ON dbo.[Level].Level_no = dbo.Section.Level_no INNER JOIN " _' & " dbo.Assign2 ON dbo.Section.Section_no = dbo.Assign2.Section_no INNER JOIN " _' & " dbo.[User] ON dbo.Assign2.User_no = dbo.[User].User_no INNER JOIN " _
122
' & " Grade ON Student.Student_no = Grade.Student_no INNER JOIN" _' & "Period ON Grade.Period_no = Period.Period_no INNER JOIN " _' & " [Set] ON Grade.Set_no = [Set].Set_no INNER JOIN " _' & " Subject ON [Set].Subject_no = Subject.Subject_no " _' & " WHERE Section.Section_no = Assign2.Section_no AND Session.Session_no = Assign2.Session_no AND Effectivity.Effectivity_no =Assign2.Effectivity_no AND Section.Section_no ='" & cmb_section.SelectedValue.ToString & "' AND Session.Session_no = '" & cmb_session.SelectedValue.ToString & "' AND Student.Gender ='" & cmb_gender.SelectedItem.ToString & "' AND Period.Period_no ='" & cmb_period.SelectedValue.ToString & "' AND Effectivity.Effectivity_no ='" & cmb_effectivity.SelectedValue.ToString & "'")
fillDataGridView(dgvReport, "SELECT dbo.[Level].Name AS [Level],dbo.Section.Name AS Section, dbo.Session.Name AS Session, CAST(year(Effectivity.Start_date) as varchar(50)) + ' - ' + CAST(year(Effectivity.End_date) as varchar(50)) as 'School_year', " _&" Student.Lname + ', ' + Student.Fname + ' ' + Student.Mname AS Student, Student.Gender as 'Gender', Subject.Name as 'Subject', Period.Name as 'Period', Grade.Value as 'Grade', [User].Lname + ', ' + [User].Fname + ' ' + [User].Mname AS Adviser " _&" FROM Enrollment INNER JOIN " _&" Student ON Enrollment.Student_no = Student.Student_no INNER JOIN " _&" [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN " _&" Session ON Enrollment.Session_no = Session.Session_no INNER JOIN " _&" Effectivity ON Enrollment.Effectivity_no = Effectivity.Effectivity_no INNER JOIN " _&" Assign1 ON Enrollment.Enrollment_no = Assign1.Enrollment_no INNER JOIN " _&" Grade ON Student.Student_no = Grade.Student_no INNER JOIN " _&" Period ON Grade.Period_no = Period.Period_no INNER JOIN " _&" Subject ON Grade.Subject_no = Subject.Subject_no INNER JOIN " _&" Section ON Assign1.Section_no = Section.Section_no INNER JOIN " _&" Assign2 ON Section.Section_no = Assign2.Section_no INNER JOIN " _&" [User] ON Assign2.Assign2_no = [User].User_no " _&" WHERE Assign1.Section_no ='"& cmb_section.SelectedValue.ToString &"' AND Enrollment.Level_no = '"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"' AND Grade.Effectivity_no ='"&cmb_effectivity.SelectedValue.ToString &"' AND Assign2.Session_no ='"& cmb_session.SelectedValue.ToString &"'")
EndSub
PrivateSub btn_preview_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_preview.ClickDim dt AsNewDataTable
123
With dt .Columns.Add("Level") .Columns.Add("Section") .Columns.Add("Session") .Columns.Add("School_Year") .Columns.Add("Student") .Columns.Add("Gender") .Columns.Add("Subject") .Columns.Add("Period") .Columns.Add("Grade") .Columns.Add("Adviser")EndWith
ForEach dr AsDataGridViewRowInMe.dgvReport.Rows dt.Rows.Add(dr.Cells("Level").Value, dr.Cells("Section").Value, dr.Cells("Session").Value, dr.Cells("School_year").Value, dr.Cells("Student").Value, dr.Cells("Gender").Value, dr.Cells("Subject").Value, dr.Cells("Period").Value, dr.Cells("Grade").Value, dr.Cells("Adviser").Value)Next
Dim rd As CrystalDecisions.CrystalReports.Engine.ReportDocument rd = Newcr_composite_sheet'rd.SetDatabaseLogon("", "")'rd.DataSourceConnections(0).IntegratedSecurity = False rd.SetDataSource(dt)
composite_sheet_view.crv_composite_sheet.ReportSource = rd
composite_sheet_view.ShowDialog()composite_sheet_view.Dispose()EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Cr_composite_sheet
'------------------------------------------------------------------------------' <auto-generated>' This code was generated by a tool.' Runtime Version:4.0.30319.18051'
124
' Changes to this file may cause incorrect behavior and will be lostif' the code is regenerated.' </auto-generated>'------------------------------------------------------------------------------
Option Strict OffOption Explicit On
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.ReportSourceImports CrystalDecisions.SharedImports SystemImports System.ComponentModel
PublicClasscr_composite_sheetInheritsReportClass
PublicSubNew()MyBase.NewEndSub
PublicOverridesProperty ResourceName() AsStringGetReturn"cr_composite_sheet.rpt"EndGetSet'Do nothingEndSetEndProperty
PublicOverridesProperty NewGenerator() AsBooleanGetReturntrueEndGetSet'Do nothingEndSetEndProperty
PublicOverridesProperty FullResourceName() AsStringGetReturn"SACES_NBESIMS___MURON5.cr_composite_sheet.rpt"EndGetSet'Do nothingEndSetEndProperty
<Browsable(false), _
125
DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty Section1() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(0)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty Section2() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(1)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty GroupHeaderSection1() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(2)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty GroupHeaderSection2() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(3)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty Section3() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(4)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _
126
PublicReadOnlyProperty GroupFooterSection2() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(5)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty GroupFooterSection1() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(6)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty Section4() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(7)EndGetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicReadOnlyProperty Section5() As CrystalDecisions.CrystalReports.Engine.SectionGetReturnMe.ReportDefinition.Sections(8)EndGetEndPropertyEndClass
<System.Drawing.ToolboxBitmapAttribute(GetType(CrystalDecisions.[Shared].ExportOptions), "report.bmp")> _PublicClassCachedcr_composite_sheetInheritsComponentImplementsICachedReport
PublicSubNew()MyBase.NewEndSub
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicOverridableProperty IsCacheable() AsBooleanImplements CrystalDecisions.ReportSource.ICachedReport.IsCacheable
127
GetReturntrueEndGetSet'EndSetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicOverridableProperty ShareDBLogonInfo() AsBooleanImplements CrystalDecisions.ReportSource.ICachedReport.ShareDBLogonInfoGetReturnfalseEndGetSet'EndSetEndProperty
<Browsable(false), _DesignerSerializationVisibilityAttribute(System.ComponentModel.DesignerSerializationVisibility.Hidden)> _PublicOverridableProperty CacheTimeOut() As System.TimeSpanImplements CrystalDecisions.ReportSource.ICachedReport.CacheTimeOutGetReturnCachedReportConstants.DEFAULT_TIMEOUTEndGetSet'EndSetEndProperty
PublicOverridableFunction CreateReport() As CrystalDecisions.CrystalReports.Engine.ReportDocumentImplements CrystalDecisions.ReportSource.ICachedReport.CreateReportDim rpt Ascr_composite_sheet = Newcr_composite_sheet() rpt.Site = Me.SiteReturn rptEndFunction
PublicOverridableFunction GetCustomizedCacheKey(ByVal request AsRequestContext) AsStringImplements CrystalDecisions.ReportSource.ICachedReport.GetCustomizedCacheKeyDim key As[String] = Nothing'// The following is the code used to generate the default'// cache key for caching report jobs in the ASP.NET Cache.'// Feel free to modify this code to suit your needs.'// Returning key == null causes the default cache key to'// be generated.''key = RequestContext.BuildCompleteCacheKey(
128
' request,' null, // sReportFilename' this.GetType(),' this.ShareDBLogonInfo );Return keyEndFunctionEndClass
Form137
PublicClassForm137
PrivateSub Form137_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
EndSub
PrivateSub txtbox_search_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles txtbox_search.Click txtbox_search.Clear()EndSub
PrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged
EndSubEndClass
Master_list
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.Shared
PublicClassmasterlist
PrivateSub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.ClickDim dt AsNewDataTable
With dt .Columns.Add("Level") .Columns.Add("Section") .Columns.Add("Session") .Columns.Add("School_Year") .Columns.Add("Student") .Columns.Add("Gender") .Columns.Add("Adviser")EndWith
129
ForEach dr AsDataGridViewRowInMe.dgvReport.Rows dt.Rows.Add(dr.Cells("Level").Value, dr.Cells("Section").Value, dr.Cells("Session").Value, dr.Cells("School_year").Value, dr.Cells("Student").Value, dr.Cells("Gender").Value, dr.Cells("Adviser").Value)Next
Dim rd As CrystalDecisions.CrystalReports.Engine.ReportDocument rd = Newcr_masterlist'rd.SetDatabaseLogon("", "")'rd.DataSourceConnections(0).IntegratedSecurity = False rd.SetDataSource(dt)
masterlist_view.crv_masterlist.ReportSource = rd
masterlist_view.ShowDialog()masterlist_view.Dispose()
EndSub
PrivateSub masterlist_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no,CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level")EndSub
PrivateSub btn_generate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_generate.Click fillDataGridView(dgvReport, "SELECT dbo.[Level].Name AS [Level], dbo.Section.Name AS Section, dbo.Session.Name AS Session, CAST(year(Effectivity.Start_date) as varchar(50)) + ' - ' + CAST(year(Effectivity.End_date) as varchar(50)) as 'School_year', " _&" dbo.Student.Lname + ', ' + dbo.Student.Fname + ' ' + dbo.Student.Mname AS Student, dbo.Student.Gender, dbo.[User].Lname + ', ' + dbo.[User].Fname + ' ' + dbo.[User].Mname AS Adviser " _&" FROM dbo.Enrollment INNER JOIN " _&" dbo.Student ON dbo.Enrollment.Student_no = dbo.Student.Student_noINNER JOIN " _&" dbo.[Level] ON dbo.Enrollment.Level_no = dbo.[Level].Level_no INNER JOIN " _&" dbo.Session ON dbo.Enrollment.Session_no = dbo.Session.Session_noINNER JOIN " _&" dbo.Effectivity ON dbo.Enrollment.Effectivity_no = dbo.Effectivity.Effectivity_no INNER JOIN " _
130
&" dbo.Assign1 ON dbo.Enrollment.Enrollment_no = dbo.Assign1.Enrollment_no INNER JOIN " _&" dbo.Section ON dbo.[Level].Level_no = dbo.Section.Level_no INNER JOIN " _&" dbo.Assign2 ON dbo.Section.Section_no = dbo.Assign2.Section_no INNER JOIN " _&" dbo.[User] ON dbo.Assign2.User_no = dbo.[User].User_no " _&" WHERE Section.Section_no = Assign2.Section_no AND Session.Session_no = Assign2.Session_no AND Effectivity.Effectivity_no =Assign2.Effectivity_no AND Section.Section_no ='"& cmb_section.SelectedValue.ToString &"' AND Session.Session_no = '"& cmb_session.SelectedValue.ToString &"' AND Effectivity.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'")EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChanged fillComboBox(cmb_section, "Section", "Section_no", "Name", "SELECT * FROM Section WHERE Level_no ='"& cmb_level.SelectedValue.ToString &"'")
EndSub
PrivateSub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickMe.Close()
EndSub
EndClass
Masterlist_view
Imports CrystalDecisions.CrystalReports.EngineImports CrystalDecisions.Shared
PublicClassmasterlist_view
PrivateSub masterlist_view_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load'Dim rd As ReportDocument'rd = New cr_masterlist
'Me.crv_masterlist.ReportSource = rd''Me.crv_masterlist
EndSub
131
PrivateSub crv_masterlist_Load(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles crv_masterlist.Load
EndSubEndClass
Reports_options
PublicClassreports_optionsPrivateSub btn_composite_sheet_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_composite_sheet.Clickcomposite_sheet.ShowDialog()EndSub
PrivateSub btn_master_list_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_master_list.Clickmasterlist.ShowDialog()EndSub
PrivateSub btn_form137_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_form137.ClickForm137.ShowDialog()EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Manage_rooms
PublicClassmanage_rooms
PublicSub colorGrid()For i = 0 To dgvRoom.Rows.Count - 1If dgvRoom.Rows(i).Cells("Status").Value = "Inactive"Then dgvRoom.Rows(i).DefaultCellStyle.BackColor = Color.FirebrickElse dgvRoom.Rows(i).DefaultCellStyle.BackColor = SystemColors.WindowEndIfNextEndSub
132
PrivateSub refreshGrid() fillDataGridView(dgvRoom, "SELECT Room_no AS 'Room No.', Name AS' Room Name',Status FROM Room") colorGrid()EndSubPrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged fillDataGridView(dgvRoom, "SELECT Room_no AS 'Room No.', Name AS' Room Name',Status FROM Room where Room.Name like '%"& txtbox_search.Text &"%'")EndSubPrivateSub rooms_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load refreshGrid()EndSub
PublicSub enableOrDisableAll(ByVal pass AsBoolean) txtbox_name.Clear() txtbox_room_no.Clear() txtbox_search.Clear()EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_cancel.Enabled = True
txtbox_room_no.Clear() txtbox_name.Clear()
EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False
Try
IfMessageBox.Show("Do you really want to add this Subject on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("Insert into Room(Name,Status)"& _"values ('"& txtbox_name.Text &"','Active')") MsgBox("Record Successfully Added", MsgBoxStyle.Information) refreshGrid()
133
enableOrDisableAll(True)
Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit Sub
EndIf
Catch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_activate.Enabled = False btn_cancel.Enabled = True
TryIfMessageBox.Show("Do you really want to update this Room on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("Update Room set "& _" Name = '"& txtbox_name.Text &"'"& _" WHERE Room_no = '"& txtbox_room_no.Text &"'") MsgBox("Record Successfully Updated", MsgBoxStyle.Information)Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit SubEndIfCatch ex AsException MsgBox(ex.Message)EndTry
refreshGrid() enableOrDisableAll(True)EndSub
PrivateSub btn_activate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_activate.Click btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False add_edit_delete("UPDATE [Room] SET Status = 'Active' WHERE Room_no='"& txtbox_room_no.Text &"'") refreshGrid()
EndSub
134
PrivateSub btn_deactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_deactivate.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False add_edit_delete("UPDATE [Room] SET Status = 'Inactive' WHERE Room_no='"& txtbox_room_no.Text &"'") refreshGrid()EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = FalseEndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
PrivateSub dgvRoom_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvRoom.CellClick btn_update.Enabled = True btn_deactivate.Enabled = True btn_activate.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If dgvRoom.CurrentRow.Cells("Status").Value = "Active"Then btn_deactivate.Enabled = True btn_activate.Enabled = FalseElse btn_deactivate.Enabled = False btn_activate.Enabled = TrueEndIf
If (dgvRoom.SelectedRows.Count > 0) Then txtbox_room_no.Text = dgvRoom.SelectedRows(0).Cells(0).Value.ToString() txtbox_name.Text = dgvRoom.SelectedRows(0).Cells(1).Value.ToString()EndIf
EndSub
EndClass
135
Rooms_options
PublicClassrooms_options
PrivateSub btn_manage_rooms_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles btn_manage_rooms.Clickmanage_rooms.ShowDialog()
EndSub
PrivateSub btn_room_monitoring_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_room_monitoring.Click
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Adviser_assignment
PublicClassadviser_assignment
PrivateSub refreshGrid() fillDataGridView(dgvAssign2, "SELECT [User].User_no, [User].Lname + ',' + [User].Fname + ' ' + [User].Mname as 'Teacher Name', Session.Name AS 'Session', Effectivity.School_year AS 'School Year' "& _"FROM Assign2 INNER JOIN"& _" [User] ON Assign2.User_no = [User].User_no INNER JOIN "& _" Section ON Assign2.Section_no = Section.Section_no INNER JOIN"& _" Session ON Assign2.Session_no = Session.Session_no INNER JOIN "& _" Effectivity ON Assign2.Effectivity_no = Effectivity.Effectivity_no ")
EndSubPrivateSub adviser_assignment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") refreshGrid()EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChanged
136
fillComboBox(cmb_section, "Section", "Section_no", "Name", "SELECT * FROM Section WHERE Level_no ='"& cmb_level.SelectedValue.ToString &"'") fillComboBox(cmb_teacher, "Teacher", "User_no", "Name", "SELECT [User].User_no, [User].Lname + ',' + [User].Fname + ' ' + [User].Mname as 'Name' FROM [User] INNER JOIN [Type] ON [User].Type_no = [Type].Type_no WHERE [User].Type_no = '5' AND [User].Level_no ='"& cmb_level.SelectedValue.ToString &"'") ' & cmb_level.SelectedValue.ToString & "'") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC")
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_add.Enabled = True btn_cancel.Enabled = True btn_new.Enabled = False fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level")EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_add.Enabled = False btn_new.Enabled = True btn_update.Enabled = False btn_cancel.Enabled = FalseEndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_cancel.Enabled = False btn_add.Enabled = False
Try
IfMessageBox.Show("Do you really want to add this Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
137
add_edit_delete("Insert into [Assign2](User_no,Section_no,Session_no,Effectivity_no)"& _"values ("&"'"& cmb_teacher.SelectedValue.ToString &"',"& _"'"& cmb_section.SelectedValue.ToString &"',"& _"'"& cmb_session.SelectedValue.ToString &"',"& _"'"& cmb_effectivity.SelectedValue.ToString &"')") MsgBox("Record Successfully Added", MsgBoxStyle.Information) refreshGrid()Else
MsgBox("Action Cancelled", MsgBoxStyle.Information)
EndIf
Catch ex AsException MsgBox(ex.Message)EndTry
EndSubEndClass
Manual_sectioning
PublicClassmanual_sectioning
PrivateSub btn_assign_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_assign.ClickTry add_edit_delete("INSERT INTO Assign1(Enrollment_no,Section_no) VALUES('"& dgvStud.CurrentRow.Cells(0).Value.ToString &"','"& dgvSection.CurrentRow.Cells(0).Value.ToString &"')") fillDataGridView(dgvSection, "SELECT Section.Section_no,Section.Name, [Level].Name AS 'Grade Level' FROM Section INNER JOIN [Level] ON Section.Level_no = [Level].Level_no where Section.Level_no ='"& cmb_level.SelectedValue.ToString &"' AND Section.Type = 'Regular'") fillDataGridView(dgvStud, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ON
138
Enrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") countGender()Catch ex AsException
EndTryEndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub manual_sectioning_Load(ByVal sender As System.Object, ByVal eAs System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session")
Try fillDataGridView(dgvSection, "SELECT Section.Section_no,Section.Name, [Level].Name AS 'Grade Level',Section.Type FROM Section INNER JOIN [Level] ON Section.Level_no = [Level].Level_no where Section.Level_no ='"& cmb_level.SelectedValue.ToString &"'") fillDataGridView(dgvStud, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")
139
countGender()Catch ex AsException
EndTry
EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChangedTry fillDataGridView(dgvSection, "SELECT Section.Section_no,Section.Name, [Level].Name AS 'Grade Level',Section.Type FROM Section INNER JOIN [Level] ON Section.Level_no = [Level].Level_no where Section.Level_no ='"& cmb_level.SelectedValue.ToString &"'") fillDataGridView(dgvStud, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"&cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") countGender()Catch ex AsException
EndTryEndSub
PrivateSub dgvSection_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSection.CellClick fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ON Enrollment.Student_no = Student.Student_no Where Section.Section_no = '"&dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")
140
countGender()EndSub
PrivateSub cmb_effectivity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_effectivity.SelectedIndexChangedTry fillDataGridView(dgvSection, "SELECT Section.Section_no,Section.Name, [Level].Name AS 'Grade Level' FROM Section INNER JOIN [Level] ON Section.Level_no = [Level].Level_no where Section.Level_no ='"& cmb_level.SelectedValue.ToString &"' AND Section.Type = 'Regular'") fillDataGridView(dgvStud, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") countGender()Catch ex AsException
EndTryEndSub
PublicSub countGender()Dim count AsInteger = 0Dim maleCount AsInteger = 0Dim femaleCount AsInteger = 0
If dgvESPS.RowCount > 0 ThenWhile count < dgvESPS.RowCountIf dgvESPS.Rows(count).Cells("Gender").Value = "Male"Then'error maleCount += 1Else femaleCount += 1EndIf
count += 1EndWhileEndIf
141
Label6.Text = "Male: " + maleCount.ToString Label7.Text = "Female: " + femaleCount.ToStringEndSub
PrivateSub cmb_session_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_session.SelectedIndexChangedTry fillDataGridView(dgvSection, "SELECT Section.Section_no,Section.Name, [Level].Name AS 'Grade Level' FROM Section INNER JOIN [Level] ON Section.Level_no = [Level].Level_no where Section.Level_no ='"& cmb_level.SelectedValue.ToString &"' AND Section.Type = 'Regular'") fillDataGridView(dgvStud, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvESPS, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") countGender()Catch ex AsException
EndTryEndSubEndClass
Random_sectioning
PublicClassrandom_sectioning
PrivateSub btn_generate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_generate.Click
randomSection(cmb_level.SelectedValue.ToString, cmb_session.SelectedValue.ToString, cmb_effectivity.SelectedValue.ToString)
142
Try fillDataGridView(dgvStud, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'") fillDataGridView(dgvAllStudents, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")Catch ex AsException
EndTry
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub random_sectioning_Load(ByVal sender As System.Object, ByVal eAs System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level")EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChangedTry fillDataGridView(dgvSection, "SELECT * FROM Section WHERE Level_no = "& cmb_level.SelectedValue.ToString &" AND Type = 'Regular'") fillDataGridView(dgvAllStudents, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON
143
Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSub
PrivateSub cmb_session_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_session.SelectedIndexChangedTry fillDataGridView(dgvAllStudents, "SELECT Enrollment.Enrollment_no , Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSub
PrivateSub cmb_effectivity_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_effectivity.SelectedIndexChangedTry fillDataGridView(dgvAllStudents, "SELECT Enrollment.Enrollment_no, Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Enrollment INNER JOIN Student ON Enrollment.Student_no = Student.Student_no LEFT JOIN Assign1 ON Assign1.Enrollment_no = Enrollment.Enrollment_no Where Assign1.Assign1_no IS NULL AND Enrollment.Level_no='"& cmb_level.SelectedValue.ToString &"' AND Enrollment.Effectivity_no ='"& cmb_effectivity.SelectedValue.ToString &"'AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSub
144
PrivateSub dgvSection_CellClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSection.CellClickTry fillDataGridView(dgvStud, "SELECT Student.Fname, Student.Mname, Student.Lname, Student.Gender FROM Assign1 INNER JOIN Enrollment ON Assign1.Enrollment_no = Enrollment.Enrollment_no INNER JOIN [Level] ON Enrollment.Level_no = [Level].Level_no INNER JOIN Section ON Assign1.Section_no = Section.Section_no INNER JOIN Student ONEnrollment.Student_no = Student.Student_no Where Section.Section_no = '"& dgvSection.CurrentRow.Cells(0).Value &"' AND Enrollment.Effectivity_no = '"& cmb_effectivity.SelectedValue.ToString &"' AND Enrollment.Session_no = '"& cmb_session.SelectedValue.ToString &"'")Catch ex AsException
EndTryEndSubEndClass
Sections_form
PublicClasssections_form
PublicSub colorGrid()For i = 0 To dgvSection.Rows.Count - 1If dgvSection.Rows(i).Cells("Status").Value = "Inactive"Then dgvSection.Rows(i).DefaultCellStyle.BackColor = Color.FirebrickElse dgvSection.Rows(i).DefaultCellStyle.BackColor = SystemColors.WindowEndIfNextEndSub
PrivateSub refreshGrid() fillDataGridView(dgvSection, "SELECT Section.Section_no as 'Section Number' , Section.Name AS 'Section Name', Level.Name as 'Grade Level', Section.Type, Section.Status FROM Section INNER JOIN Level ON Section.Level_no = Level.Level_no") colorGrid()EndSub
145
PublicSub enableOrDisableAll(ByVal pass AsBoolean) txtbox_search.Clear() txtbox_section_name.Clear() txtbox_section_number.Clear() cmb_level.SelectedIndex = 0 cmb_type.SelectedIndex = 0EndSub
PrivateSub sections_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") refreshGrid()EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_cancel.Enabled = True enableOrDisableAll(True)
EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False
Try
IfMessageBox.Show("Do you really want to add this Section on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Insert into Section(Name,Type,Status,Level_no)"& _"values ("&"'"& txtbox_section_name.Text &"',"& _"'"& cmb_type.Text &"',"& _"'Active',"& _"'"& cmb_level.SelectedValue &"')") refreshGrid() MsgBox("Record Successfully Added", MsgBoxStyle.Information)Else
146
MsgBox("Action Cancelled", MsgBoxStyle.Information) Reset()Exit SubEndIf
Catch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_activate.Enabled = False btn_cancel.Enabled = True
TryIfMessageBox.Show("Do you really want to update this Section on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Update Section set "& _" Name = '"& txtbox_section_name.Text &"',"& _" Type = '"& cmb_type.Text &"',"& _" Level_no = '"& cmb_level.SelectedValue() &"'"& _" WHERE Section_no = '"& txtbox_section_number.Text &"'")
MsgBox("Record Successfully Updated", MsgBoxStyle.Information) refreshGrid()
Else
MsgBox("Action Cancelled", MsgBoxStyle.Information)
Exit Sub
EndIf
Catch ex AsException MsgBox(ex.Message)EndTry
EndSub
PrivateSub btn_activate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_activate.Click
147
btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False add_edit_delete("UPDATE Section SET Status = 'Active' WHERE Section_no='"& txtbox_section_number.Text &"'") refreshGrid()EndSub
PrivateSub btn_deactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_deactivate.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False add_edit_delete("UPDATE Section SET Status = 'Inactive' WHERE Section_no='"& txtbox_section_number.Text &"'") refreshGrid()EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False btn_deactivate.Enabled = False btn_add.Enabled = False btn_cancel.Enabled = FalseEndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
PrivateSub dgvSection_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSection.CellClick
btn_update.Enabled = True btn_deactivate.Enabled = True btn_activate.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If dgvSection.CurrentRow.Cells("Status").Value = "Active"Then btn_deactivate.Enabled = True btn_activate.Enabled = FalseElse btn_deactivate.Enabled = False btn_activate.Enabled = TrueEndIf
148
If (dgvSection.SelectedRows.Count > 0) Then txtbox_section_number.Text = dgvSection.SelectedRows(0).Cells(0).Value.ToString() txtbox_section_name.Text = dgvSection.SelectedRows(0).Cells(1).Value.ToString() cmb_level.Text = dgvSection.SelectedRows(0).Cells(2).Value.ToString() cmb_type.Text = dgvSection.SelectedRows(0).Cells(3).Value.ToString()
EndIfEndSub
PrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged fillDataGridView(dgvSection, "SELECT Section.Section_no as 'Section Number' , Section.Name , Level.Name as 'Grade Level', Section.Type FROM Section INNER JOIN Level ON Section.Level_no = Level.Level_no, Section.Status where Section.Name like '%"& txtbox_search.Text &"%'")EndSub
EndClass
Sections_options
PublicClasssections_options
PrivateSub btn_ms_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ms.Clicksections_form.ShowDialog()
EndSub
PrivateSub btn_sa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_sa.Clicksubject_assignment.ShowDialog()
EndSub
PrivateSub btn_ms2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_ms2.Clickmanual_sectioning.ShowDialog()
149
EndSub
PrivateSub btn_rs_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_rs.Clickrandom_sectioning.ShowDialog()
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub sections_options_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load
EndSubPrivateSub btn_aa_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_aa.MouseEnter btn_aa.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_aa_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_aa.MouseLeave btn_aa.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_ms_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_ms.MouseEnter btn_ms.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_ms_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_ms.MouseLeave btn_ms.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_sa_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_sa.MouseEnter btn_sa.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_sa_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_sa.MouseLeave btn_sa.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_ms2_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_ms2.MouseEnter btn_ms2.BackgroundImage = My.Resources.btn_hoverEndSub
150
PrivateSub btn_ms2_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_ms2.MouseLeave btn_ms2.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_rs_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_rs.MouseEnter btn_rs.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_rs_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_rs.MouseLeave btn_rs.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_close_MouseEnter(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_close.MouseEnter btn_close.BackgroundImage = My.Resources.btn_hoverEndSub
PrivateSub btn_close_MouseLeave(ByVal sender AsObject, ByVal e As System.EventArgs) Handles btn_close.MouseLeave btn_close.BackgroundImage = My.Resources.btnEndSub
PrivateSub btn_aa_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_aa.Clickadviser_assignment.ShowDialog()
EndSub
EndClass
Subject_assignment
PublicClasssubject_assignment
PrivateSub refreshGrid() fillDataGridView(dgvSet, "SELECT [Set].Set_no, Subject.Name, Section.Name AS Section, Room.Name AS 'Room Name', [User].Lname + ' ' + ',' + [User].Fname + ' ' + [User].Mname AS 'Teacher Name', "& _"Effectivity.School_year, Session.Name AS 'Session'"& _"FROM [Set] INNER JOIN "& _"Subject ON [Set].Subject_no = Subject.Subject_no INNER JOIN "& _"Section ON [Set].Section_no = Section.Section_no INNER JOIN "& _"Room ON [Set].Room_no = Room.Room_no INNER JOIN "& _"[User] ON [Set].User_no = [User].User_no INNER JOIN "& _
151
"Session ON [Set].Session_no = Session.Session_no INNER JOIN "& _"Effectivity ON [Set].Effectivity_no = Effectivity.Effectivity_no")
EndSub
PrivateSub subject_assignment_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load refreshGrid() fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level")
EndSub
PrivateSub dgvSet_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSet.CellClick
btn_update.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If (dgvSet.SelectedRows.Count > 0) Then'cmb_subject.Text = dgvSet.SelectedRows(0).Cells("Subject").Value.ToString()'cmb_section.Text = dgvSet.SelectedRows(0).Cells("Section").Value.ToString()'cmb_room.Text = dgvSet.SelectedRows(0).Cells("Room Name").Value.ToString()'cmb_level.Text = dgvSet.SelectedRows(0).Cells("Grade Level").Value.ToString()'cmb_teacher.Text = dgvSet.SelectedRows(0).Cells("Teacher").Value.ToString()'cmb_session.Text = dgvSet.SelectedRows(0).Cells("Session").Value.ToString()'cmb_effectivity.Text = dgvSet.SelectedRows(0).Cells("School Year").Value.ToString()EndIf
EndSub
PrivateSub cmb_level_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_level.SelectedIndexChanged fillComboBox(cmb_section, "Section", "Section_no", "Name", "SELECT * FROM Section WHERE Level_no ='"& cmb_level.SelectedValue.ToString &"'") fillComboBox(cmb_subject, "Subject", "Subject_no", "Name", "SELECT * FROM Subject WHERE Level_no ='"& cmb_level.SelectedValue.ToString &"'")
152
fillComboBox(cmb_room, "Room", "Room_no", "Name", "SELECT * FROMRoom") fillComboBox(cmb_teacher, "Teacher", "User_no", "Name", "SELECT [User].User_no, [User].Lname + ',' + [User].Fname + ' ' + [User].Mname as 'Name' FROM [User] INNER JOIN [Type] ON [User].Type_no = [Type].Type_no WHERE [User].Type_no = '5' AND [User].Level_no ='"& cmb_level.SelectedValue.ToString &"'") ' & cmb_level.SelectedValue.ToString & "'") fillComboBox(cmb_session, "Session", "Session_no", "Name", "SELECT * FROM Session") fillComboBox(cmb_effectivity, "Effectivity", "Effectivity_no", "School_year", "SELECT Effectivity_no, CAST(year(Start_date) as varchar(50)) + ' - ' + CAST(year(End_date) as varchar(50)) as 'School_year' FROM Effectivity ORDER BY Effectivity_no DESC")EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_cancel.Enabled = False btn_add.Enabled = False
Try
IfMessageBox.Show("Do you really want to add this Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("Insert into [Set](Section_no,Subject_no,Room_no,User_no,Session_no,Effectivity_no)"& _"values ("&"'"& cmb_section.SelectedValue.ToString &"',"& _"'"& cmb_subject.SelectedValue.ToString &"',"& _"'"& cmb_room.SelectedValue.ToString &"',"& _"'"& cmb_teacher.SelectedValue.ToString &"',"& _"'"& cmb_session.SelectedValue.ToString &"',"& _"'"& cmb_effectivity.SelectedValue.ToString &"')") MsgBox("Record Successfully Added", MsgBoxStyle.Information) refreshGrid()Else
MsgBox("Action Cancelled", MsgBoxStyle.Information)
EndIf
Catch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click
EndSub
153
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_add.Enabled = True btn_cancel.Enabled = True btn_new.Enabled = FalseEndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_add.Enabled = False btn_new.Enabled = True btn_update.Enabled = False btn_cancel.Enabled = False
EndSub
PrivateSub GroupBox2_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)
EndSubEndClass
Birth_certificate_form
PublicClassbirth_certificate_form
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSubEndClass
Manage_students
PublicClassmanage_students
PrivateConst CS_DROPSHADOW AsInteger = 131072ProtectedOverridesReadOnlyProperty CreateParams() As System.Windows.Forms.CreateParamsGetDim cp AsCreateParams = MyBase.CreateParams
154
cp.ClassStyle = cp.ClassStyle Or CS_DROPSHADOWReturn cpEndGetEndProperty
PrivateSub refreshGrid() fillDataGridView(dgvStudents, "SELECT Distinct Student.Student_no as 'Control Number',Lrn as 'Learning Reference Number',Lname as 'Last Name', Fname as 'First Name', Mname as 'Middle Name', Gender as 'Gender',Date_of_Birth as 'Date of Birth',Place_of_birth as 'Place of Birth', DPDE_birth_certificate as 'Birth Certificate', tribe as 'Tribe', religion as 'Religion',address as'Address',PICE_last_name as 'Parent/Guardian Last Name', PICE_first_nameas 'Parent/Guardian First Name', PICE_mid_name as 'Parent/Guardian Middle Name', PICE_relation as 'Relationship', PICE_contact as 'Contact Number', PICE_address as 'Parent/Guardian Address', PICE_occupation as 'Parent/Guardian Occupation', DPDE_others as 'Other Presented During Enrolment',Status FROM Student LEFT JOIN Enrollment ON Student.Student_no = Enrollment.Student_no ") colorGrid()EndSub
PrivateSub btn_browse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_browse.ClickIf OpenFileDialog1.ShowDialog() = DialogResult.OK Then txt_BC.Text = OpenFileDialog1.FileNameEndIfEndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_cancel.Enabled = True btn_browse.Enabled = True btn_view.Enabled = True enableOrDisableAll(True)EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False btn_browse.Enabled = False btn_view.Enabled = False
Try
If (txtbox_lname.Text = ""Or txtbox_fname.Text = ""Or txtbox_mname.Text = ""Or cmb_gender.Text = ""Or dtp_date_of_birth.Text = ""Or
155
txtbox_place_of_birth.Text = ""Or txtbox_address.Text = ""Or cmb_tribe.Text = ""Or cmb_religion.Text = ""Or txtbox_guardian_lname.Text = ""Or txtbox_guardian_fname.Text = ""Or txtbox_guardian_mname.Text = ""Or cmb_relationship.Text = ""Or txtbox_contact_number.Text = ""Or txtbox_guardian_address.Text = ""Or cmb_guardian_occupation.Text = "") Then MsgBox("Please fill up all the fields", MsgBoxStyle.Information)Exit SubEndIf
Dim birth_certificate AsString = txt_BC.Text
If birth_certificate = ""ThenElse
My.Computer.FileSystem.CopyFile(birth_certificate, "C:\Upload\"& OpenFileDialog1.SafeFileName)EndIf
Dim religion AsStringDim tribe AsStringDim other_occupation AsString
If (cmb_tribe.Text = "Others") Then tribe = txt_other_tribe.TextElse tribe = cmb_tribe.TextEndIf
If (cmb_religion.Text = "Others") Then religion = txt_other_religion.TextElse religion = cmb_religion.TextEndIf
If (cmb_guardian_occupation.Text = "Others") Then other_occupation = txt_other_guardian_occupation.TextElse other_occupation = cmb_guardian_occupation.TextEndIf
IfMessageBox.Show("Do you really want to add this Student on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
156
add_edit_delete("INSERT INTO Student(Lrn,Fname, Mname, Lname, Gender, Date_of_Birth, Place_of_birth, Tribe, Religion, PICE_first_name, Address, PICE_last_name, PICE_mid_name,"& _" PICE_relation, PICE_contact, PICE_address, PICE_occupation, DPDE_birth_certificate,DPDE_others)"& _"values ("&"'"& txtbox_lrn.Text &"',"& _"'"& txtbox_fname.Text &"',"& _"'"& txtbox_mname.Text &"',"& _"'"& txtbox_lname.Text &"',"& _"'"& cmb_gender.Text &"',"& _"'"& dtp_date_of_birth.Text &"',"& _"'"& txtbox_place_of_birth.Text &"',"& _"'"& tribe &"',"& _"'"& religion &"',"& _"'"& txtbox_guardian_fname.Text &"',"& _"'"& txtbox_address.Text &"',"& _"'"& txtbox_guardian_lname.Text &"',"& _"'"& txtbox_guardian_mname.Text &"',"& _"'"& cmb_relationship.Text &"',"& _"'"& txtbox_contact_number.Text &"',"& _"'"& txtbox_guardian_address.Text &"',"& _"'"& other_occupation &"',"& _"'"& txt_BC.Text &"',"& _"'"& txtbox_other_presented.Text &"')") MsgBox("Record Successfully Added", MsgBoxStyle.Information) refreshGrid() enableOrDisableAll(False)
Else
MsgBox("Action Cancelled", MsgBoxStyle.Information)
EndIf
Catch ex AsException MsgBox(ex.Message)EndTry
EndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_browse.Enabled = False btn_view.Enabled = False
Dim religion AsString
157
Dim tribe AsStringDim other_occupation AsString
If (cmb_tribe.Text = "Others") Then tribe = txt_other_tribe.TextElse tribe = cmb_tribe.TextEndIf
If (cmb_religion.Text = "Others") Then religion = txt_other_religion.TextElse religion = cmb_religion.TextEndIf
If (cmb_guardian_occupation.Text = "Others") Then other_occupation = txt_other_guardian_occupation.TextElse other_occupation = cmb_guardian_occupation.TextEndIf
TryIfMessageBox.Show("Do you really want to update this Student on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Update Student set "& _"Lrn = '"& txtbox_lrn.Text &"',"& _"Lname = '"& txtbox_lname.Text &"',"& _"Fname = '"& txtbox_fname.Text &"',"& _"Mname = '"& txtbox_mname.Text &"',"& _" Gender = '"& cmb_gender.Text &"',"& _" Date_of_Birth = '"& dtp_date_of_birth.Text &"',"& _" Place_of_Birth = '"& txtbox_place_of_birth.Text &"',"& _" Tribe = '"& tribe &"',"& _" Religion = '"& religion &"',"& _" Address = '"& txtbox_address.Text &"',"& _" PICE_last_name = '"& txtbox_guardian_lname.Text &"',"& _" PICE_first_name = '"& txtbox_guardian_fname.Text &"',"& _" PICE_mid_name = '"& txtbox_guardian_mname.Text &"',"& _" PICE_contact = '"& txtbox_contact_number.Text &"',"& _" PICE_relation = '"& cmb_relationship.Text &"',"& _" PICE_address = '"& txtbox_guardian_address.Text &"',"& _" PICE_occupation = '"& other_occupation &"',"& _" DPDE_others = '"& txtbox_other_presented.Text &"'"& _" WHERE Student_no = '"& txtbox_student_no.Text &"'")
MsgBox("Record Successfully Updated", MsgBoxStyle.Information)
158
refreshGrid() enableOrDisableAll(False)
Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit SubEndIfCatch ex AsException MsgBox(ex.Message)EndTry
EndSub
PrivateSub btn_activate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_activate.Click btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False add_edit_delete("UPDATE Student SET Status = 'Active' WHERE Student_no='"& txtbox_student_no.Text &"'") refreshGrid()EndSub
PrivateSub btn_deactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_deactivate.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False add_edit_delete("UPDATE Student SET Status = 'Inactive' WHERE Student_no='"& txtbox_student_no.Text &"'") refreshGrid()EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False btn_browse.Enabled = False btn_view.Enabled = False enableOrDisableAll(False)
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
159
PrivateSub students_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load txtbox_search.Text = "Search Student Name" refreshGrid() enableOrDisableAll(True)
EndSub
PublicSub colorGrid()For i = 0 To dgvStudents.Rows.Count - 1If dgvStudents.Rows(i).Cells("Status").Value = "Inactive"Then dgvStudents.Rows(i).DefaultCellStyle.BackColor = Color.FirebrickElse dgvStudents.Rows(i).DefaultCellStyle.BackColor = SystemColors.WindowEndIfNextEndSub
PrivateSub cmb_tribe_SelectedIndexChanged(ByVal sender As System.Object,ByVal e As System.EventArgs) Handles cmb_tribe.SelectedIndexChangedIf cmb_tribe.SelectedIndex < cmb_tribe.Items.Count - 1 Then txt_other_tribe.Enabled = False txt_other_tribe.Clear()Else txt_other_tribe.Enabled = TrueEndIfEndSub
PrivateSub cmb_religion_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_religion.SelectedIndexChangedIf cmb_religion.SelectedIndex < cmb_religion.Items.Count - 1 Then txt_other_religion.Enabled = False txt_other_religion.Clear()Else txt_other_religion.Enabled = TrueEndIfEndSub
PrivateSub cmb_guardian_occupation_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmb_guardian_occupation.SelectedIndexChangedIf cmb_guardian_occupation.SelectedIndex < cmb_guardian_occupation.Items.Count - 1 Then txt_other_guardian_occupation.Enabled = False txt_other_guardian_occupation.Clear()Else txt_other_guardian_occupation.Enabled = True
160
EndIfEndSub
PublicSub enableOrDisableAll(ByVal pass AsBoolean) txtbox_lname.Clear() txtbox_fname.Clear() txtbox_mname.Clear()'dtp_date_of_birth.clear()'cmb_gender.clear() txtbox_place_of_birth.Clear()'cmb_tribe.clear() txt_other_tribe.Clear()'cmb_religion.clear() txt_other_religion.Clear() txtbox_address.Clear() txtbox_guardian_lname.Clear() txtbox_guardian_fname.Clear() txtbox_guardian_mname.Clear()'cmb_relationship.clear() txtbox_contact_number.Clear() txtbox_guardian_address.Clear()'cmb_guardian_occupation.clear() txt_other_guardian_occupation.Clear() txt_BC.Clear() txtbox_other_presented.Clear()
txtbox_lname.Enabled = pass txtbox_fname.Enabled = pass txtbox_mname.Enabled = pass dtp_date_of_birth.Enabled = pass cmb_gender.Enabled = pass txtbox_place_of_birth.Enabled = pass cmb_tribe.Enabled = pass txt_other_tribe.Enabled = pass cmb_religion.Enabled = pass txt_other_religion.Enabled = pass txtbox_address.Enabled = pass txtbox_guardian_lname.Enabled = pass txtbox_guardian_fname.Enabled = pass txtbox_guardian_mname.Enabled = pass cmb_relationship.Enabled = pass txtbox_contact_number.Enabled = pass txtbox_guardian_address.Enabled = pass cmb_guardian_occupation.Enabled = pass txt_other_guardian_occupation.Enabled = pass txt_BC.Enabled = pass txtbox_other_presented.Enabled = pass btn_browse.Enabled = passEndSub
PrivateSub txtbox_search_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles txtbox_search.Click
161
txtbox_search.Clear() refreshGrid()
EndSub
PrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged colorGrid() fillDataGridView(dgvStudents, "SELECT Distinct Student.Student_no as 'Control Number',Lrn as 'Learning Reference Number',Lname as 'Last Name', Fname as 'First Name', Mname as 'Middle Name', Gender as 'Gender',Date_of_Birth as 'Date of Birth',Place_of_birth as 'Place of Birth', DPDE_birth_certificate as 'Birth Certificate',Date_of_Birth as 'Date of Birth', place_of_birth as 'Place of Birth', tribe as 'Tribe', religion as 'Religion',address as 'Address',PICE_last_name as 'Parent/Guardian Last Name', PICE_first_nameas 'Parent/Guardian First Name', PICE_mid_name as 'Parent/Guardian Middle Name', PICE_relation as 'Relationship', PICE_contact as 'Contact Number', PICE_address as 'Parent/Guardian Address', PICE_occupation as 'Parent/Guardian Occupation', DPDE_others as 'Other Presented During Enrolment', Student.Status FROM Student LEFT JOIN Enrollment ON Student.Student_no = Enrollment.Student_no WHERE Enrollment.Enrollment_no IS NULL AND Student.Lname like '%"& txtbox_search.Text &"%'")
EndSub
PrivateSub btn_view_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_view.ClickWith birth_certificate_form .PictureBox1.ImageLocation = txt_BC.Text '"C:\Users\RodericaDeguitos\Desktop\A\" & OpenFileDialog1.SafeFileName
.PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage .ShowDialog()EndWith
EndSub
PrivateSub dgvStudents_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvStudents.CellClick btn_browse.Enabled = True btn_view.Enabled = True colorGrid()
enableOrDisableAll(True) btn_update.Enabled = True btn_deactivate.Enabled = True btn_activate.Enabled = True btn_add.Enabled = False
162
btn_cancel.Enabled = True btn_new.Enabled = False
If dgvStudents.CurrentRow.Cells("Status").Value = "Active"Then btn_deactivate.Enabled = True btn_activate.Enabled = FalseElse btn_deactivate.Enabled = False btn_activate.Enabled = TrueEndIfIf (dgvStudents.SelectedRows.Count > 0) Then
txtbox_student_no.Text = dgvStudents.SelectedRows(0).Cells("Control Number").Value.ToString() txtbox_lrn.Text = dgvStudents.SelectedRows(0).Cells("Learning Reference Number").Value.ToString() txtbox_lname.Text = dgvStudents.SelectedRows(0).Cells("Last Name").Value.ToString() txtbox_fname.Text = dgvStudents.SelectedRows(0).Cells("FirstName").Value.ToString() txtbox_mname.Text = dgvStudents.SelectedRows(0).Cells("Middle Name").Value.ToString() cmb_gender.Text = dgvStudents.SelectedRows(0).Cells("Gender").Value.ToString() dtp_date_of_birth.Text = dgvStudents.SelectedRows(0).Cells("Date of Birth").Value.ToString() txtbox_place_of_birth.Text = dgvStudents.SelectedRows(0).Cells("Place of Birth").Value.ToString() cmb_tribe.Text = dgvStudents.SelectedRows(0).Cells("Tribe").Value.ToString() cmb_religion.Text = dgvStudents.SelectedRows(0).Cells("Religion").Value.ToString() txtbox_address.Text = dgvStudents.SelectedRows(0).Cells("Address").Value.ToString() txtbox_guardian_lname.Text = dgvStudents.SelectedRows(0).Cells("Parent/Guardian Last Name").Value.ToString() txtbox_guardian_fname.Text = dgvStudents.SelectedRows(0).Cells("Parent/Guardian First Name").Value.ToString() txtbox_guardian_mname.Text = dgvStudents.SelectedRows(0).Cells("Parent/Guardian Middle Name").Value.ToString() cmb_relationship.Text = dgvStudents.SelectedRows(0).Cells("Relationship").Value.ToString() txtbox_contact_number.Text = dgvStudents.SelectedRows(0).Cells("Contact Number").Value.ToString() txtbox_guardian_address.Text = dgvStudents.SelectedRows(0).Cells("Parent/Guardian Address").Value.ToString()
163
cmb_guardian_occupation.Text = dgvStudents.SelectedRows(0).Cells("Parent/Guardian Occupation").Value.ToString() txtbox_other_presented.Text = dgvStudents.SelectedRows(0).Cells("Other Presented During Enrolment").Value.ToString() txt_BC.Text = dgvStudents.SelectedRows(0).Cells("Birth Certificate").Value.ToString()
EndIf
EndSub
PrivateSub txtbox_contact_number_KeyPress(ByVal sender AsObject, ByVal eAs System.Windows.Forms.KeyPressEventArgs) Handles txtbox_contact_number.KeyPressIf e.KeyChar = Chr(&H8) Or IsNumeric(e.KeyChar) Or Val(txtbox_contact_number.Text) > 99 Then e.Handled = FalseEndIfEndSub
PrivateSub dgvStudents_ColumnHeaderMouseClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles dgvStudents.ColumnHeaderMouseClick colorGrid()EndSub
PrivateSub txtbox_lrn_KeyPress(ByVal sender AsObject, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtbox_lrn.KeyPressIf e.KeyChar = Chr(&H8) Or IsNumeric(e.KeyChar) Or Val(txtbox_lrn.Text) > 99 Then e.Handled = FalseEndIfEndSub
EndClass
Students_options
PublicClassstudents_options
PrivateSub btn_manage_students_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_manage_students.Clickmanage_students.ShowDialog()
EndSub
164
PrivateSub btn_student_monitoring_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_student_monitoring.Click
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
Subjects_form
PublicClasssubjects_form
PrivateConst CS_DROPSHADOW AsInteger = 131072ProtectedOverridesReadOnlyProperty CreateParams() As System.Windows.Forms.CreateParamsGetDim cp AsCreateParams = MyBase.CreateParams cp.ClassStyle = cp.ClassStyle Or CS_DROPSHADOWReturn cpEndGetEndProperty
PrivateSub refreshGrid() fillDataGridView(dgvSubject, "SELECT Subject.Subject_no as 'Subject Number', Subject.Name as'Name', Level.Name as'Grade Level', Subject.Description as 'Description', Subject.Status FROM Subject INNER JOIN Level ON Subject.Level_no = Level.Level_no") colorGrid()EndSub
PublicSub enableOrDisableAll(ByVal pass AsBoolean)
cmb_level.SelectedIndex = 0 txtbox_search.Clear() txtbox_sub_description.Clear() txtbox_sub_id.Clear() txtbox_sub_name.Clear()
txtbox_sub_description.Enabled = pass txtbox_sub_name.Enabled = pass
EndSub
PublicSub colorGrid()For i = 0 To dgvSubject.Rows.Count - 1If dgvSubject.Rows(i).Cells("Status").Value = "Inactive"Then
165
dgvSubject.Rows(i).DefaultCellStyle.BackColor = Color.FirebrickElse dgvSubject.Rows(i).DefaultCellStyle.BackColor = SystemColors.WindowEndIfNextEndSub
PrivateSub subjects_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load refreshGrid() fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") btn_activate.Enabled = False colorGrid()
EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False btn_deactivate.Enabled = False btn_cancel.Enabled = True enableOrDisableAll(True)
EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False
Try
If txtbox_sub_name.Text = ""Or txtbox_sub_description.Text = ""Or cmb_level.Text = ""ThenMessageBox.Show("All fields Are Required", "Information", MessageBoxButtons.OK, MessageBoxIcon.Stop)Else
166
IfMessageBox.Show("Do you really want to add this Subject on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("INSERT INTO Subject(Name,Description,Status,Level_no)"& _"values ("&"'"& txtbox_sub_name.Text &"',"& _"'"& txtbox_sub_description.Text &"',"& _"'Active',"& _"'"& cmb_level.SelectedValue &"')") refreshGrid()
MsgBox("Record Successfully Added", MsgBoxStyle.Information) enableOrDisableAll(False)
Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit Sub
EndIfEndIfCatch ex AsException MsgBox(ex.Message)EndTry
EndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_activate.Enabled = False btn_cancel.Enabled = True
TryIfMessageBox.Show("Do you really want to update this Student on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Update Subject set "& _" Name = '"& txtbox_sub_name.Text &"',"& _" Description = '"& txtbox_sub_description.Text &"',"& _" Level_no = '"& cmb_level.SelectedValue() &"'"& _" WHERE Subject_no = '"& txtbox_sub_id.Text &"'")
MsgBox("Record Successfully Updated", MsgBoxStyle.Information) refreshGrid()
167
Else
MsgBox("Action Cancelled", MsgBoxStyle.Information)
Exit Sub
EndIf
Catch ex AsException MsgBox(ex.Message)EndTryEndSub
PrivateSub btn_activate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_activate.Click btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False add_edit_delete("UPDATE Subject SET Status = 'Active' WHERE Subject_no='"& txtbox_sub_id.Text &"'") refreshGrid()EndSub
PrivateSub btn_deactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_deactivate.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False add_edit_delete("UPDATE Subject SET Status = 'Inactive' WHERE Subject_no='"& txtbox_sub_id.Text &"'") refreshGrid()EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False btn_activate.Enabled = False btn_deactivate.Enabled = False btn_update.Enabled = False enableOrDisableAll(False)
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
168
PrivateSub dgvSubject_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvSubject.CellClick
btn_update.Enabled = True btn_deactivate.Enabled = True btn_activate.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If dgvSubject.CurrentRow.Cells("Status").Value = "Active"Then btn_deactivate.Enabled = True btn_activate.Enabled = FalseElse btn_deactivate.Enabled = False btn_activate.Enabled = TrueEndIf
If (dgvSubject.SelectedRows.Count > 0) Then txtbox_sub_id.Text = dgvSubject.SelectedRows(0).Cells(0).Value.ToString() txtbox_sub_name.Text = dgvSubject.SelectedRows(0).Cells(1).Value.ToString() txtbox_sub_description.Text = dgvSubject.SelectedRows(0).Cells(3).Value.ToString() cmb_level.Text = dgvSubject.SelectedRows(0).Cells(2).Value.ToString()EndIf
EndSub
PrivateSub txtbox_search_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtbox_search.TextChanged' fillDataGridView(dgvSubject, "SELECT Subject.Subject_no as 'Subject Number', Subject.Name as'Name', Level.Name as'Grade Level', Subject.Description as 'Description' FROM Subject INNER JOIN Level ON Subject.Level_no = Level.Level_no where Subject.Name like '%" & txtbox_search.Text & "%' OR Subject.Description like '%" & txtbox_search.Text & "%'") fillDataGridView(dgvSubject, "SELECT Subject.Subject_no as 'Subject Number', Subject.Name as'Name', Level.Name as'Grade Level', Subject.Description as 'Description', Subject.Status FROM Subject INNER JOIN Level ON Subject.Level_no = Level.Level_no where Subject.Name like '%"& txtbox_search.Text &"%' OR Subject.Description like '%"& txtbox_search.Text &"%'") colorGrid()
EndSub
EndClass
169
Subjects_options
PublicClasssubjects_options
PrivateSub btn_manage_subjects_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_manage_subjects.Clicksubjects_form.ShowDialog()EndSub
PrivateSub btn_subject_monitoring_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_subject_monitoring.Click
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSubEndClass
Manage_users
PublicClassmanage_usersPrivateSub refreshGrid() fillDataGridView(dgvUser, "SELECT [User].User_no, [Level].Name AS [Grade Level], [User].Username, [User].Password, [User].Gender, [User].Lname AS [Last Name], [User].Fname AS [First Name], [User].Mname AS [Middle Name], [User].Date_of_birth AS [Date of Birth],[User].Place_of_birth AS [Place of Birth], [User].Blood_type AS [Blood Type], [User].Address, [User].Tin, [User].Philhealth, [User].Gsis, [User].Pag_ibig AS [Pag Ibig], [User].En, [User].Ptbiicoe_Lname AS [Relative Last Name], [User].Ptbiicoe_Fname AS [Relative First Name], [User].Ptbiicoe_Mname AS [Relative Middle Name], [User].Ptbiicoe_relationship AS Relationship,[User].Ptbiicoe_relationship AS Relationshi, [User].Ptbiicoe_contact AS Contact, [User].Ptbiicoe_Address AS [Relative Address],[User].Status FROM [User] INNER JOIN [Level] ON [User].Level_no = [Level].Level_no") colorGrid()EndSub
PrivateSub users_form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) HandlesMyBase.Load fillComboBox(cmb_level, "Level", "Level_no", "Name", "SELECT * FROM Level") refreshGrid()EndSub
PublicSub colorGrid()For i = 0 To dgvUser.Rows.Count - 1
170
If dgvUser.Rows(i).Cells("Status").Value = "Inactive"Then dgvUser.Rows(i).DefaultCellStyle.BackColor = Color.FirebrickElse dgvUser.Rows(i).DefaultCellStyle.BackColor = SystemColors.WindowEndIfNextEndSub
PublicSub enableOrDisableAll(ByVal pass AsBoolean)
txtbox_user_no.Clear() txtbox_lname.Clear() txtbox_mname.Clear() txtbox_fname.Clear() txtbox_password.Clear() txtbox_username.Clear() txtbox_retype.Clear() txtbox_guardian_lname.Clear() txtbox_guardian_address.Clear() cmb_gender.SelectedValue = 0 cmb_blood_type.SelectedValue = 0 txtbox_tin.Text = "" txtbox_philhealth.Text = "" txtbox_gsis.Text = "" txtbox_en.Text = "" txtbox_pag_ibig.Text = "" txtbox_guardian_fname.Clear() txtbox_guardian_mname.Clear() txtbox_guardian_lname.Clear() cmb_relationship.Text = "" txtbox_contact_number.Clear() txtbox_guardian_address.Clear()EndSub
PrivateSub btn_new_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_new.Click btn_new.Enabled = False btn_add.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_cancel.Enabled = True
EndSub
PrivateSub btn_add_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_add.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False
171
Try
Dim level_no = 0Dim type_no = 0
If rbAdmin.Checked Then type_no = 1 level_no = 0ElseIf rbPrincipal.Checked Then type_no = 2 level_no = 0ElseIf rbGC.Checked Then type_no = 3 level_no = 0ElseIf rbGH.Checked Then type_no = 4 level_no = cmb_level.SelectedValue.ToStringElseIf rbTeacher.Checked Then type_no = 5 level_no = cmb_level.SelectedValue.ToStringEndIf
IfMessageBox.Show("Do you really want to add this Subject on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then add_edit_delete("INSERT INTO [STA ANA ELEM DB].[dbo].[User] ([Username] ,[Password] ,[Gender] ,[Lname] ,[Fname] ,[Mname],[Date_of_birth],[Place_of_birth],[Blood_type] ,[Address] ,[Tin] ,[Philhealth] ,[Gsis] ,[Pag_ibig] ,[Ptbiicoe_Lname] ,[Ptbiicoe_Fname] ,[Ptbiicoe_Mname] ,[Ptbiicoe_relationship] ,[Ptbiicoe_contact], [Type_no],[Level_no],[Ptbiicoe_Address],[Status],[En]) "& _" values ("&"'"& txtbox_username.Text &"',"& _"'"& txtbox_password.Text &"',"& _"'"& cmb_gender.Text &"',"& _"'"& txtbox_fname.Text &"',"& _"'"& txtbox_lname.Text &"',"& _"'"& txtbox_mname.Text &"',"& _"'"& dtp_date_of_birth.Text &"',"& _"'"& txtbox_place_of_birth.Text &"',"& _"'"& cmb_blood_type.Text &"',"& _"'"& txtbox_address.Text &"',"& _"'"& txtbox_tin.Text &"',"& _"'"& txtbox_philhealth.Text &"',"& _"'"& txtbox_gsis.Text &"',"& _"'"& txtbox_pag_ibig.Text &"',"& _"'"& txtbox_guardian_lname.Text &"',"& _"'"& txtbox_guardian_fname.Text &"',"& _"'"& txtbox_guardian_mname.Text &"',"& _"'"& cmb_relationship.Text &"',"& _"'"& txtbox_contact_number.Text &"',"& _"'"& type_no &"',"& _
172
"'"& level_no &"',"& _"'"& txtbox_guardian_address.Text &"',"& _"'Active',"& _"'"& txtbox_en.Text &"')") MsgBox("Record Successfully Added", MsgBoxStyle.Information)
Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit Sub
EndIfCatch ex AsException MsgBox(ex.Message)EndTry
refreshGrid() enableOrDisableAll(True)
EndSub
PrivateSub btn_update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_update.Click btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False btn_activate.Enabled = False btn_cancel.Enabled = True
TryIfMessageBox.Show("Do you really want to update this Room on the Record?", "Confirmation", MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
add_edit_delete("Update [User] set "& _" Username = '"& txtbox_username.Text &"',"& _" Password ='"& txtbox_password.Text &"',"& _" Fname = '"& txtbox_lname.Text &"',"& _" Mname = '"& txtbox_mname.Text &"',"& _" Lname = '"& txtbox_fname.Text &"',"& _" Date_of_birth = '"& dtp_date_of_birth.Text &"',"& _" Place_of_birth = '"& txtbox_place_of_birth.Text &"',"& _" Address = '"& txtbox_address.Text &"',"& _" Gender = '"& cmb_gender.Text &"',"& _" Blood_type = '"& cmb_blood_type.Text &"',"& _" Tin = '"& txtbox_tin.Text &"',"& _" Philhealth = '"& txtbox_philhealth.Text &"',"& _" Gsis = '"& txtbox_gsis.Text &"',"& _" En = '"& txtbox_en.Text &"',"& _" Pag_ibig = '"& txtbox_pag_ibig.Text &"',"& _" Ptbiicoe_Mname = '"& txtbox_guardian_mname.Text &"',"& _
173
" Ptbiicoe_Fname = '"& txtbox_guardian_fname.Text &"',"& _" Ptbiicoe_Lname = '"& txtbox_guardian_lname.Text &"',"& _" Ptbiicoe_relationship = '"& cmb_relationship.Text &"',"& _" Ptbiicoe_contact = '"& txtbox_contact_number.Text &"',"& _" Level_no = '"& cmb_level.SelectedValue.ToString &"',"& _" Ptbiicoe_Address = '"& txtbox_guardian_address.Text &"'"& _" WHERE User_no = '"& txtbox_user_no.Text &"'") MsgBox("Record Successfully Updated", MsgBoxStyle.Information)Else MsgBox("Action Cancelled", MsgBoxStyle.Information)Exit SubEndIfCatch ex AsException MsgBox(ex.Message)EndTry
refreshGrid() enableOrDisableAll(True)
EndSub
PrivateSub btn_activate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_activate.Click
btn_new.Enabled = True btn_update.Enabled = False btn_activate.Enabled = False add_edit_delete("UPDATE [User] SET Status = 'Active' WHERE User_no='"& txtbox_user_no.Text &"'") refreshGrid()
EndSub
PrivateSub btn_deactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_deactivate.Click
btn_new.Enabled = True btn_update.Enabled = False btn_deactivate.Enabled = False add_edit_delete("UPDATE [User] SET [User].Status = 'Inactive' WHERE [User].User_no='"& txtbox_user_no.Text &"'") refreshGrid()
EndSub
PrivateSub btn_cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_cancel.Click btn_new.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = False btn_activate.Enabled = False btn_deactivate.Enabled = False
174
btn_update.Enabled = False enableOrDisableAll(False)EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()EndSub
PrivateSub rbGH_CheckedChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles rbGH.CheckedChanged cmb_level.Enabled = True
EndSub
PrivateSub rbTeacher_CheckedChanged(ByVal sender As System.Object, ByVale As System.EventArgs) Handles rbTeacher.CheckedChanged cmb_level.Enabled = TrueEndSub
PrivateSub rbAdmin_CheckedChanged(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles rbAdmin.CheckedChanged cmb_level.Enabled = FalseEndSub
PrivateSub rbPrincipal_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles rbPrincipal.CheckedChanged cmb_level.Enabled = FalseEndSub
PrivateSub rbGC_CheckedChanged(ByVal sender As System.Object, ByVal e AsSystem.EventArgs) Handles rbGC.CheckedChanged cmb_level.Enabled = FalseEndSub
PrivateSub dgvUser_CellClick(ByVal sender AsObject, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvUser.CellClick btn_update.Enabled = True btn_deactivate.Enabled = True btn_activate.Enabled = True btn_add.Enabled = False btn_cancel.Enabled = True btn_new.Enabled = False
If dgvUser.CurrentRow.Cells("Status").Value = "Active"Then btn_deactivate.Enabled = True btn_activate.Enabled = FalseElse btn_deactivate.Enabled = False btn_activate.Enabled = True
175
EndIf
If (dgvUser.SelectedRows.Count > 0) Then txtbox_user_no.Text = dgvUser.SelectedRows(0).Cells("User_no").Value.ToString() txtbox_username.Text = dgvUser.SelectedRows(0).Cells("Username").Value.ToString() txtbox_password.Text = dgvUser.SelectedRows(0).Cells("Password").Value.ToString() cmb_gender.Text = dgvUser.SelectedRows(0).Cells("Gender").Value.ToString() txtbox_fname.Text = dgvUser.SelectedRows(0).Cells("Last Name").Value.ToString() txtbox_lname.Text = dgvUser.SelectedRows(0).Cells("First Name").Value.ToString() txtbox_mname.Text = dgvUser.SelectedRows(0).Cells("Middle Name").Value.ToString() dtp_date_of_birth.Text = dgvUser.SelectedRows(0).Cells("Dateof Birth").Value.ToString() txtbox_place_of_birth.Text = dgvUser.SelectedRows(0).Cells("Place of Birth").Value.ToString() cmb_blood_type.Text = dgvUser.SelectedRows(0).Cells("Blood Type").Value.ToString() txtbox_address.Text = dgvUser.SelectedRows(0).Cells("Address").Value.ToString() txtbox_tin.Text = dgvUser.SelectedRows(0).Cells("Tin").Value.ToString() txtbox_philhealth.Text = dgvUser.SelectedRows(0).Cells("Philhealth").Value.ToString() txtbox_gsis.Text = dgvUser.SelectedRows(0).Cells("Gsis").Value.ToString() txtbox_pag_ibig.Text = dgvUser.SelectedRows(0).Cells("Pag Ibig").Value.ToString() txtbox_guardian_lname.Text = dgvUser.SelectedRows(0).Cells("Relative Last Name").Value.ToString() txtbox_guardian_fname.Text = dgvUser.SelectedRows(0).Cells("Relative First Name").Value.ToString() txtbox_guardian_mname.Text = dgvUser.SelectedRows(0).Cells("Relative Middle Name").Value.ToString() cmb_relationship.Text = dgvUser.SelectedRows(0).Cells("Relationship").Value.ToString() txtbox_contact_number.Text = dgvUser.SelectedRows(0).Cells("Contact").Value.ToString() txtbox_guardian_address.Text = dgvUser.SelectedRows(0).Cells("Relative Address").Value.ToString() cmb_level.Text = dgvUser.SelectedRows(0).Cells("Grade Level").Value.ToString() txtbox_en.Text = dgvUser.SelectedRows(0).Cells("En").Value.ToString()
EndIfEndSub
176
EndClass
Users_options
PublicClassusers_options
PrivateSub btn_manage_users_Click(ByVal sender As System.Object, ByVal eAs System.EventArgs) Handles btn_manage_users.Clickmanage_users.ShowDialog()
EndSub
PrivateSub btn_user_monitoring_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_user_monitoring.Click
EndSub
PrivateSub btn_close_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_close.ClickMe.Close()
EndSubEndClass
177
Chapter VII
USER’S MANUAL
GETTING STARTED
When NETWORK BASED ENROLLMENT ANDSTUDENT INFORMATION MANAGEMENT SYSTEM is started, itdisplays a login form which allows you to login into thesystem.
LOGGING IN
This is the processes on how to login into the system.
1.) Type your username2.) Type your password3.) Hit the login button
178
After logging in, the following interface is visible.
The NETWORK BASED ENROLLMENT AND STUDENT INFORMATION MANAGEMENT SYSTEM user interface is made up of the following components.
Menus such as: Students, Subjects, Grades, Sections, Rooms, Enrollment, Users, Account, Reports and Logout are indicated in the illustration below.
CREATING NEW STUDENT RECORD
179
1. Using the main menu screen of the system, click
2. In the left side corner, there are submenus, click
3. supply the given fields thenclick the Button.
3.If you want to add another student, clickthe button to enable all the text fields.
180
4.Click a certain data from the student list viewer if youwant to update/edit the record, those datawill be displayed accordingly in thetextboxes. You can now edit the record thenclick
5. Once you add student in a database, youcandeactivatehis/her account when the school will no longerbe using the said account.
CREATING NEW SUBJECT RECORD
1. Using the main menu screen of thesystem, click the
181
2. In the left side corner, there are
submenus, Click
3. Admins have the capability to add, edit, activate/de-activate subject used as utility for the system.
ASSIGNING STUDENT GRADES
182
1. Using the main menu screen of the system, click
2. In the left side corner, there aresubmenus, Click
3. Set first the Section, session, level and effectivity then subjects will be displayed
4. Every section displayed, there are students under it.Click a certain student data thenset the period, input his/her gradethen click
183
5. In other sub menu, click
6. Input the LRN (Learning Reference Number) of a student,automatically his/her grade will be displayed.
7. In other sub-menu click
184
Transferee students will be displayed in this first viewer.
Set the subjects’ effectivity and level.
Assign grade per period then click
MANAGING SECTIONS
1. Using the main menu screen ofthe system, click
185
2. In the left side corner, there are submenus, click
2.1 Admins have the capability to add, edit, activate/de-activate sections used as utility for the system.
3. In other submenus, click
Before you randomize a section, make sure that there are already assigned students with their previous grades.
186
Set the level, session and effectivity then select a section.For example, there are two (2) assigned students in section 2
4. In other sub menus, click
Once you set the
Level, session and effectivity, enrolled students will be displayed;
Assign asection; and click
5. In other sub- menu, click
187
Set all the required data to generate a subject.
MANAGING ROOMS
1. Using the main menu screen of the system, click
188
2. In the left side corner, there are submenus, click
3. Admins have the capability to add, edit, activate/de-activate roomsused as utility for the system.
ENROLLMENT
1. Using the main menu screen of thesystem, click
189
2. In the left side corner, there are submenus, click
Once a certain student is selected, his/her grade will be displayed in the ‘Previous Grade’
To enroll, Set the Level and Section of the enrollee; then click
MANAGE USERS
1. Using the main menu screen of the system, click
190
2. In the left side corner, there are submenus, click
3. Supply the given fields then click the button.
4. If you want to add another user, click the
button to enable all the text fields.
5. Click a certain data from the user list viewer if you want
to update/edit the record, those data will be displayed
accordingly in the textboxes. You can now edit the record
then click
191
6. Once you add user in a database, you can deactivate his/her account when the school will no longer be using the said account.
REPORTS
1. Using the main menu screen of the system, click
2. In the left side corner, there are submenus, click
192
Once you click it will preview the students’ masterlist
Click to generate ready to print master list.
LOGGING OUT
1. Using the main menu screen of the system, click
194
Curriculum Vitae:
Personal Information:
Name : Darwin E. Layague
Position : Programmer
Address : Blk. 4 Lot 17Mintal Sto Nino Davao City
Hometown : Davao City
Birthday : October 3, 1993
Contact Number : +639095310064
E-mail Address : [email protected]
Father’s Name : Jerry M. Layague
Mother’s Name : Laurence E. Layague
Educational Background:
Elementary : Carlos P. Garcia Elementary School
2005-2006
201
Secondary : Holy Cross of Mintal
2009-2010
Tertiary : University of Mindanao
2013-Present
Matina, Davao City
BS in Information Technology
Personal Information:
Name : Rey T. Timillar
Position : Project Manager
Address : Blk 5 Lot 7 Phase 2 Rosal Ext. Elrio Vista
Davao City
Hometown : Purok 4, PoblacionTulunan North
Cotabato
Birthday : May 13, 1992
Contact Number : +639298082990
E-mail Address : [email protected]
Father’s Name : Francisco B. Timillar
202
Mother’s Name : Teresita C. Timillar
Educational Background:
Elementary : Tulunan Central Elementary School
2004-2005
Secondary : Southern Baptist College
2008-2009
Tertiary : University of Mindanao
2010-2011
Matina, Davao City
BS in Electronics and Communication
Engineering
University of Mindanao
2013-Present
Matina, Davao City
BS in Information Technology
5
Personal Information:
203
Name : Victor S. Calderon Jr.
Position : System Analyst
Address : 57- C Gempesaw Street Davao City
Hometown : Surigao Del Sur
Birthday : February 25, 1994
Contact Number : +639303234743
E-mail Address : [email protected]
Father’s Name : Victor G. Calderon Sr.,
Mother’s Name : Susan S. Calderon
Educational Background:
Elementary : Sta. Ana Central Elementary School
2005-2006
Secondary : Sta. Ana National High School
2009-2010
Tertiary : University of Mindanao
2013-Present
Matina, Davao City
BS in Information Technology
204
Personal Information:
Name : Louwel Veranda
Position : System Designer
Address : Brgy. San AntonioBabak Dist.IGACOS
Hometown: Island Garden City Of Samal
Birthday : August 31, 1993
Contact Number : +639079264274
E-mail Address : [email protected]
Father’s Name : Wilfredo B. Veranda
Mother’s Name : Ludivina O. Veranda
Educational Background:
Elementary : San Antonio Elementary School
1999-2005
Secondary : Holy Name School Foundation Inc.
2005-2009
Tertiary : University of Mindanao 2013-
Present
Matina, Davao City
205
BS in Information Technology
Personal Information:
Name : Roderica C. Deguitos
Position : Document in-charge
Address : Lower Madapo Hills, Davao City
Hometown : Davao City
Birthday : September 29, 1994
Contact Number : +639122687807
E-mail Address : [email protected]
Father’s Name : Rodrigo P. Deguitos
Mother’s Name : Helen C. Deguitos
Educational Background:
206