Pre-Enrollment Management System
Pre-Enrollment Management System
Presented by:
Group 1
Badong, Adrian
Balod, Shereen Jeouel
Legaspi, John Benedict
Manalo, Allen
Meru, John Carl
Namias, Jhon Keneth Ryan B.
Palahang, Jun Mark
Tuazon, Kaye
Grade 12 - ICT 2
Presented by:
Group 1
Badong, Adrian
Balod, Shereen Jeouel
Legaspi, John Benedict
Manalo, Allen
Meru, John Carl
Namias, Jhon Keneth Ryan B.
Palahang, Jun Mark
Tuazon, Kaye
Grade 12 - ICT 2
Prepared and submitted by Adrian Badong, Allen Manalo, Jhon Keneth Namias, John Benedict
Legaspi, John Carl Meru, Jun Mark Palahang, Kaye Tuazon, Shereen Jeouel Balod. in fulfillment
of the requirements for Computer Programming has been examined and is recommended for
acceptance and approval for oral defense.
Accepted and approved in partial fulfillment for the applied subject inquiries and investigation.
Page | I
ACKNOWLEDGEMENT
The completion of this study could not have been possible without the expertise of Mr. Ranilio
David, our Capstone Project Adviser and Mr. Chrysler Indigo Panaguiton, our Capstone Project
Consultant. We wish to express our sincere gratitude to them for providing us an opportunity to
do this research paper effectively.
This success of us couldn’t turn into reality without this following person who with all their help
in different ways. To all of you, let me acknowledge everyone, all assign of my department of
gratitude to our Almighty God who always guide and light our way in this research, without Him,
we can do nothing in the world.
We also thank the attentive and courageous respondents to allow us to interview them without
hesitations and for showing a respect, while doing this respective paper. We should keep up the
good work and thereafter when we should be pursuing our respect.
Page | II
Table of Contents
Approval Sheet I
Acknowledgement II
Table of Contents III
References 61
Appendices 62-78
Questionnaire 79-80
Flowchart 81-84
Source Code 85-292
Curriculum Vitae 293-304
Page | III
Young Achievers’ School of Caloocan, Inc.
Senior High School S.Y. 2021-2022
#7 Ramos Compound, Bagumbong, Caloocan City
Research Output
Proposed Title
Pre-Enrollment Management System for
Young Achievers’ School of Caloocan Inc.
Chapter 1 – Introduction
In this part of the research, it will provide discussions of the Background of the Project,
Purpose and Description, Statement of the Problem, Purpose/ Objective of the Project,
Significance of the Study, Scope and Delimitation, Conceptual Framework, Definition of
Terms, Hypothesis.
A system for processing, storing, and managing student enrolment data. This system's real-time
logging allows it to easily record the time-in and time-out of a user's attendance. It has a simple
user interface for quick record processing and logging. It also includes a picture of each user to
guarantee the person's identification while logging in. This program is useful for schools, as
they keep a large database of students' information and attendance records. I hope you enjoy this
system.
Page | 1
Background of the Project
Nowadays, technology plays a significant part in our lives. The fast expansion of
technology can be seen everywhere. Computer technologies are one of the most rapidly
evolving technologies, particularly since they can make our job easier, more organized, and
easier than the traditional methods of writing and computing data. All of this, with or without
our knowledge, leads to numerous unimaginable computer capabilities. And we cannot argue
that computer technology can make a modern man's living more convenient.
Initially, apps might be a means to take use of today's technology in order to improve the
efficiency and security of businesses. Most businesses nowadays rely on applications that
provide them with more convenient access to their company information at any time and from
any location. Applications have come a long way and now provide competitive benefits over
conventional software-based systems, allowing organizations to consolidate and simplify their
systems and processes while also lowering costs.
The researchers will submit a project that intends to develop a secure, user-friendly, and easy-
to-modify program called the ‘Pre-Enrollment Management System for Young Achievers'
School of Caloocan Inc. SY. 2021-2022’.
We were committed to create the aforementioned system, which would provide efficiency,
more accurate results, and the capacity to quickly search for and update information as needed.
Using the aforementioned technologies, easy sorting and monitoring of pre- enrollment data
will be available. It will also generate reference id for students who are presently enrolled. The
proposed system will be utilized by IT personnel, Teachers, and Students.
The ‘Pre-Enrollment Management System for Young Achievers’ School of Caloocan Inc. SY.
2021-2022’ aims to automate almost all of the processes mentioned above in order to reduce
the clerical labor of the school's staff working in both technical and accounting departments
and it enables sorting and archiving of data and promotes efficient administration and
management of the records by utilizing specialized algorithms and cost-effective tools, thereby
providing better control to management by avoiding manual errors, etc.
Page | 2
Statement of the Problem
The current enrollment system of Young Achievers' School of Caloocan Inc. is done at an
online portal for aspiring Yascians, but this portal is not only commercially billed, but it also
lacks features such as security, user-friendliness, and inefficiency in processing the students'
records and data. Too much time and effort are wasted and cannot be delivered on time. The
researcher aimed to find an answer to the following question:
1. What programming language did the programmer use to develop this program?
2. What colour scheme is used by the programmer?
3. What database management system does the programmer employ?
4. In terms of layout and design, does the system pass?
5. Is it simple to use the system?
6. Is it a user-friendly system?
7. Is the security of the system competent?
8. In terms of reliability, is the system accepted?
9. Is the system dependable and trustworthy?
10. Is the system unique and creative?
The primary goal of the project is to reduce the amount of human labor necessary to do all
essential tasks such as maintaining a record of all the students, pre-enrollment, database
management, and so on.
Page | 3
Significance of the Project
Computers bring convenience to its users by making transactions easier and faster. Because the
number of students in practically all educational institutions is quickly expanding, there is a
greater demand for teachers. Fortunately, today's generation of high-tech machines and tools
can take the place of these employees. This capstone project “Pre-Enrollment Management
System for Young Achievers’ School of Caloocan Inc. SY. 2021-2022” will provide a high-
tech system of collecting and monitoring student data, making the pre-enrollment process more
comfortable for both students and parents.
Administrators - This study will help them to monitor the records and forecast the tools needed
for incoming school year. It will help to keep and handle essential information of the student for
the convenience of the students and the personnel assign to enrollment in the education
institution.
Teachers - This research will help teachers in determining the best approach to assess student
enrollment.
Future Researcher - This study will help the researcher to gain more knowledge and
information about this capstone project.
Potential Students – can easily apply and pre-enroll here at Young Achievers' School of
Caloocan Inc. They will know how pre-enrollment management system works
The program database will store the personal Information of the learners such as last name, first
name, middle name, address, date of birth, age, sex, religion, father name, mothers name, type
of transportation when entering school, grade level you want to study, administrator and
registrar signature and date of birth, learner’s signature and date of birth, learner’s username,
and password. The program also allows for the uploading of a learner's picture.
Delimitation
The system is exclusively for Young Achievers’ School of Caloocan Inc. The system will not
include the viewing of the Administrator personal information. Quizzes and recitations of
learners are not available in the system. Learners are only allowed to view their profile and
cannot be edited.
Page | 4
Conceptual Framework
•Program
REQUIREMENTS •Requirements
•Documentation
IMPLEMENTATION •Programing
MAINTENANCE
Requirements:
The first phase entails determining what needs to be created as well as its function, purpose,
and so on. The input and output specifications, as well as the final product specifications, are
analyzed and marked here.
System Design:
This phase studies the need specifications from the previous phase and prepares the system
design. System design assists in the specification of hardware and system requirements, as well
as the definition of overall system architecture. The software code that will be written in the
following step is being written right now.
Implementation:
The system is first built-in discrete programs called units, with feedback from system design,
and then merged into the next step. Unit Testing is the process through which each unit is
designed and tested for functioning.
Page | 5
Maintenance:
This stage happens after installation and entails making changes to the system or a single
component to change qualities or enhance performance. These changes occur as a result of
either user-initiated change requests or problems discovered during live system operation. The
produced software is regularly maintained and supported for the user. All of these stages are
connected in such a way that progress is considered to flow smoothly downhill (like a waterfall)
through the phases. The next phase begins only once the preceding phase's established set of
goals has been met and signed off, thus the term "Waterfall Model".
Definition of Terms
The following terms need to be explained in order to understand the terminologies used in
research: (Conceptually & Operationally)
Pre-enrollment. It’s a procedure that students applied in but it’s not fully enrolled yet.
School Management System. A system that aids in the evaluation and search of enormous
amounts of data and is mostly used to handle large amounts of data.
System Standard. Our programmer designed the program to be easy to use, user-friendly, and
adapt for the school, making it easier to use and manage data.
Enrollment portal. This is where aspiring applicants fill out their information in order to be
enrolled.
System making procedure. It comprised of Requirements, Design, Implementation,
Verification, and Maintenance in order to make the system easier to develop and maintain rather
than a chaotic mess at the development stage, making it more vulnerable to bugs, errors, and
other issues.
Hypothesis
Page | 6
Chapter 2 – Review of Related Literature
The following proposed system is discussed in this chapter. The project's aim is to create an
enrollment system for Young Achievers' School of Caloocan, Inc. This system is designed for
use by staff to enable them to create information necessary by different persons and may also
be used to automatically pre-enroll applicants. It also includes information pertinent data such
as name, grade level, school year, guardian, contact number/s, and etc.
Foreign Literature
According to Rowley (2005), an enrollment system is often classified as an information
system, and it acts as a tool to assist information management in terms of student data,
enrollment fees information, and other information related to the enrolling process. Every
school gains a competitive edge by implementing this system since they will be able to handle
sensitive information with simplicity and security.
According to Dunn and Scott (2005), the enrolment system has had a significant influence on
the educational setting. It is a system based on creative program strategies. It is a method that
will assist both the enrollment employees in charge and the students in completing the enrolling
procedure in less time. Unlike conventional enrolling, the LAN enrollment system processes a
huge number of student data and offers effective and consistent information services.
According to Sybex Inc (1999), visual basic provides a graphical environment in which users
typically develop the forms and controls that comprise the basic components of the tour
application. Visual Basic has a plethora of helpful features that will increase the user's
productivity. According to Gold Chager et al. (2003), computer as a device for processing the
information understood computer plays an important part in their life, but few are aware of how
ubiquitous role is. According to Mane (2000), the invention of the computer made it simpler to
complete that by doing it manually, to have direct access on easy answer merely monitoring
record where in the demands of computer make it possible for everyone to receive data in a
specific need. We can think of the computer as a necessary and productive tool for individuals.
According to Gurewich (1999), the database system speeds up the operation of every
organization. Because, instead of completing things manually, computer technology allows
everything to be done more quickly.
Local Literature
According to Dioso (2011), computers aid in comprehensive intelligent planning,
organizing, actuating, and controlling. This can be seen in the past when they monitor
production processes, solve scientific problems, and help arrive at preliminary answers to a
variety of involved situations. According to Ralph M. Stair (2009), technological advancements
over time have enabled us to accomplish more with less effort. From the invention of the light
bulb through the industrial revolution and beyond, humans have been striving for a more
efficient way of carrying out activities. Furthermore, according to Ilagan (2010), Far Eastern
Page | 7
University (FEU) is one of the largest institutions in the country in terms of population, with
over 25,000 students.
With a huge population comes plenty of issues with enrollment, student records, and related
data. FEU sought advice from professionals in order to find a long-term solution to the situation.
As a result, the decision was made to automate FEU's enrollment method. FEU opted to
automate the enrollment system in two stages: (1) the development of an enrollment and student
records system for Phase I, and (2) the integration of student financial data for Phase II. They
collaborated closely with SQL*Wizard to test E*Wizard, an integrated student enrollment
system that includes modules with broad inquiry and reporting capability.
They also enlisted the help of FEU's Computer Services Department to work out any glitches.
They analyzed organizational structures, allocated people to support groups, and requested
training from faculty advisers and employees. She also met with representatives from each
institute and plotted the introduction of an integrated system during the second semester with
the help of academic management and SQL*Wizard's technical department. Cleaning the
database, standardizing topic labels, and establishing the subject requirements were all part of
the preparation.
Foreign Study
A software development and IT service provider built their catalyst integrated web
platform to give the two rice schools with content management, transaction processing,
marketing, and interactive community functions. Catalyst meets the Jones School's two key
requirements for choosing a web-based platform: it simplifies content administration and allows
users to respond to information such as event RSVP and course registration. The content
management tools enable the Jones school personnel to edit, update, and contribute to the
amount of curriculum and event material without requiring technical support. They just copy
and paste the document into the content management system, check it for correctness, then
publish it to the web.
Local Study
According to the researcher, an internet enrolment system for Veritas Parochial School
(VPS) in Manila was developed to assist its students in enrolling in a more efficient way without
the hassles of waiting long hours to fill out forms that sometimes become redundant, or standing
in line and paying at the cashier. This new kind of enrolling is possible with the Internet
enrollment system for VPS. This new system provides students with more choices for registering
at VPS. By entering into the VPS website, students may register for and enroll in courses for the
upcoming academic year. With these, all students are expected to fill out forms that take no
more than a few minutes to complete. For future reference, the system saves its records in the
school database. Confirmation of student transactions must be confirmed, and tuition costs must
be paid through the school's registrar. Students can also explore the VPS website and check their
current account balance.
Page | 8
Chapter 3 – Research Design and Methodology
This chapter focused on the methodology that was used in the study. It dealt with research design,
sampling procedure, participants of the study, data gathering procedure, research instrument, and
statistical treatment.
Research Design
For this study, the researcher surveyed Grade 11 Information and Communications Technology
students at Young Achievers School of Caloocan. The researcher applied a descriptive survey
approach in their research, and observations were used as descriptive methods. The researcher
will solicit responses from Grade 11 ICT students at Young Achievers School in Caloocan in
order to distribute the questionnaire through the descriptive survey approach. Using this
approach, the researcher will find it simple to collect data.
Sampling Procedure
The researchers used Purposive Sampling in administering questionnaires to the section ICT of
Grade 11 level at Young Achievers’ of Caloocan as respondents. We employ Purposive
sampling, also known as judgmental, selective, or subjective sampling, since it is a type of non-
probability sampling in which we researchers depend on our own judgment when selecting
people of the public to participate in our surveys.
Research Instrument
The instrument used in the study was a two-part questionnaire prepared by our capstone project
consultant. The first part of the questionnaire focuses on ‘System Features’ such as layout and
design, ease of use, user friendliness, security, reliability, and creativity and originality using a
6-point Likert scale ranging from 1 - Very poor to 6 - Highest. The second part focuses on how
the presenter presented the system to the Grade 11 ICT students, using again a 6-point Likert
scale ranging from 1 - Very poor to 6 - Highest.
Page | 9
Statistical Treatment
Before the data was tabulated and statistical analysis began, individual replies were recorded on
tally sheets. The data obtained on the conducted tests was treated with the following formula in
order to generate solutions for the study's treatment of the problem. Following the data
collection, the information acquired will be tabulated, analyzed, and interpreted by the
researchers using the statistical methods and procedures listed below.
1. Frequency and percentage. This was used to summarize the data gathered from the
survey questionnaire the respondents will answer.
2. Mean. will be used to get average score of the respondent's answer.
∑𝑥
Formula: 𝑋 = 𝑁
Where:
𝑋 = Mean,
∑ 𝑥 = sum of all scores, and
𝑁 = Number of cases
Page | 10
Chapter 4 – Results and Discussions
Mean: 5.1
Graph 1: Layout and Design (Text, Fonts are easy to read and clear, Colors are matching No
space wasted)
Graph 1. With a mean of 5.1, the layout and design are outstanding. This indicates that
respondents are quite satisfied, and it has become an essential part of the system. The alternative
hypothesis is accepted
Page | 11
Table 2: Ease of Use – (Functions of the system are easy to use)
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 1 3%
4 - Above Average 5 17%
5 - Satisfactory 12 40%
6 - Highest 12 40%
Mean: 5.17
Graph 2 The Ease of Use is remarkable, with a mean rating of 5.17. This shows that respondents
find the system to be very easy to use, and it has become an important component of the system.
The alternative hypothesis is accepted
Insights:
• 26% of people answered 6 - Highest for this question, and the majority answered "6 -
Highest" for Question 1.
Page | 12
• 26% of people answered 6 - Highest for this question, and the majority answered "6 -
Highest" for Question 3.
Page | 13
Table 3: User friendliness – (End-User can easily understand the system or program)
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 2 7%
4 - Above Average 3 10%
5 - Satisfactory 10 33%
6 - Highest 15 50%
Mean: 5.27
Graph 3: User friendliness – (End-User can easily understand the system or program)
Graph 3 With a mean rating of 5.27, user friendliness is exceptional. This indicates that
respondents consider the system to be very user-friendly and understandable, and that it has
become an important part of the system. The alternative hypothesis is accepted
Page | 14
Table 4: Security – (Authentication and level of access)
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 2 6.67%
4 - Above Average 8 26.67%
5 - Satisfactory 6 20%
6 - Highest 14 46.67%
Mean: 5.07
Graph 4 Security rates exceptionally well, with a mean rating of 5.07. This shows that
respondents believe the system is very secure, and the degree of access is very rational, and that
it has become a critical component of the system. The alternative hypothesis is accepted
Page | 15
Table 5: Reliability – (No downtime, and No DEBUG)
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 2 7%
4 - Above Average 4 13%
5 - Satisfactory 11 37%
6 - Highest 13 43%
Mean: 5.17
Graph 5 With a mean rating of 5.17, reliability scores remarkably well. This demonstrates that
respondents believe the system has no downtime or DEBUG, is extremely reliable, and has
become an essential component of the system. The alternative hypothesis is accepted
Page | 16
Table 6: Dependability
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 1 3.33%
4 - Above Average 9 30%
5 - Satisfactory 7 23.33%
6 - Highest 13 43.33%
Mean: 5.07
Graph 6: Dependability
Graph 6 Dependability ranks quite well, with a mean rating of 5.07. This shows that
respondents believe the system is very dependable, and that it has become an important part of
the system. The alternative hypothesis is accepted
Insights:
• 13% of people answered 3 - Average for this question, and the majority answered "3 -
Average" for Question 7.
Page | 17
• 13% of people answered 3 - Average for this question, and the majority answered "3 -
Average" for Question 2.
Page | 18
Table 7: Creativity and Originality – (Buttons, Icons, Images used in the program are original)
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 2 6.67%
4 - Above Average 4 13.33%
5 - Satisfactory 8 26.67%
6 - Highest 16 53.33%
Mean: 5.27
Graph 7: Creativity and Originality – (Buttons, Icons, Images used in the program are original)
Graph 7 With a mean rating of 5.27, creativity and originality do pretty well. This demonstrates
that respondents believe the creative and unique are key parts of the system. The alternative
hypothesis is accepted
Page | 19
Section II – Statistics based on the performance on the presenting day
Table 8: Do you understand the presentation?
CHOICES f Percentage (%)
1 – Very poor 0 0%
2 – Poor 0 0%
3 – Average 3 10%
4 – Above Average 4 13.33%
5 – Satisfactory 8 26.67%
6 – Highest 15 50%
Mean: 5.17
Graph 8 According to the respondents, with a mean comprehension rating of 5.17, they are very
well during the presentation of the system. This demonstrates that the audience has a good
understanding of the system. The alternative hypothesis is accepted
Page | 20
Table 9: Are you satisfied with the program or project presented?
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 0 0%
4 - Above Average 5 16.67%
5 - Satisfactory 6 20%
6 - Highest 19 63.33%
Mean: 5.47
Graph 9 This is the question with the most points, with a mean rating of 5.47, indicating that
the respondents are very impressed with the system and project presented. The alternative
hypothesis is accepted
Page | 21
Table 10: Are the presenters well knowledgeable about their program?
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 1 3.33%
4 - Above Average 4 13.33%
5 - Satisfactory 10 33.33%
6 - Highest 15 50%
Mean: 5.3
Graph 10: Are the presenters well knowledgeable about their program?
Graph 10 With a mean rating of 5.3, this is the most popular question, showing that the
respondents are quite impressed with the presenters' understanding of their program. The
alternative hypothesis is accepted
Insights:
• 13% of people answered 3 - Average for this question, and the majority answered "3 -
Average" for Question 8.
Page | 22
• 13% of people answered 3 - Average for this question, and the majority answered "3 -
Average" for Question 4.
Page | 23
Table 11: Are your questions/thoughts were answered?
CHOICES f Percentage (%)
1 - Very poor 0 0%
2 - Poor 0 0%
3 - Average 3 10%
4 - Above Average 2 6.67%
5 - Satisfactory 13 43.33%
6 - Highest 12 40%
Mean: 5.13
Graph 11 Respondents were quite impressed after the presenters answered their
questions/thoughts, with a mean rating of 5.13, indicating that they were impressed. The
alternative hypothesis is accepted
Insights:
• 26% of people answered 6 - Highest for this question, and the majority answered "6 -
Highest" for Question 3.
Page | 24
• 26% of people answered 6 - Highest for this question, and the majority answered "6 -
Highest" for Question 9.
Page | 25
Graphical User Interface
Page | 26
Figure 2: Login Form 1.2
Page | 27
Figure 3: Forgot Password
Page | 28
Figure 4: Main Form (Guest)
Page | 29
Figure 5: Main Form (Teacher)
Page | 30
Figure 6: Main Form (Admin)
Page | 31
Figure 7: Main Form (Super Admin)
Page | 32
Figure 8: Enrollment Portal (Step 1)
Page | 33
Figure 9: Enrollment Portal (Step 2)
Page | 34
Figure 10: Enrollment Portal (Step 3) 1.1
Page | 35
Figure 11: Enrollment Portal (Step 3) 1.2
Page | 36
Figure 12: Enrollment Portal (Step 4)
Page | 37
Figure 13: Student Pre-Enrollment Database Manager 1.1
Page | 38
Figure 14: Student Pre-Enrollment Database Manager 1.2
Page | 39
Figure 15: Student Pre-Enrollment Database Manager 1.3
Page | 40
Figure 16: Student Pre-Enrollment Database Manager 1.4
Page | 41
Figure 17: Student Pre-Enrollment Database Manager 1.5
Page | 42
Figure 18: Student Pre-Enrollment Database Manager 1.6
Page | 43
Figure 19: Student Pre-Enrollment Database Manager 1.7
Page | 44
Figure 20: Teacher Information Database Manager 1.1
Page | 45
Figure 21: Teacher Information Database Manager 1.2
Page | 46
Figure 22: Login History Database Manager 1.1
Page | 47
Figure 23: Login History Database Manager 1.2
Page | 48
Figure 24: Login History Database Manager 1.3
Page | 49
Figure 25: Login History Database Manager 1.4
Page | 50
Figure 26: About Me
Page | 51
Figure 27: User Information
Page | 52
Figure 28: Change Information
Page | 53
Figure 29: Change Password
Page | 54
Figure 30: Capture ID Picture 1.1
Page | 55
Figure 31: Capture ID Picture 1.2
Page | 56
Figure 32: Capture ID Picture 1.3
Page | 57
Chapter 5 – Conclusion and Recommendations
This chapter presents the study's findings, which are grouped into two groups. The first
is the System Statistics, which we use to review and analyze the data we collect to identify where
we can make improvements and adapt. The second research we believe needs to be improved is
the statistics based on the performance on the day of the presentation.
SUMMARY OF FINDINGS
1. What programming language did the programmer use to develop this program? And
why?
➢ VB.NET, because its more user-friendly and efficient for everyone who wants to use
it, we concentrated our program on security, user-friendliness for everyone who
wants to use it, and inefficiency for the admins so that they don't spend a lot of time
and effort. They can readily access the records and data of such students by using
our application. This is the application that is essential for us to be successful in our
program.
2. What color scheme is used by the programmer? And why?
➢ We are inspired to use the color of our beloved school Young Achievers’ School of
Caloocan Inc. We use the light blue color so that is the sign that this program is
specially for Young Achievers’ School of Caloocan.
3. In terms of layout and design, does the system pass? And why?
➢ According to Question 1 “Layout and Design”, With a mean rating of 5.1, the layout
and design are outstanding. This indicates that respondents are quite satisfied, and it
has become an essential part of the system. We make our own layout and designs.
We use applications like PicsArt for editing and some photoshops.
4. Is it simple to use the system? And why?
➢ Basing on Section 1 Table 2 The Ease of Use is remarkable, with a mean rating of
5.17. This shows that respondents find the system to be very easy to use, and it has
become an important component of the system. Basing on the section 2 table 10 With
an average rating of 88.33 percent, this is the most popular question, showing that
the respondents are quite impressed with the presenters' understanding of their
program. We make sure that our program is easy to use and you will clearly
understand the functions that we input.
Page | 58
5. Is it a user-friendly system? And why?
➢ Basing on Section 1 Table 3 With a mean rating of 5.27, user friendliness is
exceptional. This indicates that respondents consider the system to be very user-
friendly and understandable, and that it has become an important part of the system.
We make sure our program is understandable. We put the help button so the users
will know how to use easily our program.
6. Is the security of the system competent? And why?
➢ Basing on section 1 table 4 Security rates exceptionally well, with a mean rating of
5.07. This shows that respondents believe the system is very secure, and the degree
of access is very rational, and that it has become a critical component of the system.
Our program has a forgot password feature which you will need to put your
username, full name, date of birth, and the place of birth so it can’t be access easily
and also if you change your password you will need to put the old password so if you
input the wrong password your password will not change.
7. In terms of reliability, is the system accepted? And why?
➢ Basing on Section 1 Table 5 With a mean rating of 5.17, reliability scores remarkably
well. This demonstrates that respondents believe the system has no downtime or
DEBUG, is extremely reliable, and has become an essential component of the
system. Our system is 100% sure that the functions is working. We accept those
comments or suggestions to improve the reliability of our program.
8. Is the system dependable and trustworthy? And why?
➢ Basing on Section 1 Table 6 Dependability ranks quite well, with a mean rating of
5.07. This shows that respondents believe the system is very dependable, and that it
has become an important part of the system. Our system is trustworthy because only
the admin can access that important information of the students so there’s no leak of
information will happen.
9. Is the system unique and creative? And why?
➢ Basing on Section 1 Table 7 With a mean rating of 5.27, creativity and originality do
pretty well. This demonstrates that respondents believe the creative and unique are
key parts of the system. We created our program with our own design ideas. Those
Database, Home page, Log In form etc. Is designed by our System designer also
those buttons. We imagine and this is the output of our imagination which lead to
the very unique program. We make sure that our system is unique and you can’t find
similarity in the internet
Page | 59
CONCLUSION
From the findings, the following conclusions were drawn:
The study reveals the system's strengths and flaws, as well as how it may be improved
and adapted to create a competent and reliable enrollment system. Our Pre-Enrollment
Management System allows school administrators to simply see and mark the students who have
enrolled. It also features a Students Information Database where you can look up information
about the students. They are able to easily enroll students. The fact that all of the respondents
were from the Young Achievers School of Caloocan Inc. is one of the study's flaws since the
study is limited. Students in the field of information and communication technology, as well as
teachers and administrators in schools, the goal of the study was to work on improving the
enrolling system in a unique way and effective way.
RECOMMENDATIONS
Based on the findings and conclusions of the study, the following recommendations were drawn:
1. We advise future researchers to have a clear flow of your program because it will be
difficult to alter if there is a "slight" change, and it may break if you make a change.
2. We propose using our system for extra objectives including as attendance, library
monitoring, and so on because of its scalability. For our school, it is important to create
a centralized system that includes a variety of competent data management systems in
order to improve school control and improve the quality of all of the teachers, registrars,
and students.
3. We recommend that only school personnel must use the program, and no students should
have access to the school's confidential data.
4. Because it has an advanced login with a level of access rational on the user's authority,
we upgrade a system with a level of security that is appropriate to a typical system's
utilization. Always pay attention to the level of detail of your system when you're
working on it when you're developing it. Because even if the system's practicality is
critical, if the user doesn't comprehend the program because of its irrational design, its
meaning is negated.
Page | 60
References
Dunn and Scott (2005), Enrollment portal This is where aspiring applicants fill out
their information
https://www.coursehero.com/file/p67fqbln/Enrollment-portal-This-is-where-aspiring-
applicants-fill-out-their-information/
Mane (2000), Campus Research Thesis and Dissertation Data Banking System
https://blablawriting.net/campus-research-thesis-and-dissertation-data-banking-system-
essay
Page | 61
Appendices
APPENDIX A
Letter to the Teacher
April 4, 2021
Dear Respondent,
Mabuhay YASC!
We are students at Young Achievers School of Caloocan. As one of our requirements in
Immersion subject, we are going to conduct a study entitled “Pre-Enrollment Management
System for Young Achievers’ School of Caloocan Inc.” The objective of the project is: (1) To
develop a pre-enrollment system for all aspiring students at Young Achievers’ School of
Caloocan, (2) To automate the Pre-enrollment process and student’s reference number
generation,
In this regard, we would like to request your permission that we are allowed to conduct the study
in your class (ICT 2).
Your approval would certainly contribute to the success of this research project.
We sincerely pray and hope for your kind and consideration and favorable response.
Respectfully yours
Adrian Badong
Allen Manalo
Jhon Keneth Namias
John Benedict Legaspi
John Carl Meru
Jun Mark Palahang
Kaye Tuazon
Shereen Jeouel Balod
Student Researchers
Noted by:
Page | 62
APPENDIX B
Letter to the Respondents
April 4, 2021
Dear Respondent,
Mabuhay YASC!
We are students at Young Achievers School of Caloocan. As one of our requirements in
Immersion subject, we are going to conduct a study entitled “Pre-Enrollment Management
System for Young Achievers’ School of Caloocan Inc.” The objective of the project is: (1) To
develop a pre-enrollment system for all aspiring students at Young Achievers’ School of
Caloocan, (2) To automate the Pre-enrollment process and student’s reference number
generation,
In this regard, we (Group 1) would like to request your participation in the said study. We assure
you that your responses shall only be used for the study and that they shall be kept confidential.
We sincerely pray and hope for your kind and consideration and favorable response.
Respectfully yours
Adrian Badong
Allen Manalo
Jhon Keneth Namias
John Benedict Legaspi
John Carl Meru
Jun Mark Palahang
Kaye Tuazon
Shereen Jeouel Balod
Student Researchers
Noted by:
Page | 63
APPENDIX C
Documentations
Figure 1: The section 1 of the survey form and letter to respondents in Grade 12 Information
and Communication Technologies Students are shown in this image.
Page | 64
Figure 2: The section 2 of the survey form and letter to respondents in Grade 12 Information
and Communication Technologies Students are shown in this image.
Page | 65
Jhon Keneth Namias – Programming
Figure 3: The main programmer and project leader next to the program he makes
“Pre-Enrollment Management System for Young Achievers’ School of Caloocan Inc.”
are shown in this image.
Page | 66
Jhon Keneth Namias – Presenting the system on Grade 11 ICT students
Page | 67
Jhon Keneth Namias – Making Flowchart, System Diagram, and Organizational Chart
Page | 68
Kaye Tuazon - Organization chart
Page | 69
Jun mark Palahang – Contributing on the research paper
Page | 70
Page | 71
Page | 72
Page | 73
Page | 74
Page | 75
Page | 76
Page | 77
Page | 78
Questionnaire
Page | 79
Pre-Enrollment Management System for
Young Achievers’ School of Caloocan Inc.
Sample Answered Questionnaire
Section 1 - System Features
Instructions: The questions below are used to grade system features in order to determine
where they should be improved and developed.
Please mark your response with the following questions
Questions 1 - Very poor 2 - Poor 3 - Average 4 - Above Average 5 - Satisfactory 6 - Highest
Page | 80
Flowchart
Figure 1: Most of the system's features are not depicted in this simplified flowchart.
Page | 81
Login flowchart
Figure 2: Login access is provided for the following users: Admin, Teacher, and Guest, with
the exception of Guest, who cannot enter login information.
Users may access the 'Login Guide' by clicking the help button, which will instruct them on
the process and step-by-step procedures for logging in.
When a user successfully entered into the system, the following information was recorded on
the log: Date of login, Level of access, Time in, Time out, and Remarks.
It was also possible to go to 'Forgot password' and input the user's data to retrieve their own
password with security, and all they needed to do was enter the following: User ID, Name,
Date of Birth, and Place of Birth.
Page | 82
Enrollment Process (Step 1)
Page | 83
Figure 3: Enrollment Process (Step 1) Main step for gathering students’ data. The old student
can only be access by user who has admin access.
Page | 84
Source Code
AboutMe.vb
Public Class AboutMe
Process.Start("https://github.com/PP-Namias")
End Sub
End Sub
End Class
Page | 85
CapturePicture.vb
Imports AForge.Video
Imports AForge.Video.DirectShow
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnStartCamera.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCapture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
Page | 86
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnSavePicture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
End Sub
Try
TeacherData.cmbCapture.Text = ""
StudentEnrollment.cmbEnrollment.Text = ""
EnrollmentData.cmbCapture.Text = ""
ChangeInfo.cmbCapture.Text = ""
End If
'do nothing
Else
gbCamera.Stop()
End If
Page | 87
Catch ex As Exception
End Try
End Sub
Try
gbCamera = camera.VideoDevice
AddHandler gbCamera.NewFrame, New NewFrameEventHandler(AddressOf
Captures)
gbCamera.Start()
End If
Catch ex As Exception
End Try
End Sub
PictureBox2.Image = PictureBox1.Image
TeacherData.PictureID.Image = PictureBox1.Image
EnrollmentData.PictureID.Image = PictureBox1.Image
StudentEnrollment.StudentPic.Image = PictureBox1.Image
ChangeInfo.IDPicture.Image = PictureBox1.Image
End If
Page | 88
End Sub
SaveFileDialog1.DefaultExt = ".jpg"
PictureBox2.Image.Save(SaveFileDialog1.FileName, Imaging.ImageFormat.Jpeg)
End If
End Sub
RoundButtonStartCamera(btnStartCamera)
RoundButtonCapture(btnCapture)
RoundButtonSavePicture(btnSavePicture)
End Sub
End Class
Page | 89
ChangeInfo.vb
Imports System.Data.OleDb
Imports System.IO
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnUpdate.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClear.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Page | 90
Dim Raduis As New Drawing2D.GraphicsPath
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClose.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCapture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnBrowse.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
Page | 91
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnRemove.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
MainForm.Dispose()
End Sub
MainForm.Dispose()
End Sub
Return True
Exit Function
End If
Page | 92
End Function
RoundButtonUpdate(btnUpdate)
RoundButtonClear(btnClear)
RoundButtonClose(btnClose)
RoundButtonCapture(btnCapture)
RoundButtonBrowse(btnBrowse)
RoundButtonRemove(btnRemove)
Try
Dim LoadConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
LoadCommand.CommandText = "select
[TeacherID],[Username],[DateOfBirth],[PlaceOfBirth],[EmailID],[TeacherPic] from
TeacherInfo where TeacherID = '" & LoginForm.txtTeacherUsername.Text & "'"
LoadCommand.Connection = LoadConnection
LoadDataReader = LoadCommand.ExecuteReader
If LoadDataReader.Read Then
txtUserName.Text = LoadDataReader(1).ToString()
dtpDOB.Text = LoadDataReader(2).ToString()
txtPOB.Text = LoadDataReader(3).ToString()
txtEmailID.Text = LCase(LoadDataReader(4)).ToString()
End If
LoadConnection.Close()
Return
End If
Page | 93
LoadCommand.CommandText = "select
[AdminID],[Username],[DateOfBirth],[PlaceOfBirth],[EmailID],[AdminPic] from AdminInfo
where AdminID = '" & LoginForm.txtAdminUsername.Text & "'"
LoadCommand.Connection = LoadConnection
LoadDataReader = LoadCommand.ExecuteReader
If LoadDataReader.Read Then
txtUserName.Text = LoadDataReader(1).ToString()
dtpDOB.Text = LoadDataReader(2).ToString()
txtPOB.Text = LoadDataReader(3).ToString()
txtEmailID.Text = LCase(LoadDataReader(4)).ToString()
End If
LoadConnection.Close()
Return
End If
Catch ex As Exception
End Try
End Sub
txtUserName.Clear()
dtpDOB.Value = Today
txtPOB.Clear()
txtEmailID.Clear()
IDPicture.Image = Image.FromFile(My.Application.Info.DirectoryPath &
"\Image\personal.PNG")
End Sub
Try
Page | 94
'Teacher Data Update
If LoginForm.cmbFormState.Text = "Teacher" Then
'Date of Birth
Dim DOB As New OleDbParameter("@DOB", OleDbType.Date, 25) With {
.Value = dtpDOB.Text.ToString()
}
TeacherCommand.Parameters.Add(DOB)
'Place of Birth
Dim POB As New OleDbParameter("@POB", OleDbType.VarWChar, 100) With {
.Value = txtPOB.Text.ToString()
}
TeacherCommand.Parameters.Add(POB)
'Email ID
Dim EmailID As New OleDbParameter("@EmailID", OleDbType.VarWChar, 100)
With {
.Value = txtEmailID.Text.ToString()
}
TeacherCommand.Parameters.Add(EmailID)
IDPicture.Image.Save(TeacherMemStream, Imaging.ImageFormat.Png)
TeacherDataPic_Update = TeacherMemStream.GetBuffer()
TeacherMemStream.Read(TeacherDataPic_Update, 0,
TeacherMemStream.Length)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
Page | 95
MsgBox("Your data updated successfully.", MsgBoxStyle.Information,
"Data Updated")
MainForm.Dispose()
Close()
Else
End If
End If
' Email ID
Dim EmailID As New OleDbParameter("@EmailID", OleDbType.VarWChar, 100)
With {
.Value = txtEmailID.Text.ToString()
}
AdminCommand.Parameters.Add(EmailID)
IDPicture.Image.Save(AdminMemStream, Imaging.ImageFormat.Png)
AdminDataPic_Update = AdminMemStream.GetBuffer()
Page | 96
AdminMemStream.Read(AdminDataPic_Update, 0, AdminMemStream.Length)
If AdminCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
MainForm.Dispose()
Close()
Else
End If
End If
Catch ex As Exception
End Try
End Sub
End Sub
Try
With OpenFile
.FileName = ""
.Title = "Photo:"
Page | 97
.Filter = "Image files:
(*.jpg)|*.jpg|(*.jpeg)|*.jpeg|(*.png)|*.png|(*.Gif)|*.Gif|(*.bmp)|*.bmp| All Files
(*.*)|*.*"
IDPicture.Image = Image.FromFile(.FileName)
End If
End With
Catch ex As Exception
End Try
End Sub
cmbCapture.Text = "ChangeInfo"
CapturePicture.Show()
End Sub
End Class
Page | 98
ChangePassword.vb
Imports System.Data.OleDb
Imports System.Text
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnUpdate.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClear.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Page | 99
Dim Raduis As New Drawing2D.GraphicsPath
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClose.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
'Encryption
Public Function Encrypt(Encryption As String) As String
End Function
txtOldPass.Focus()
Return True
Exit Function
End If
End Function
txtOldPass.Clear()
TxtNewPass.Clear()
txtConformPass.Clear()
txtOldPass.Focus()
End Sub
Try
Page | 100
Dim okcancel As Integer = MessageBox.Show("Do you really want to update
this record?", "Change Password", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Return
Else
If SelectDataReader.Read Then
Try
' Password
Dim Password As New OleDbParameter("@Password",
OleDbType.VarWChar, 200) With {
.Value = Encrypt(TxtNewPass.Text).ToString
}
TeacherCommand.Parameters.Add(Password)
If TeacherCommand.ExecuteNonQuery() Then
Page | 101
UpdateConnection.Close()
btnClear.PerformClick()
MainForm.Dispose()
Close()
Else
End If
Catch ex As Exception
MessageBox.Show(ex.Message.ToString(), "Password
'UPDATE' error")
Exit Sub
End Try
Else
End If
Else
End If
End If
Return
End If
Page | 102
If SelectDataReader.Read Then
Try
' Password
Dim Password As New OleDbParameter("@Password",
OleDbType.VarWChar, 200) With {
.Value = Encrypt(TxtNewPass.Text).ToString
}
TeacherCommand.Parameters.Add(Password)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
btnClear.PerformClick()
MainForm.Dispose()
Close()
Else
End If
Catch ex As Exception
MessageBox.Show(ex.Message.ToString(), "Password
'UPDATE' error")
Exit Sub
End Try
Page | 103
Else
End If
Else
End If
End If
Return
End If
End If
Catch ex As Exception
End Try
End Sub
MainForm.Dispose()
End Sub
Close()
End Sub
Page | 104
If NotAllowed.IndexOf(e.KeyChar) = -1 = False Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
btnClear.PerformClick()
txtOldPass.Focus()
RoundButtonUpdate(btnUpdate)
RoundButtonClear(btnClear)
Page | 105
RoundButtonClose(btnClose)
End Sub
End Class
Page | 106
EnrollmentData.vb
Imports System.Data.OleDb
Imports System.IO
Public Class EnrollmentData
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Page | 107
Dim Raduis As New Drawing2D.GraphicsPath
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnSave.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCapture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
Page | 108
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnBrowse.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnRemove.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Page | 109
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnGenerateID.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
RoundButtonApprove(btnApprove)
RoundButtonDenied(btnDenied)
RoundButtonSave(btnSave)
RoundButtonDelete(btnDelete)
RoundButtonCapture(btnCapture)
RoundButtonBrowse(btnBrowse)
RoundButtonRemove(btnRemove)
RoundButtonGenerateID(btnGenerateID)
Try
btnApprove.Visible = False
btnGenerateID.Visible = True
Else
btnApprove.Visible = True
btnGenerateID.Visible = False
End If
btnDenied.Visible = False
Else
btnDenied.Visible = True
Page | 110
End If
Catch ex As Exception
End Try
End Sub
EnrollmentDataBindingSource.Sort = AdvancedDataGridView1.SortString
End Sub
EnrollmentDataBindingSource.Filter = AdvancedDataGridView1.FilterString
End Sub
End Sub
Sub SaveData()
Try
Page | 111
ctNumber]=@GuardianContactNumber,[FetcherName]=@FetcherName,[FetcherContactNumber]=@Fet
cherContactNumber,[SiblingsOfStudent1]=@SiblingsOfStudent1,[SiblingsOfStudent2]=@Siblin
gsOfStudent2,[SiblingsOfStudent3]=@SiblingsOfStudent3,[SiblingsOfStudentAge1]=@Siblings
OfStudentAge1,[SiblingsOfStudentAge2]=@SiblingsOfStudentAge2,[SiblingsOfStudentAge3]=@S
iblingsOfStudentAge3,[SiblingsOfStudentSchool1]=@SiblingsOfStudentSchool1,[SiblingsOfSt
udentSchool2]=@SiblingsOfStudentSchool2,[SiblingsOfStudentSchool3]=@SiblingsOfStudentSc
hool3,[SchoolLastAttended1]=@SchoolLastAttended1,[SchoolLastAttended2]=@SchoolLastAtten
ded2,[SchoolLastAttended3]=@SchoolLastAttended3,[AcademicYear1]=@AcademicYear1,[Academi
cYear2]=@AcademicYear2,[AcademicYear3]=@AcademicYear3,[ReasonApplying]=@ReasonApplying,
[Status]=@Status,StudentPicture=@StudentPicture Where (EnrollmentNumber=" &
EnrollmentNumberTextBox1.Text & ")", SaveDataConnection)
' Strand
Dim Strand As New OleDbParameter("@Strand", OleDbType.VarWChar, 100) With {
.Value = StrandTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Strand)
' Semester
Dim Semester As New OleDbParameter("@Semester", OleDbType.VarWChar, 100)
With {
.Value = SemesterTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Semester)
' SchoolYear
Dim SchoolYear As New OleDbParameter("@SchoolYear", OleDbType.VarWChar,
100) With {
.Value = SchoolYearTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(SchoolYear)
' Lastname
Dim Lastname As New OleDbParameter("@Lastname", OleDbType.VarWChar, 100)
With {
.Value = LastnameTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Lastname)
' Firstname
Dim Firstname As New OleDbParameter("@Firstname", OleDbType.VarWChar, 100)
With {
.Value = FirstnameTextBox1.Text.ToString()
}
Page | 112
SaveDataCommand.Parameters.Add(Firstname)
' Middlename
Dim Middlename As New OleDbParameter("@Middlename", OleDbType.VarWChar,
100) With {
.Value = MiddlenameTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Middlename)
' Age
Dim Age As New OleDbParameter("@Age", OleDbType.VarWChar, 100) With {
.Value = AgeTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Age)
' Sex
Dim Sex As New OleDbParameter("@Sex", OleDbType.VarWChar, 100) With {
.Value = SexTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Sex)
' Nationality
Dim Nationality As New OleDbParameter("@Nationality", OleDbType.VarWChar,
100) With {
.Value = NationalityTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Nationality)
' Religion
Dim Religion As New OleDbParameter("@Religion", OleDbType.VarWChar, 100)
With {
.Value = ReligionTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Religion)
' Email
Dim Email As New OleDbParameter("@Email", OleDbType.VarWChar, 100) With {
.Value = EmailTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Email)
Page | 113
SaveDataCommand.Parameters.Add(MobileNumber)
' TelephoneNumber
Dim TelephoneNumber As New OleDbParameter("@TelephoneNumber",
OleDbType.VarWChar, 100) With {
.Value = TelephoneNumberTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(TelephoneNumber)
' Address
Dim Address As New OleDbParameter("@Address", OleDbType.VarWChar, 100) With
{
.Value = AddressTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(Address)
' City
Dim City As New OleDbParameter("@City", OleDbType.VarWChar, 100) With {
.Value = CityTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(City)
Page | 114
Dim MotherName As New OleDbParameter("@MotherName", OleDbType.VarWChar,
100) With {
.Value = MotherNameTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(MotherName)
Page | 115
.Value = GuardianRelationTextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(GuardianRelation)
Page | 116
SaveDataCommand.Parameters.Add(SiblingsOfStudent3)
Page | 117
' School Last Attended 3
Dim SchoolLastAttended3 As New OleDbParameter("@SchoolLastAttended3",
OleDbType.VarWChar, 100) With {
.Value = SchoolLastAttended3TextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(SchoolLastAttended3)
' AcademicYear2
Dim AcademicYear2 As New OleDbParameter("@AcademicYear2",
OleDbType.VarWChar, 100) With {
.Value = AcademicYear2TextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(AcademicYear2)
' AcademicYear3
Dim AcademicYear3 As New OleDbParameter("@AcademicYear3",
OleDbType.VarWChar, 100) With {
.Value = AcademicYear3TextBox1.Text.ToString()
}
SaveDataCommand.Parameters.Add(AcademicYear3)
' Status
Dim Status As New OleDbParameter("@Status", OleDbType.VarWChar, 100) With {
.Value = StatusTextBox.Text.ToString()
}
SaveDataCommand.Parameters.Add(Status)
PictureID.Image.Save(StudentMemStream, Imaging.ImageFormat.Png)
StudentDataPic_Update = StudentMemStream.GetBuffer()
StudentMemStream.Read(StudentDataPic_Update, 0, StudentMemStream.Length)
If SaveDataCommand.ExecuteNonQuery() Then
SaveDataConnection.Close()
Page | 118
MsgBox("Your data updated successfully.", MsgBoxStyle.Information,
"Data Updated")
Else
End If
Catch ex As Exception
End Try
End Sub
Try
' Status
Dim Status As New OleDbParameter("@Status", OleDbType.VarChar, 100) With {
.Value = "enrolled"
}
EnrollmentApproveCommand.Parameters.Add(Status)
Page | 119
EnrollmentApproveCommand.Parameters.Add(StudentNumber)
If EnrollmentApproveCommand.ExecuteNonQuery() Then
EnrollmentApproveConnection.Close()
MsgBox("Student approved successfully.", MsgBoxStyle.Information,
"Student Approved!")
Me.EnrollmentDataTableAdapter.Fill(Me.Pre_enrollmentDataSet.EnrollmentData)
Else
End If
btnApprove.Visible = False
btnGenerateID.Visible = True
Else
btnApprove.Visible = True
btnGenerateID.Visible = False
End If
btnDenied.Visible = False
Else
btnDenied.Visible = True
End If
Catch ex As Exception
End Try
End Sub
SaveData()
Me.EnrollmentDataTableAdapter.Fill(Me.Pre_enrollmentDataSet.EnrollmentData)
End Sub
Page | 120
Private Sub BtnDelete_Click(sender As Object, e As EventArgs) Handles
btnDelete.Click
Try
' do nothing
Else
temp = EnrollmentDeleteCommand.ExecuteNonQuery()
If temp > 0 Then
EnrollmentDeleteConnection.Close()
Me.EnrollmentDataTableAdapter.Fill(Me.Pre_enrollmentDataSet.EnrollmentData)
Else
End If
End If
Else
Page | 121
End If
Catch ex As Exception
End Try
End Sub
cmbCapture.Text = "EnrollmentData"
CapturePicture.Show()
End Sub
Try
With OpenFile
.FileName = ""
.Title = "Photo:"
.Filter = "Image files:
(*.jpg)|*.jpg|(*.jpeg)|*.jpeg|(*.png)|*.png|(*.Gif)|*.Gif|(*.bmp)|*.bmp| All Files
(*.*)|*.*"
PictureID.Image = Image.FromFile(.FileName)
End If
End With
Catch ex As Exception
End Try
End Sub
End Sub
Page | 122
Private Sub AdvancedDataGridView1_CellClick(sender As Object, e As
DataGridViewCellEventArgs) Handles AdvancedDataGridView1.CellClick
Try
btnApprove.Visible = False
btnGenerateID.Visible = True
Else
btnApprove.Visible = True
btnGenerateID.Visible = False
End If
btnDenied.Visible = False
Else
btnDenied.Visible = True
End If
Catch ex As Exception
End Try
End Sub
btnApprove.PerformClick()
End If
End Sub
Try
Page | 123
Dim EnrollmentDeniedConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
' Status
Dim Status As New OleDbParameter("@Status", OleDbType.VarChar, 100) With {
.Value = "denied"
}
EnrollmentDeniedCommand.Parameters.Add(Status)
If EnrollmentDeniedCommand.ExecuteNonQuery() Then
EnrollmentDeniedConnection.Close()
Me.EnrollmentDataTableAdapter.Fill(Me.Pre_enrollmentDataSet.EnrollmentData)
Else
End If
btnApprove.Visible = False
btnGenerateID.Visible = True
Else
btnApprove.Visible = True
btnGenerateID.Visible = False
End If
Page | 124
btnDenied.Visible = False
Else
btnDenied.Visible = True
End If
Catch ex As Exception
End Try
End Sub
cmbStudentNum.Text = AdvancedDataGridView1.CurrentRow.Cells(4).Value.ToString
GenarateID.Show()
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 125
Private Sub GradeLevelTextBox1_KeyPress(sender As Object, e As KeyPressEventArgs)
Handles GradeLevelTextBox1.KeyPress
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
Page | 126
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 127
Private Sub AgeTextBox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles
AgeTextBox1.KeyPress
e.Handled = True
End If
End If
End Sub
'Allowed all
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 128
'Allowed Numbers only
If Asc(e.KeyChar) <> 8 Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
Page | 129
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 130
Private Sub FatherNameTextBox1_KeyPress(sender As Object, e As KeyPressEventArgs)
Handles FatherNameTextBox1.KeyPress
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 131
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 132
Private Sub MotherEmailTextBox1_KeyPress(sender As Object, e As KeyPressEventArgs)
Handles MotherEmailTextBox1.KeyPress
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 133
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 134
Private Sub GuardianWorkAddressTextBox1_KeyPress(sender As Object, e As
KeyPressEventArgs) Handles GuardianWorkAddressTextBox1.KeyPress
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 135
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
Page | 136
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 137
If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
Page | 138
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 139
'Allowed Numbers and "-" only
If Asc(e.KeyChar) <> 8 And Asc(e.KeyChar) <> 45 Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
Page | 140
End If
End Sub
e.Handled = True
End If
End If
End Sub
'Allowed all
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
Page | 141
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
End Class
Page | 142
ForgotPassword.vb
Imports System.Data.OleDb
Imports System.Text
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCheck.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClear.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Page | 143
Dim Raduis As New Drawing2D.GraphicsPath
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClose.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Close()
End Sub
Dispose()
LoginForm.Show()
End Sub
Dispose()
LoginForm.Show()
End Sub
Sub Clear()
txtUserName.Clear()
dtpDOB.Value = Today
txtPOB.Clear()
txtUserID.Clear()
End Sub
Private Function RequiredEntry() As Boolean
Return True
Exit Function
Page | 144
End If
End Function
Try
If TeacherDataReader.Read Then
Else
End If
Else
Page | 145
End If
End If
AdminCommand.CommandText = "select
[AdminID],[Username],[DateOfBirth],[PlaceOfBirth],[Password] from AdminInfo where
AdminID = '" & txtUserID.Text & "'"
AdminCommand.Connection = AdminConnection
AdminDataReader = AdminCommand.ExecuteReader
If AdminDataReader.Read Then
Else
End If
Else
End If
End If
Catch ex As Exception
Page | 146
End Try
End Sub
'Decryption
Public Function Decrypt(Decryption As String) As String
End Function
RoundButtonCheck(btnCheck)
RoundButtonClear(btnClear)
RoundButtonClose(btnClose)
dtpDOB.Value = Today
End Sub
End Class
Page | 147
GenarateID.vb
Imports System.Data.OleDb
Imports System.IO
Sub FillDataID()
Try
Dim FillDataIDConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
My.Application.Info.DirectoryPath.ToString() & "\BackUp\Database.Accdb;Persist Security
Info=False;")
If FillDataIDConnection.State = ConnectionState.Open Then
FillDataIDConnection.Close()
FillDataIDConnection.Open()
FillDataIDDataReader = FillDataIDCommand.ExecuteReader
If FillDataIDDataReader.Read Then
Dim x As Byte() = FillDataIDDataReader(0)
Dim ms As New MemoryStream(x)
PicID.Image = Image.FromStream(ms)
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 148
StudentNumber.Text = "'" &
UCase(FillDataIDDataReader(1)).ToString() & "'"
NameID.Text = UCase(FillDataIDDataReader(2)).ToString() & " " &
UCase(FillDataIDDataReader(3)).ToString().Substring(0, 1) & ". " &
UCase(FillDataIDDataReader(4)).ToString()
GradeID.Text = "Grade: " & strGrade
'LRN.Text = "LRN: " & UCase(FillDataIDDataReader(7)).ToString()
SY.Text = Date.Today.Year & " - " & (Date.Today.Year + 1)
PersonEmergency.Text = UCase(FillDataIDDataReader(8)).ToString()
FetcherName.Text = UCase(FillDataIDDataReader(9)).ToString()
FetcherContact.Text = UCase(FillDataIDDataReader(10)).ToString()
Address.Text = UCase(FillDataIDDataReader(11)).ToString()
City.Text = UCase(FillDataIDDataReader(12)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 149
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 150
GradeID.Text = "Grade: " & strGrade
'LRN.Text = "LRN: " & UCase(FillDataIDDataReader(7)).ToString()
SY.Text = Date.Today.Year & " - " & (Date.Today.Year + 1)
PersonEmergency.Text = UCase(FillDataIDDataReader(8)).ToString()
FetcherName.Text = UCase(FillDataIDDataReader(9)).ToString()
FetcherContact.Text = UCase(FillDataIDDataReader(10)).ToString()
Address.Text = UCase(FillDataIDDataReader(11)).ToString()
City.Text = UCase(FillDataIDDataReader(12)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 151
ElseIf UCase(FillDataIDDataReader(5)).ToString() = "GRADE 7 - JUNIOR
HIGH SCHOOL" Then
strGrade = "Grade 7"
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 152
Address.Text = UCase(FillDataIDDataReader(11)).ToString()
City.Text = UCase(FillDataIDDataReader(12)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 153
ElseIf UCase(FillDataIDDataReader(6)).ToString() = "ACADEMIC -
GENERAL ACADEMIC STRAND (GAS)" Then
strStrand = "GAS"
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 154
'LRN.Text = "LRN: " & UCase(FillDataIDDataReader(7)).ToString()
SY.Text = Date.Today.Year & " - " & (Date.Today.Year + 1)
PersonEmergency.Text =
UCase(FillDataIDDataReader(8)).ToString()
FetcherName.Text = UCase(FillDataIDDataReader(9)).ToString()
FetcherContact.Text =
UCase(FillDataIDDataReader(10)).ToString()
Address.Text = UCase(FillDataIDDataReader(11)).ToString()
City.Text = UCase(FillDataIDDataReader(12)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 155
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Else
strStrand = ""
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
End If
Page | 156
If UCase(FillDataIDDataReader(6)).ToString() = "ACADEMIC -
ACCOUNTANCY, BUSINESS AND MANAGEMENT (ABM)" Then
strStrand = "ABM"
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 157
'LRN.Text = "LRN: " & UCase(FillDataIDDataReader(7)).ToString()
SY.Text = Date.Today.Year & " - " & (Date.Today.Year + 1)
PersonEmergency.Text =
UCase(FillDataIDDataReader(8)).ToString()
FetcherName.Text = UCase(FillDataIDDataReader(9)).ToString()
FetcherContact.Text =
UCase(FillDataIDDataReader(10)).ToString()
Address.Text = UCase(FillDataIDDataReader(11)).ToString()
City.Text = UCase(FillDataIDDataReader(12)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Page | 158
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
Else
strStrand = ""
Page | 159
StudentNumber.Text = "'" &
UCase(FillDataIDDataReader(1)).ToString() & "'"
NameID.Text = UCase(FillDataIDDataReader(2)).ToString() & " " &
UCase(FillDataIDDataReader(3)).ToString().Substring(0, 1) & ". " &
UCase(FillDataIDDataReader(4)).ToString()
GradeID.Text = "Grade: " & strGrade & " " & strStrand
'LRN.Text = "LRN: " & UCase(FillDataIDDataReader(7)).ToString()
SY.Text = Date.Today.Year & " - " & (Date.Today.Year + 1)
PersonEmergency.Text =
UCase(FillDataIDDataReader(7)).ToString()
FetcherName.Text = UCase(FillDataIDDataReader(8)).ToString()
FetcherContact.Text = UCase(FillDataIDDataReader(9)).ToString()
Address.Text = UCase(FillDataIDDataReader(10)).ToString()
City.Text = UCase(FillDataIDDataReader(11)).ToString()
FillDataIDConnection.Close()
FillDataIDDataReader.Close()
Return
End If
End If
End If
Catch ex As Exception
End Try
Try
If RegistrarDataReader.Read Then
Page | 160
PicSignature.Image = Image.FromStream(ms)
End If
Catch ex As Exception
End Try
End Sub
FillDataID()
PrintID.Show()
End Sub
End Class
Page | 161
LoginForm.vb
Imports System.Data.OleDb
Imports System.Text
obj.FormBorderStyle = FormBorderStyle.None
End Sub
If Len(Trim(txtAdminUsername.Text)) = 0 Then
End If
If Len(Trim(txtAdminPassword.Text)) = 0 Then
End If
Try
Page | 162
Dim AdminConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
' UserName
Dim AdminUsername As New OleDbParameter("@AdminID", OleDbType.VarWChar, 45)
With {
.Value = txtAdminUsername.Text.ToString()
}
AdminCommand.Parameters.Add(AdminUsername)
AdminCommand.Connection = AdminConnection
AdminDataReader = AdminCommand.ExecuteReader
If AdminDataReader.Read Then
AdminConnection.Close()
AdminForgetPassword.Visible = True
txtAdminPassword.Focus()
Return
Else
Try
AdminConnection.Close()
Page | 163
NameCommand.CommandText = "SELECT [UserName],[Status] FROM
AdminInfo WHERE AdminID = '" & txtAdminUsername.Text & "'"
NameCommand.Connection = NameConnection
NameDataReader = NameCommand.ExecuteReader
If NameDataReader.Read Then
txtUsername.Text = NameDataReader("UserName").ToString
txtPosition.Text = NameDataReader("Status").ToString
AdminConnection.Close()
Try
dtpLoginDate.Value = Now
txtTimeIn.Text = Format(Now, "h:mm:ss tt")
If LogCommand.ExecuteNonQuery() Then
LogConnection.Close()
cmbFormState.Text = "Admin"
Else
End If
Catch ex As Exception
Page | 164
End Try
End If
NameConnection.Close()
NameDataReader.Close()
Return
Catch ex As Exception
End Try
End If
Else
txtAdminUsername.Focus()
Return
End If
Catch ex As Exception
End Try
End Sub
'Teachers
Private Sub BtnTeacherLogin_Click(sender As Object, e As EventArgs) Handles
btnTeacherLogin.Click
If Len(Trim(txtTeacherUsername.Text)) = 0 Then
End If
If Len(Trim(txtTeacherPassword.Text)) = 0 Then
Page | 165
Exit Sub
End If
Try
' Username
Dim TeacherUsername As New OleDbParameter("@TeacherID", OleDbType.VarWChar,
45) With {
.Value = txtTeacherUsername.Text.ToString()
}
TeacherCommand.Parameters.Add(TeacherUsername)
TeacherCommand.Connection = TeacherConnection
TeacherDataReader = TeacherCommand.ExecuteReader
If TeacherDataReader.Read Then
TeacherConnection.Close()
TeacherForgetPassword.Visible = True
txtTeacherPassword.Focus()
Return
Else
Try
Page | 166
If NameConnection.State = ConnectionState.Open Then
NameConnection.Close()
NameConnection.Open()
If NameDataReader.Read Then
txtUsername.Text = NameDataReader("UserName")
txtPosition.Text = "Teacher"
Try
dtpLoginDate.Value = Now
txtTimeIn.Text = Format(Now, "h:mm:ss tt")
If LogCommand.ExecuteNonQuery() Then
LogConnection.Close()
cmbFormState.Text = "Teacher"
Else
End If
Catch ex As Exception
Page | 167
Exit Sub
End Try
End If
NameConnection.Close()
NameDataReader.Close()
Return
Catch ex As Exception
End Try
End If
Else
TeacherConnection.Close()
txtTeacherUsername.Focus()
Return
End If
Catch ex As Exception
End Try
End Sub
'Guest
Private Sub BtnEnterAsGuest_Click(sender As Object, e As EventArgs) Handles
btnEnterAsGuest.Click
txtUsername.Text = "Guest"
txtPosition.Text = "Guest"
Try
dtpLoginDate.Value = Now
txtTimeIn.Text = Format(Now, "h:mm:ss tt")
Page | 168
If LogConnection.State = ConnectionState.Open Then LogConnection.Close()
LogConnection.Open()
If LogCommand.ExecuteNonQuery() Then
LogConnection.Close()
cmbFormState.Text = "Guest"
Else
End If
Catch ex As Exception
End Try
End Sub
'Admin Cancel
Private Sub BtnAdminCancel_Click(sender As Object, e As EventArgs) Handles
btnAdminCancel.Click
End
End Sub
'Teacher Cancel
Private Sub BtnTeacherCancel_Click(sender As Object, e As EventArgs) Handles
btnTeacherCancel.Click
End
End Sub
Page | 169
Hide()
txtAdminUsername.Text = ""
txtAdminPassword.Text = ""
txtTeacherUsername.Text = ""
txtTeacherPassword.Text = ""
AdminForgetPassword.Visible = False
TeacherForgetPassword.Visible = False
cmbFormState.Text = "Admin"
ForgotPassword.Show()
End Sub
Hide()
txtAdminUsername.Text = ""
txtAdminPassword.Text = ""
txtTeacherUsername.Text = ""
txtTeacherPassword.Text = ""
AdminForgetPassword.Visible = False
TeacherForgetPassword.Visible = False
cmbFormState.Text = "Teacher"
ForgotPassword.Show()
End Sub
End
End Sub
e.Handled = True
End If
End If
Page | 170
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
txtAdminUsername.Text = ""
txtAdminPassword.Text = ""
txtTeacherUsername.Text = ""
txtTeacherPassword.Text = ""
Page | 171
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 18)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnEnterAsGuest.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnAdminLogin.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Page | 172
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnAdminCancel.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnTeacherLogin.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnTeacherCancel.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Page | 173
Private Sub LoginForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
RoundCorners(Me)
RoundButtonAdminLogin(btnAdminLogin)
RoundButtonAdminCancel(btnAdminCancel)
RoundButtonTeacherLogin(btnTeacherLogin)
RoundButtonTeacherCancel(btnTeacherCancel)
RoundButtonGuest(btnEnterAsGuest)
End Sub
LoginGuide.Show()
picHelp1.Visible = False
picHelp2.Visible = False
picHelp3.Visible = False
End Sub
LoginGuide.Show()
picHelp1.Visible = False
picHelp2.Visible = False
picHelp3.Visible = False
End Sub
LoginGuide.Show()
picHelp1.Visible = False
picHelp2.Visible = False
picHelp3.Visible = False
End Sub
'Encryption
Public Function Encrypt(Encryption As String) As String
End Function
'Decryption
Public Function Decrypt(Decryption As String) As String
Page | 174
Dim encodedtext As New UTF8Encoding
Dim decode As Decoder = encodedtext.GetDecoder
Dim code_byte As Byte() = Convert.FromBase64String(Decryption)
Dim charcount As Integer = decode.GetCharCount(code_byte, 0, code_byte.Length)
Dim decode_char As Char() = New Char(charcount - 1) {}
decode.GetChars(code_byte, 0, code_byte.Length, decode_char, 0)
Dim decryptext As New String(decode_char)
Return decryptext
End Function
End Class
Page | 175
LoginGuide.vb
Imports System.ComponentModel
End Sub
LoginForm.picHelp1.Visible = True
LoginForm.picHelp2.Visible = True
LoginForm.picHelp3.Visible = True
End Sub
End Class
Page | 176
LoginHistory.vb
Imports System.Data.OleDb
Imports Microsoft.Office.Interop
Sub Clear()
LogIDTextBox.Text = ""
UsernameTextBox.Text = ""
PositionTextBox.Text = ""
LoginDateDateTimePicker.Value = Now
TimeInTextBox.Text = ""
TimeOutTextBox.Text = ""
RemarkTextBox.Text = ""
End Sub
Try
cmd.CommandText = sSQL
da.SelectCommand = cmd
da.Fill(dt)
DataGridView1.DataSource = dt
If dt.Rows.Count = 0 Then
Else
End If
Catch ex As Exception
MsgBox(ErrorToString)
Finally
conn.Close()
Page | 177
End Try
End Function
Sub FilterLogs()
If rdoAllDates.Checked Then
MonthCalendar1.Enabled = False
PanelSearchUsername.Visible = False
Clear()
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Catch ex As Exception
Page | 178
End Try
End If
MonthCalendar1.Enabled = True
PanelSearchUsername.Visible = False
Clear()
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Catch ex As Exception
Page | 179
Exit Sub
End Try
End If
txtSearchUsername.Focus()
MonthCalendar1.Enabled = False
PanelSearchUsername.Visible = True
Clear()
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Catch ex As Exception
Page | 180
MessageBox.Show(ex.Message.ToString(), "Failed to Load 'Login
Data'")
Exit Sub
End Try
End If
End If
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
End Sub
Page | 181
Private Sub LogHistoryBindingNavigatorSaveItem_Click(sender As Object, e As
EventArgs) Handles LogHistoryBindingNavigatorSaveItem.Click
Me.Validate()
Me.LogHistoryBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me._Pre_enrollmentDataSet1)
End Sub
MonthCalendar1.TodayDate = Now
MonthCalendar1.MaxDate = Now
RoundButtonDeleteAll(btnDeleteAll)
RoundButtonExport(btnExport)
Clear()
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Page | 182
Catch ex As Exception
End Try
End If
SearchUsernameColumn.Add(SearchUsernameDataSet.Tables(0).Rows(j)("Username").ToString()
)
Next
txtSearchUsername.AutoCompleteSource = AutoCompleteSource.CustomSource
txtSearchUsername.AutoCompleteCustomSource = SearchUsernameColumn
txtSearchUsername.AutoCompleteMode = AutoCompleteMode.SuggestAppend
End Sub
If rdoSelectedDates.Checked Then
End If
End Sub
Page | 183
If DataGridView1.CurrentRow Is Nothing Then
Clear()
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Catch ex As Exception
End Try
End If
End Sub
End Sub
Page | 184
Private Sub RdoAllDates_CheckedChanged(sender As Object, e As EventArgs) Handles
rdoAllDates.CheckedChanged
FilterLogs()
End Sub
FilterLogs()
End Sub
FilterLogs()
txtSearchUsername.Text = ""
End Sub
Exit Sub
End If
Try
rowsTotal = DataGridView1.RowCount
colsTotal = DataGridView1.Columns.Count - 1
With excelWorksheet
.Cells.Select()
Page | 185
.Cells.Delete()
For iC = 0 To colsTotal
Next
For I = 0 To rowsTotal - 1
For j = 0 To colsTotal
.Cells(I + 2, j + 1).value =
DataGridView1.Rows(I).Cells(j).Value
Next j
Next I
.Rows("1:1").Font.FontStyle = "Bold"
.Rows("1:1").Font.Size = 12
.Cells.Columns.AutoFit()
.Cells.Select()
.Cells.EntireColumn.AutoFit()
.Cells(1, 1).Select()
End With
Catch ex As Exception
Finally
Cursor.Current = Cursors.Default
xlApp = Nothing
End Try
End Sub
Try
conn.Open()
Page | 186
Dim command As New OleDbCommand("DELETE * from LogHistory",
conn)
command.ExecuteNonQuery()
command.Dispose()
conn.Close()
End Using
End If
End If
Catch ex As Exception
End Try
End Sub
Try
LogIDTextBox.BackColor = Color.White
UsernameTextBox.BackColor = Color.White
PositionTextBox.BackColor = Color.White
LoginDateDateTimePicker.BackColor = Color.White
TimeInTextBox.BackColor = Color.White
TimeOutTextBox.BackColor = Color.White
RemarkTextBox.BackColor = Color.White
Page | 187
Catch ex As Exception
End Try
End Sub
e.Handled = True
End If
End If
End Sub
LoginHistoryGuide.Show()
picHelp1.Visible = False
End Sub
End Class
Page | 188
LoginHistoryGuide.vb
Imports System.ComponentModel
End Sub
LoginHistory.picHelp1.Visible = True
End Sub
End Sub
End Class
Page | 189
MainForm.vb
Imports System.Data.OleDb
Imports System.IO
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnStatus.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnEnrollmentPortal.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Page | 190
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnEnrollmentDatabase.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnTeacherDatabase.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Page | 191
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnPrintID.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnLoginHistory.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnAboutMe.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Page | 192
Public Sub UserData()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
End Sub
TimeToolStripStatusLabel.Text = Now.ToLongTimeString.ToString()
TimeToolStripStatusLabel.ForeColor = Color.White
End Sub
LoginForm.txtAdminUsername.Text = ""
LoginForm.txtAdminPassword.Text = ""
LoginForm.txtTeacherUsername.Text = ""
LoginForm.txtTeacherPassword.Text = ""
Dispose()
LoginForm.Show()
Return
End If
Page | 193
Try
'Admin
If LoginForm.cmbFormState.Text = "Admin" Then
DatabaseDataReader = DatabaseCommand.ExecuteReader
If DatabaseDataReader.Read Then
Dim intResponse As Integer
intResponse = MessageBox.Show("Do you really want to logout?",
"Response", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If intResponse = MsgBoxResult.No Then
e.Cancel = True
' Exit Sub
Else
MsgBox("Thank you!! " &
DatabaseDataReader("Username").ToString() & vbNewLine & "" & vbNewLine & " God Bless
U...", MsgBoxStyle.Information, "Thank you...")
DatabaseConnection.Close()
Try
' TimeOut
Dim TimeOut As New OleDbParameter("@TimeOut",
OleDbType.VarWChar, 50) With {
.Value = txtTimeOut.Text.ToString()
}
TeacherCommand.Parameters.Add(TimeOut)
Page | 194
' Remark
Dim Remark As New OleDbParameter("@Remark",
OleDbType.VarWChar, 50) With {
.Value = txtRemark.Text.ToString()
}
TeacherCommand.Parameters.Add(Remark)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
Dispose()
LoginForm.Show()
LoginForm.txtAdminUsername.Text = ""
LoginForm.txtAdminPassword.Text = ""
LoginForm.txtTeacherUsername.Text = ""
LoginForm.txtTeacherPassword.Text = ""
Else
End If
Catch ex As Exception
End Try
End If
End If
End If
'Teacher
If LoginForm.cmbFormState.Text = "Teacher" Then
DatabaseDataReader = DatabaseCommand.ExecuteReader
If DatabaseDataReader.Read Then
Page | 195
e.Cancel = True
' Exit Sub
Else
Try
' TimeOut
Dim TimeOut As New OleDbParameter("@TimeOut",
OleDbType.VarWChar, 50) With {
.Value = txtTimeOut.Text.ToString()
}
TeacherCommand.Parameters.Add(TimeOut)
' Remark
Dim Remark As New OleDbParameter("@Remark",
OleDbType.VarWChar, 50) With {
.Value = txtRemark.Text.ToString()
}
TeacherCommand.Parameters.Add(Remark)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
Dispose()
LoginForm.Show()
LoginForm.txtAdminUsername.Text = ""
LoginForm.txtAdminPassword.Text = ""
LoginForm.txtTeacherUsername.Text = ""
LoginForm.txtTeacherPassword.Text = ""
Else
Page | 196
evidence" & vbNewLine & vbNewLine & "but if your guest please ignore.",
MsgBoxStyle.Critical, "Log Failed")
Return
End If
Catch ex As Exception
End Try
End If
End If
End If
'Guest
If LoginForm.cmbFormState.Text = "Guest" Then
Dim intResponse As Integer
intResponse = MessageBox.Show("Do you really want to logout? ",
"Response", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
If intResponse = MsgBoxResult.No Then
e.Cancel = True
Exit Sub
Else
MsgBox("Thank you, God Bless...", MsgBoxStyle.Information, "God
Bless U...")
DatabaseConnection.Close()
Try
' TimeOut
Dim TimeOut As New OleDbParameter("@TimeOut",
OleDbType.VarWChar, 50) With {
.Value = txtTimeOut.Text.ToString()
}
TeacherCommand.Parameters.Add(TimeOut)
Page | 197
' Remark
Dim Remark As New OleDbParameter("@Remark", OleDbType.VarWChar,
50) With {
.Value = txtRemark.Text.ToString()
}
TeacherCommand.Parameters.Add(Remark)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
Dispose()
LoginForm.Show()
LoginForm.txtAdminUsername.Text = ""
LoginForm.txtAdminPassword.Text = ""
LoginForm.txtTeacherUsername.Text = ""
LoginForm.txtTeacherPassword.Text = ""
Else
End If
Catch ex As Exception
End Try
End If
End If
Catch ex As Exception
End Try
End Sub
RoundButton(btnStatus)
RoundButtonEnrollmentPortal(btnEnrollmentPortal)
RoundButtonEnrollmentDatabase(btnEnrollmentDatabase)
RoundButtonTeacherDatabase(btnTeacherDatabase)
RoundButtonPrintID(btnPrintID)
RoundButtonLoginHistory(btnLoginHistory)
RoundButtonAboutMe(btnAboutMe)
Page | 198
txtTimeOut.Text = Format(Now, "h:mm:ss tt")
Try
btnTeacherDatabase.Visible = False
TeacherDatabaseToolStripMenuItem.Visible = False
SchoolDatabaseToolStripMenuItem.Visible = False
btnPrintID.Visible = True
AdminToolStripMenuItem1.Visible = True
btnEnrollmentDatabase.Visible = True
btnPrintID.Visible = False
btnLoginHistory.Visible = False
AdminToolStripMenuItem1.Visible = True
TeacherToolStripMenuItem2.Visible = False
GuestToolStripMenuItem3.Visible = False
UsernameToolStripStatusLabel.ForeColor = Color.DarkRed
TimeToolStripStatusLabel.ForeColor = Color.DarkRed
End If
Page | 199
btnTeacherDatabase.Visible = True
TeacherDatabaseToolStripMenuItem.Visible = True
SchoolDatabaseToolStripMenuItem.Visible = True
btnPrintID.Visible = True
AdminToolStripMenuItem1.Visible = True
btnEnrollmentDatabase.Visible = True
btnPrintID.Visible = True
btnLoginHistory.Visible = True
AdminToolStripMenuItem1.Visible = True
TeacherToolStripMenuItem2.Visible = False
GuestToolStripMenuItem3.Visible = False
UsernameToolStripStatusLabel.ForeColor = Color.Purple
TimeToolStripStatusLabel.ForeColor = Color.Purple
End If
End If
AdminConnection.Close()
AdminDataReader.Close()
Return
End If
'Teachers
If LoginForm.cmbFormState.Text = "Teacher" Then
TeacherDataReader = TeacherCommand.ExecuteReader
If TeacherDataReader.Read Then
Username.Text = TeacherDataReader(1).ToString()
UsernameToolStripStatusLabel.Text = TeacherDataReader(1).ToString()
btnStatus.Text = "Teacher"
btnStatus.Enabled = True
Page | 200
AdministratorToolStripMenuItem.Visible = False
AdminToolStripMenuItem1.Visible = False
TeacherToolStripMenuItem2.Visible = True
GuestToolStripMenuItem3.Visible = False
btnTeacherDatabase.Visible = False
btnEnrollmentDatabase.Visible = False
btnPrintID.Visible = False
btnLoginHistory.Visible = False
UsernameToolStripStatusLabel.ForeColor = Color.Green
TimeToolStripStatusLabel.ForeColor = Color.Green
End If
TeacherConnection.Close()
TeacherDataReader.Close()
Return
End If
'Guest
If LoginForm.cmbFormState.Text = "Guest" Then
Username.Text = "Guest"
btnStatus.Text = "Guest"
btnStatus.Enabled = False
btnStatus.ForeColor = Color.White
AdministratorToolStripMenuItem.Visible = False
btnTeacherDatabase.Visible = False
btnEnrollmentDatabase.Visible = False
btnPrintID.Visible = False
btnLoginHistory.Visible = False
AdminToolStripMenuItem1.Visible = False
TeacherToolStripMenuItem2.Visible = False
GuestToolStripMenuItem3.Visible = True
UsernameToolStripStatusLabel.ForeColor = Color.Black
TimeToolStripStatusLabel.ForeColor = Color.Black
End If
Catch ex As Exception
End Try
End Sub
Close()
Page | 201
End Sub
WindowState = FormWindowState.Minimized
End Sub
StudentEnrollment.Show()
End Sub
Private Sub BtnStatus_Click(sender As Object, e As EventArgs) Handles
btnStatus.Click
UserData()
End Sub
StudentEnrollment.Show()
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
Page | 202
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New TeacherData())
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
Page | 203
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New EnrollmentData())
End Sub
GenarateID.Show()
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
Page | 204
Dim newmdichild As New EnrollmentData With {
.MdiParent = Me
}
newmdichild.Show()
OpenChildForm(New EnrollmentData())
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New TeacherData())
End Sub
Page | 205
Private Sub EnrollmentPortalToolStripMenuItem1_Click(sender As Object, e As
EventArgs) Handles EnrollmentPortalToolStripMenuItem1.Click
StudentEnrollment.Show()
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New EnrollmentData())
End Sub
Page | 206
Private Sub TeacherDatabaseToolStripMenuItem_Click(sender As Object, e As
EventArgs) Handles TeacherDatabaseToolStripMenuItem.Click
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New TeacherData())
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
Page | 207
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New AboutMe())
End Sub
UserInfo.Hide()
GenarateID.Hide()
PrintID.Hide()
TeacherData.Hide()
StudentEnrollment.Hide()
StudentSubject.Hide()
StudentRequirements.Hide()
StudentRegistered.Hide()
AboutMe.Hide()
LoginHistory.Hide()
UserInfo.Dispose()
GenarateID.Dispose()
PrintID.Dispose()
Page | 208
TeacherData.Dispose()
StudentEnrollment.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
AboutMe.Dispose()
LoginHistory.Dispose()
AboutMe.Dispose()
CapturePicture.Dispose()
ChangeInfo.Dispose()
ChangePassword.Dispose()
ForgotPassword.Dispose()
GenarateID.Dispose()
LoginGuide.Dispose()
PrintID.Dispose()
StudentEnrollment.Dispose()
StudentEnrollmentGuide.Dispose()
StudentSubject.Dispose()
StudentRequirements.Dispose()
StudentRegistered.Dispose()
TeacherDataGuide.Dispose()
UserInfo.Dispose()
OpenChildForm(New LoginHistory())
End Sub
GenarateID.Show()
End Sub
StudentEnrollment.Show()
End Sub
StudentEnrollment.Show()
End Sub
End Class
Page | 209
PrintID.vb
Public Class PrintID
PrintDialog1.Document = PrintDocument1
PrintDialog1.PrinterSettings = PrintDocument1.PrinterSettings
PrintDialog1.AllowSomePages = True
PrintDocument1.PrinterSettings = PrintDialog1.PrinterSettings
PrintDocument1.Print()
End If
End Sub
End Sub
End Class
Page | 210
StudentEnrollment.vb
Imports System.Data.OleDb
Imports System.IO
End Sub
StudentRequirements.Hide()
StudentRegistered.Hide()
OpenChildForm(New StudentSubject())
End Sub
StudentSubject.Dispose()
StudentRegistered.Dispose()
OpenChildForm(New StudentRequirements())
End Sub
StudentSubject.Dispose()
StudentRequirements.Dispose()
Page | 211
newmdichild.Show()
OpenChildForm(New StudentRegistered())
End Sub
pnlOldStudent.Visible = True
Else
pnlOldStudent.Visible = False
txtStudentNumber.Text = ""
btnNext.Text = "Next"
btnNext.BackColor = Color.Blue
Clear()
cmbGradeLevel.Enabled = True
cmbStrand.Enabled = True
cmbSemester.Enabled = True
cmbSchoolYear.Enabled = True
txtLastname.Enabled = True
txtFirstname.Enabled = True
txtMiddlename.Enabled = True
txtAge.Enabled = True
dtpDOB.Enabled = True
rdoMale.Enabled = True
rdoFemale.Enabled = True
txtPOB.Enabled = True
txtNationality.Enabled = True
txtReligion.Enabled = True
txtMobileNo.Enabled = True
txtStudentAddress1.Enabled = True
txtStudentAddress2.Enabled = True
txtFatherName.Enabled = True
txtMotherName.Enabled = True
rdoFather.Enabled = True
rdoMother.Enabled = True
rdoOthers.Enabled = True
txtGuardianName.Enabled = True
txtGuardianContactNo.Enabled = True
rdoMale.Checked = True
rdoFather.Checked = True
End If
End Sub
Page | 212
pnlSHS.Visible = True
Else
pnlSHS.Visible = False
End If
End Sub
Try
If Len(Trim(txtStudentNumber.Text)) = 0 Then
End If
End If
If Len(Trim(cmbStrand.Text)) = 0 Then
End If
End If
End If
If (Len(Trim(cmbStatus.Text)) Or Len(Trim(cmbGradeLevel.Text)) Or
Len(Trim(cmbSchoolYear.Text)) Or Len(Trim(txtLastname.Text)) Or
Len(Trim(txtFirstname.Text)) Or Len(Trim(txtAge.Text)) Or Len(Trim(txtPOB.Text)) Or
Page | 213
Len(Trim(txtNationality.Text)) Or Len(Trim(txtReligion.Text)) Or
Len(Trim(txtMobileNo.Text)) Or Len(Trim(txtStudentAddress1.Text)) Or
Len(Trim(txtStudentAddress2.Text)) Or Len(Trim(txtFatherName.Text)) Or
Len(Trim(txtMotherName.Text)) Or Len(Trim(txtGuardianName.Text)) Or
Len(Trim(txtGuardianContactNo.Text))) = 0 Then
End If
Catch ex As Exception
End Try
End Function
Sub Clear()
txtEnrollmentNo.Text = ""
pnlOldStudent.Visible = False
pnlSHS.Visible = False
txtStudentNumber.Text = ""
cmbStatus.Text = ""
cmbStatus.Text = "New Student"
cmbGradeLevel.Text = ""
cmbGradeLevel.Text = "Nursery - Pre-School"
cmbStrand.Text = ""
cmbSemester.Text = ""
txtLastname.Text = ""
txtFirstname.Text = ""
txtMiddlename.Text = ""
txtAge.Text = ""
rdoMale.Checked = False
rdoFemale.Checked = False
txtPOB.Text = ""
txtNationality.Text = ""
txtReligion.Text = ""
txtEmail.Text = ""
txtMobileNo.Text = ""
txtTelephoneNo.Text = ""
txtStudentAddress1.Text = ""
txtStudentAddress2.Text = ""
StudentPic.Image = Image.FromFile(My.Application.Info.DirectoryPath &
"\Image\personal.png")
txtFatherName.Text = ""
txtFatherOccupation.Text = ""
txtFatherEmail.Text = ""
txtFatherWorkAddress.Text = ""
txtFatherContactNo.Text = ""
txtMotherName.Text = ""
txtMotherOccupation.Text = ""
txtMotherEmail.Text = ""
Page | 214
txtMotherWorkAddress.Text = ""
txtMotherContactNo.Text = ""
txtNoOfSiblings.Text = ""
rdoFather.Checked = False
rdoMother.Checked = False
rdoOthers.Checked = False
txtGuardianName.Text = ""
txtGuardianRelation.Text = ""
txtGuardianEmail.Text = ""
txtGuardianWorkAddress.Text = ""
txtGuardianContactNo.Text = ""
txtFetcherName.Text = ""
txtFetcherContactNo.Text = ""
txtSiblingsofStudent1.Text = ""
txtSiblingsofStudent2.Text = ""
txtSiblingsofStudent3.Text = ""
txtSiblingsAge1.Text = ""
txtSiblingsAge2.Text = ""
txtSiblingsAge3.Text = ""
txtSiblingsSchool1.Text = ""
txtSiblingsSchool2.Text = ""
txtSiblingsSchool3.Text = ""
txtSchoolLastAttended1.Text = ""
txtSchoolLastAttended2.Text = ""
txtSchoolLastAttended3.Text = ""
txtAcademicYear1.Text = ""
txtAcademicYear2.Text = ""
txtAcademicYear3.Text = ""
txtReasonApplying.Text = ""
rdoMale.Checked = True
rdoFather.Checked = True
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCheck.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Page | 215
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCapture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnBrowse.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Page | 216
Raduis.AddLine(btnRemove.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnNext.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
PictureBox2.Visible = True
Clear()
dtpDOB.MaxDate = Today
dtpDOB.Value = Today
dtbIdentify.Value = Now
rdoMale.Checked = True
rdoFather.Checked = True
RoundButtonCheck(btnCheck)
RoundButtonCapture(btnCapture)
RoundButtonBrowse(btnBrowse)
RoundButtonRemove(btnRemove)
RoundButtonNext(btnNext)
End Sub
Page | 217
CapturePicture.Show()
cmbEnrollment.Text = "Enrollment"
End Sub
Try
With OpenFile
.FileName = ""
.Title = "Photo:"
.Filter = "Image files:
(*.jpg)|*.jpg|(*.jpeg)|*.jpeg|(*.png)|*.png|(*.Gif)|*.Gif|(*.bmp)|*.bmp| All Files
(*.*)|*.*"
End With
Catch ex As Exception
End Try
End Sub
Private Sub BtnRemove_Click(sender As Object, e As EventArgs) Handles
btnRemove.Click
End Sub
Try
dtbIdentify.Value = Now
Page | 218
ChangeConnection.Open()
' Strand
Dim Strand As New OleDbParameter("@Strand", OleDbType.VarWChar, 70)
With {
.Value = cmbStrand.Text.ToString()
}
ChangeCommand.Parameters.Add(Strand)
' Semester
Dim Semester As New OleDbParameter("@Semester", OleDbType.VarWChar, 30)
With {
.Value = cmbSemester.Text.ToString()
}
ChangeCommand.Parameters.Add(Semester)
Page | 219
' Lastname
Dim Lastname As New OleDbParameter("@Lastname", OleDbType.VarWChar, 30)
With {
.Value = txtLastname.Text.ToString()
}
ChangeCommand.Parameters.Add(Lastname)
' Firstname
Dim Firstname As New OleDbParameter("@Firstname", OleDbType.VarWChar,
30) With {
.Value = txtFirstname.Text.ToString()
}
ChangeCommand.Parameters.Add(Firstname)
' Middlename
Dim Middlename As New OleDbParameter("@Middlename", OleDbType.VarWChar,
30) With {
.Value = txtMiddlename.Text.ToString()
}
ChangeCommand.Parameters.Add(Middlename)
' Age
Dim Age As New OleDbParameter("@Age", OleDbType.VarWChar, 10) With {
.Value = txtAge.Text.ToString()
}
ChangeCommand.Parameters.Add(Age)
' Sex
Dim Sex As New OleDbParameter("@Sex", OleDbType.VarWChar, 15)
If rdoMale.Checked Then
Sex.Value = rdoMale.Text.ToString()
End If
ChangeCommand.Parameters.Add(Sex)
' Nationality
Dim Nationality As New OleDbParameter("@Nationality",
OleDbType.VarWChar, 30) With {
.Value = txtNationality.Text.ToString()
}
ChangeCommand.Parameters.Add(Nationality)
Page | 220
' Religion
Dim Religion As New OleDbParameter("@Religion", OleDbType.VarWChar, 30)
With {
.Value = txtReligion.Text.ToString()
}
ChangeCommand.Parameters.Add(Religion)
' Email
Dim Email As New OleDbParameter("@Email", OleDbType.VarWChar, 40) With
{
.Value = txtEmail.Text.ToString()
}
ChangeCommand.Parameters.Add(Email)
' Address
Dim Address As New OleDbParameter("@Address", OleDbType.VarWChar, 50)
With {
.Value = txtStudentAddress1.Text.ToString()
}
ChangeCommand.Parameters.Add(Address)
' City
Dim City As New OleDbParameter("@City", OleDbType.VarWChar, 50) With {
.Value = txtStudentAddress2.Text.ToString()
}
ChangeCommand.Parameters.Add(City)
Page | 221
.Value = txtFatherEmail.Text.ToString()
}
ChangeCommand.Parameters.Add(FatherEmail)
Page | 222
.Value = txtNoOfSiblings.Text.ToString()
}
ChangeCommand.Parameters.Add(NumberOfSiblings)
End If
ChangeCommand.Parameters.Add(PersonEmergency)
Page | 223
.Value = txtFetcherName.Text.ToString()
}
ChangeCommand.Parameters.Add(FetcherName)
Page | 224
}
ChangeCommand.Parameters.Add(SiblingsOfStudentSchool1)
Page | 225
' Reason for Applying
Dim ReasonApplying As New OleDbParameter("@ReasonApplying",
OleDbType.VarWChar, 500) With {
.Value = txtReasonApplying.Text.ToString()
}
ChangeCommand.Parameters.Add(ReasonApplying)
StudentPic.Image.Save(MemStream, Imaging.ImageFormat.Png)
StudentPic_Update = MemStream.GetBuffer()
MemStream.Read(StudentPic_Update, 0, MemStream.Length)
If ChangeCommand.ExecuteNonQuery() Then
ChangeConnection.Close()
PictureBox1.Visible = False
Panel1.Visible = False
PictureBox2.Visible = False
btnNext.Text = " Change "
Subject()
Else
End If
NextConnection.Open()
Page | 226
otherName,MotherOccupation,MotherEmail,MotherWorkAddress,MotherContactNumber,NumberOfSi
blings,PersonEmergency,GuardianName,GuardianRelation,GuardianEmail,GuardianWorkAddress,
GuardianContactNumber,FetcherName,FetcherContactNumber,SiblingsOfStudent1,SiblingsOfStu
dent2,SiblingsOfStudent3,SiblingsOfStudentAge1,SiblingsOfStudentAge2,SiblingsOfStudentA
ge3,SiblingsOfStudentSchool1,SiblingsOfStudentSchool2,SiblingsOfStudentSchool3,SchoolLa
stAttended1,SchoolLastAttended2,SchoolLastAttended3,AcademicYear1,AcademicYear2,Academi
cYear3,ReasonApplying,Identifier,StudentPicture,Status)
values(@d1,@d2,@d3,@d4,@d5,@d6,@d7,@d8,@d9,@d10,@d11,@d12,@d13,@d14,@d15,@d16,@d17,@d18
,@d19,@d20,@d21,@d22,@d23,@d24,@d25,@d26,@d27,@d28,@d29,@d30,@d31,@d32,@d33,@d34,@d35,@
d36,@d37,@d38,@d39,@d40,@d41,@d42,@d43,@d44,@d45,@d46,@d47,@d48,@d49,@d50,@d51,@d52,@d5
3,@d54,@d55,@d56,@d57)"
Dim NextCommand As New OleDbCommand(NextString, NextConnection)
' Strand
Dim Strand As New OleDbParameter("@d3", OleDbType.VarWChar, 70) With {
.Value = cmbStrand.Text.ToString()
}
NextCommand.Parameters.Add(Strand)
' Semester
Dim Semester As New OleDbParameter("@d4", OleDbType.VarWChar, 30) With
{
.Value = cmbSemester.Text.ToString()
}
NextCommand.Parameters.Add(Semester)
' Lastname
Dim Lastname As New OleDbParameter("@d6", OleDbType.VarWChar, 30) With
{
.Value = txtLastname.Text.ToString()
}
NextCommand.Parameters.Add(Lastname)
' Firstname
Dim Firstname As New OleDbParameter("@d7", OleDbType.VarWChar, 30) With
{
.Value = txtFirstname.Text.ToString()
Page | 227
}
NextCommand.Parameters.Add(Firstname)
' Middlename
Dim Middlename As New OleDbParameter("@d8", OleDbType.VarWChar, 30)
With {
.Value = txtMiddlename.Text.ToString()
}
NextCommand.Parameters.Add(Middlename)
' Age
Dim Age As New OleDbParameter("@d9", OleDbType.VarWChar, 10) With {
.Value = txtAge.Text.ToString()
}
NextCommand.Parameters.Add(Age)
' Sex
Dim Sex As New OleDbParameter("@d11", OleDbType.VarWChar, 15)
If rdoMale.Checked Then
Sex.Value = rdoMale.Text.ToString()
End If
NextCommand.Parameters.Add(Sex)
' Nationality
Dim Nationality As New OleDbParameter("@d13", OleDbType.VarWChar, 30)
With {
.Value = txtNationality.Text.ToString()
}
NextCommand.Parameters.Add(Nationality)
' Religion
Dim Religion As New OleDbParameter("@d14", OleDbType.VarWChar, 30) With
{
.Value = txtReligion.Text.ToString()
}
NextCommand.Parameters.Add(Religion)
' Email
Dim Email As New OleDbParameter("@d15", OleDbType.VarWChar, 40) With {
.Value = txtEmail.Text.ToString()
}
NextCommand.Parameters.Add(Email)
Page | 228
' Mobile Number
Dim MobileNumber As New OleDbParameter("@d16", OleDbType.VarWChar, 20)
With {
.Value = String.Format("{0:(0#) ##-###-####}",
txtMobileNo.Text).ToString
}
NextCommand.Parameters.Add(MobileNumber)
' Address
Dim Address As New OleDbParameter("@d18", OleDbType.VarWChar, 50) With
{
.Value = txtStudentAddress1.Text.ToString()
}
NextCommand.Parameters.Add(Address)
' City
Dim City As New OleDbParameter("@d19", OleDbType.VarWChar, 50) With {
.Value = txtStudentAddress2.Text.ToString()
}
NextCommand.Parameters.Add(City)
Page | 229
Dim FatherContactNumber As New OleDbParameter("@d24",
OleDbType.VarWChar, 20) With {
.Value = String.Format("{0:(0#) ##-###-####}",
txtFatherContactNo.Text).ToString
}
NextCommand.Parameters.Add(FatherContactNumber)
Page | 230
ElseIf rdoOthers.Checked Then
PersonEmergency.Value = rdoOthers.Text.ToString()
End If
NextCommand.Parameters.Add(PersonEmergency)
Page | 231
' Siblings of Student 1
Dim SiblingsOfStudent1 As New OleDbParameter("@d39",
OleDbType.VarWChar, 50) With {
.Value = txtSiblingsofStudent1.Text.ToString()
}
NextCommand.Parameters.Add(SiblingsOfStudent1)
Page | 232
Dim SiblingsOfStudentSchool3 As New OleDbParameter("@d47",
OleDbType.VarWChar, 40) With {
.Value = txtSiblingsSchool3.Text.ToString()
}
NextCommand.Parameters.Add(SiblingsOfStudentSchool3)
Page | 233
}
NextCommand.Parameters.Add(Identifier)
StudentPic.Image.Save(MemStream, Imaging.ImageFormat.Png)
StudentPic_Upload = MemStream.GetBuffer()
MemStream.Read(StudentPic_Upload, 0, MemStream.Length)
' Status
Dim Status As New OleDbParameter("@d57", OleDbType.VarWChar, 30) With {
.Value = "reserved"
}
NextCommand.Parameters.Add(Status)
If NextCommand.ExecuteNonQuery() Then
Try
NextConnection.Close()
MsgBox("New student pre-enrolled successfully.",
MsgBoxStyle.Information, "Successfully pre-enrolled!")
NameCommand.CommandText = "SELECT
[Lastname],[Firstname],[Middlename],[EnrollmentNumber] FROM EnrollmentData WHERE
Lastname = '" & txtLastname.Text & "' AND Firstname = '" & txtFirstname.Text & "' AND
Middlename = '" & txtMiddlename.Text & "'"
NameCommand.Connection = NameConnection
NameDataReader = NameCommand.ExecuteReader
If NameDataReader.Read Then
txtEnrollmentNo.Text = NameDataReader("EnrollmentNumber")
PictureBox1.Visible = False
Panel1.Visible = False
PictureBox2.Visible = False
Page | 234
Subject()
End If
NameConnection.Close()
NameDataReader.Close()
Return
Catch ex As Exception
End Try
Else
End If
StudentSubject.Dispose()
Subject()
StudentSubject.Dispose()
Subject()
End If
Catch ex As Exception
End Try
End Sub
e.Handled = True
End If
Page | 235
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 236
'Allowed Numbers only
If Asc(e.KeyChar) <> 8 Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
Page | 237
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 238
Dim NotAllowed As String = "~`@#$%^&*()_-+={[}]:;',!><?/|\"
If NotAllowed.IndexOf(e.KeyChar) = -1 = False Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
'Allowed all
End Sub
Page | 239
Dim NotAllowed As String = "~`@#$%^&*()_-+={[}]:;',!><?/|\"
If NotAllowed.IndexOf(e.KeyChar) = -1 = False Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
Page | 240
End If
End Sub
'Allowed all
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
Page | 241
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
'Allowed all
End Sub
e.Handled = True
End If
End If
Page | 242
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 243
If (Asc(e.KeyChar) < 65 Or Asc(e.KeyChar) > 90) And (Asc(e.KeyChar) < 97 Or
Asc(e.KeyChar) > 122) Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
Page | 244
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 245
If (Asc(e.KeyChar) < 65 Or Asc(e.KeyChar) > 90) And (Asc(e.KeyChar) < 97 Or
Asc(e.KeyChar) > 122) Then
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
Page | 246
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
e.Handled = True
End If
End If
End Sub
Page | 247
If Asc(e.KeyChar) < 48 Or Asc(e.KeyChar) > 57 Then
e.Handled = True
End If
End If
End Sub
'Allowed all
End Sub
Try
btnNext.Text = "Change"
btnNext.BackColor = Color.Green
dbConnection.Open()
dbCommand.CommandText = "select
[StudentPicture],[StudentNumber],[GradeLevel],[Strand],[Semester],[Lastname],[Firstname
],[Middlename],[Age],[DOB],[Sex],[POB],[Nationality],[Religion],[Email],[MobileNumber],
[TelephoneNumber],[Address],[City],[FatherName],[FatherOccupation],[FatherEmail],[Fathe
rWorkAddress],[FatherContactNumber],[MotherName],[MotherOccupation],[MotherEmail],[Moth
erWorkAddress],[MotherContactNumber],[NumberOfSiblings],[PersonEmergency],[GuardianName
],[GuardianRelation],[GuardianEmail],[GuardianWorkAddress],[GuardianContactNumber],[Fet
cherName],[FetcherContactNumber],[SiblingsOfStudent1],[SiblingsOfStudent2],[SiblingsOfS
tudent3],[SiblingsOfStudentAge1],[SiblingsOfStudentAge2],[SiblingsOfStudentAge3],[Sibli
ngsOfStudentSchool1],[SiblingsOfStudentSchool2],[SiblingsOfStudentSchool3],[SchoolLastA
ttended1],[SchoolLastAttended2],[SchoolLastAttended3],[AcademicYear1],[AcademicYear2],[
AcademicYear3],[SchoolYear],[ReasonApplying] from EnrollmentData where StudentNumber =
'" & txtStudentNumber.Text & "'"
dbCommand.Connection = dbConnection
dbDataReader = dbCommand.ExecuteReader
If dbDataReader.Read Then
Page | 248
cmbSemester.Text = dbDataReader(4).ToString()
txtLastname.Text = dbDataReader(5).ToString()
txtFirstname.Text = dbDataReader(6).ToString()
txtMiddlename.Text = dbDataReader(7).ToString()
txtAge.Text = dbDataReader(8).ToString()
dtpDOB.Value = dbDataReader(9).ToString()
If dbDataReader(10).ToString() = "Male" Then
rdoMale.Checked = True
End If
txtPOB.Text = dbDataReader(11).ToString()
txtNationality.Text = dbDataReader(12).ToString()
txtReligion.Text = dbDataReader(13).ToString()
txtEmail.Text = dbDataReader(14).ToString()
txtMobileNo.Text = dbDataReader(15).ToString()
txtTelephoneNo.Text = dbDataReader(16).ToString()
txtStudentAddress1.Text = dbDataReader(17).ToString()
txtStudentAddress2.Text = dbDataReader(18).ToString()
txtFatherName.Text = dbDataReader(19).ToString()
txtFatherOccupation.Text = dbDataReader(20).ToString()
txtFatherEmail.Text = dbDataReader(21).ToString()
txtFatherWorkAddress.Text = dbDataReader(22).ToString()
txtFatherContactNo.Text = dbDataReader(23).ToString()
txtMotherName.Text = dbDataReader(24).ToString()
txtMotherOccupation.Text = dbDataReader(25).ToString()
txtMotherEmail.Text = dbDataReader(26).ToString()
txtMotherWorkAddress.Text = dbDataReader(27).ToString()
txtMotherContactNo.Text = dbDataReader(28).ToString()
txtNoOfSiblings.Text = dbDataReader(29).ToString()
If dbDataReader(30).ToString() = "Father" Then
rdoFather.Checked = True
End If
txtGuardianName.Text = dbDataReader(31).ToString()
txtGuardianRelation.Text = dbDataReader(32).ToString()
txtGuardianEmail.Text = dbDataReader(33).ToString()
txtGuardianWorkAddress.Text = dbDataReader(34).ToString()
txtGuardianContactNo.Text = dbDataReader(35).ToString()
txtFetcherName.Text = dbDataReader(36).ToString()
txtFetcherContactNo.Text = dbDataReader(37).ToString()
txtSiblingsofStudent1.Text = dbDataReader(38).ToString()
txtSiblingsofStudent2.Text = dbDataReader(39).ToString()
txtSiblingsofStudent3.Text = dbDataReader(40).ToString()
txtSiblingsAge1.Text = dbDataReader(41).ToString()
txtSiblingsAge2.Text = dbDataReader(42).ToString()
txtSiblingsAge3.Text = dbDataReader(43).ToString()
txtSiblingsSchool1.Text = dbDataReader(44).ToString()
txtSiblingsSchool2.Text = dbDataReader(45).ToString()
txtSiblingsSchool3.Text = dbDataReader(46).ToString()
Page | 249
txtSchoolLastAttended1.Text = dbDataReader(47).ToString()
txtSchoolLastAttended2.Text = dbDataReader(48).ToString()
txtSchoolLastAttended3.Text = dbDataReader(49).ToString()
txtAcademicYear1.Text = dbDataReader(50).ToString()
txtAcademicYear2.Text = dbDataReader(51).ToString()
txtAcademicYear3.Text = dbDataReader(52).ToString()
cmbSchoolYear.Text = dbDataReader(53).ToString()
txtReasonApplying.Text = dbDataReader(54).ToString()
cmbGradeLevel.Enabled = False
cmbStrand.Enabled = False
cmbSemester.Enabled = False
cmbSchoolYear.Enabled = False
txtLastname.Enabled = False
txtFirstname.Enabled = False
txtMiddlename.Enabled = False
txtAge.Enabled = False
dtpDOB.Enabled = False
rdoMale.Enabled = False
rdoFemale.Enabled = False
txtPOB.Enabled = False
txtNationality.Enabled = False
txtReligion.Enabled = False
txtMobileNo.Enabled = False
txtStudentAddress1.Enabled = False
txtStudentAddress2.Enabled = False
txtFatherName.Enabled = False
txtMotherName.Enabled = False
rdoFather.Enabled = False
rdoMother.Enabled = False
rdoOthers.Enabled = False
txtGuardianName.Enabled = False
txtGuardianContactNo.Enabled = False
cmbGradeLevel.BackColor = Color.White
cmbStrand.BackColor = Color.White
cmbSemester.BackColor = Color.White
cmbSchoolYear.BackColor = Color.White
txtLastname.BackColor = Color.White
txtFirstname.BackColor = Color.White
txtMiddlename.BackColor = Color.White
txtAge.BackColor = Color.White
dtpDOB.BackColor = Color.White
rdoMale.BackColor = Color.White
rdoFemale.BackColor = Color.White
txtPOB.BackColor = Color.White
txtNationality.BackColor = Color.White
txtReligion.BackColor = Color.White
txtMobileNo.BackColor = Color.White
txtStudentAddress1.BackColor = Color.White
txtStudentAddress2.BackColor = Color.White
txtFatherName.BackColor = Color.White
txtMotherName.BackColor = Color.White
rdoFather.BackColor = Color.White
rdoMother.BackColor = Color.White
rdoOthers.BackColor = Color.White
txtGuardianName.BackColor = Color.White
txtGuardianContactNo.BackColor = Color.White
Page | 250
End If
dbConnection.Close()
Return
Catch ex As Exception
End Try
End Sub
StudentEnrollmentGuide.Show()
PictureBox2.Visible = False
End Sub
End Class
Page | 251
StudentEnrollmentGuide.vb
Imports System.ComponentModel
End Sub
StudentEnrollment.PictureBox2.Visible = True
End Sub
End Class
Page | 252
StudentRegistered.vb
Public Class StudentRegistered
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnProceed.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
btnProceed.Region = New Region(Raduis)
End Sub
RoundButton(btnProceed)
End Sub
Else
MsgBox("Thank you for choosing Young Achievers` School of Caloocan." &
vbNewLine & "Please do not share the student's unique reference number",
MsgBoxStyle.Information, "Successfully Pre-enrolled")
StudentEnrollment.Panel1.Visible = True
StudentEnrollment.PictureBox1.Visible = True
Page | 253
StudentEnrollment.Clear()
Hide()
End If
End Sub
End Class
Page | 254
StudentRequirements.vb
Imports System.Data.OleDb
Imports Word = Microsoft.Office.Interop.Word
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
End Sub
RoundButton(btnConfirm)
RichTextBox1.BackColor = Color.White
Page | 255
End Sub
End If
End Sub
Try
'deletion
Dim ChangeConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
ChangeConnection.Open()
Page | 256
.Value = StudentEnrollment.txtStudentNumber.Text.ToString()
}
ChangeCommand.Parameters.Add(StudentNumber)
'deletion
If rdoCondition1.Checked Then
Conditions.Value = "1"
ConditionCommand.Parameters.Add(Conditions)
ElseIf rdoCondition2.Checked Then
Conditions.Value = "2"
ConditionCommand.Parameters.Add(Conditions)
ElseIf rdoCondition3.Checked Then
Conditions.Value = "3"
ConditionCommand.Parameters.Add(Conditions)
ElseIf rdoCondition4.Checked Then
Conditions.Value = "4"
ConditionCommand.Parameters.Add(Conditions)
ElseIf rdoCondition5.Checked Then
Conditions.Value = "5"
ConditionCommand.Parameters.Add(Conditions)
Else
Conditions.Value = "0"
End If
' SF10
Page | 257
Dim Requirement3 As New OleDbParameter("@d4", OleDbType.VarWChar, 10) With
{
.Value = chbRequirement3.Text.ToString()
}
ConditionCommand.Parameters.Add(Requirement3)
' 1 x 1 Picture
Dim Requirement4 As New OleDbParameter("@d5", OleDbType.VarWChar, 10) With
{
.Value = chbRequirement4.Text.ToString()
}
ConditionCommand.Parameters.Add(Requirement4)
' Status
Dim Status As New OleDbParameter("@d6", OleDbType.VarWChar, 10) With {
.Value = "reserved"
}
ConditionCommand.Parameters.Add(Status)
Else
Dim okcancel As Integer = MessageBox.Show("I have read the conditions
stated herein and I have full understanding of my responsibilities and liabilities with
Young Achievers` School of Caloocan, Inc.. I agree with all of the legal constraints
and repercussions. Young Achievers` School of Caloocan, Inc. may hold against me should
I violate any of the above-mentioned conditions. I understand that I am in contract
with Young Achievers` School of Caloocan, Inc. and that I subject myself under its
implementing rules and regulations, and terms and conditions.", "Young Achievers School
of Caloocan", MessageBoxButtons.OKCancel, MessageBoxIcon.Information)
Else
Dispose()
StudentEnrollment.Registered()
End If
End If
Catch ex As Exception
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error")
Exit Sub
End Try
End Sub
End Class
Page | 258
StudentSubject.vb
Imports System.Data.OleDb
StudentRequirements.Hide()
StudentRegistered.Hide()
StudentEnrollment.Panel1.Visible = True
StudentEnrollment.PictureBox1.Visible = True
Hide()
End Sub
Hide()
StudentEnrollment.Requirements()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnBack.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Page | 259
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnNext.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
RoundButtonBack(btnBack)
RoundButtonNext(btnNext)
'Kinder
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Kinder 1 - Pre-School" Then
lblGrade.Text = "Kinder 1"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Kinder 2 - Pre-School" Then
lblGrade.Text = "Kinder 2"
'Elementary
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 1 - Elementary" Then
lblGrade.Text = "Grade 1"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 2 - Elementary" Then
lblGrade.Text = "Grade 2"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 3 - Elementary" Then
lblGrade.Text = "Grade 3"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 4 - Elementary" Then
lblGrade.Text = "Grade 4"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 5 - Elementary" Then
lblGrade.Text = "Grade 5"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 6 - Elementary" Then
lblGrade.Text = "Grade 6"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 7 - Junior High School"
Then
lblGrade.Text = "Grade 7"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 8 - Junior High School"
Then
lblGrade.Text = "Grade 8"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 9 - Junior High School"
Then
lblGrade.Text = "Grade 9"
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 10 - Junior High School"
Then
lblGrade.Text = "Grade 10"
Page | 260
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "Academic - Accountancy, Business and Management
(ABM)") Then
lblGrade.Text = "Grade 11 - ABM"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "Academic - General Academic Strand (GAS)") Then
lblGrade.Text = "Grade 11 - GAS"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "Academic - Humanities and Social Sciences
(HUMSS)") Then
lblGrade.Text = "Grade 11 - HUMSS"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "Academic - Science, Technology, Engineering and
Mathematics (STEM)") Then
lblGrade.Text = "Grade 11 - STEM"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "TVL - Home Economics (HE)") Then
lblGrade.Text = "Grade 11 - HE"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "TVL - Information and Communications Technology
(ICT)") Then
lblGrade.Text = "Grade 11 - ICT"
ElseIf (StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High School"
And StudentEnrollment.cmbStrand.Text = "TVL Tracks - Industrial Arts (IA)") Then
lblGrade.Text = "Grade 11 - IA"
Try
Page | 261
Dim SubjectConnection As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
If SubjectConnection.State = ConnectionState.Open Then
SubjectConnection.Close()
SubjectConnection.Open()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Kinder 2 - Pre-School" Then
Dim query As String = "SELECT Kinder2Code,Kinder2Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
Page | 262
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
'Elementray
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 1 - Elementary" Then
Dim query As String = "SELECT Grade1Code,Grade1Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 2 - Elementary" Then
Dim query As String = "SELECT Grade2Code,Grade2Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
Page | 263
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 3 - Elementary" Then
Dim query As String = "SELECT Grade3Code,Grade3Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 4 - Elementary" Then
Dim query As String = "SELECT Grade4Code,Grade4Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 5 - Elementary" Then
Dim query As String = "SELECT Grade5Code,Grade5Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
Page | 264
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 6 - Elementary" Then
Dim query As String = "SELECT Grade6Code,Grade6Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 7 - Junior High
School" Then
Dim query As String = "SELECT Grade7Code,Grade7Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
Page | 265
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 8 - Junior High
School" Then
Dim query As String = "SELECT Grade8Code,Grade8Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 9 - Junior High
School" Then
Dim query As String = "SELECT Grade9Code,Grade9Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 10 - Junior High
School" Then
Dim query As String = "SELECT Grade10Code,Grade10Subject FROM Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
Page | 266
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
'Grade 11
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Accountancy, Business And
Management(ABM)" Then
Dim query As String = "SELECT Grade11ABMCode,Grade11ABMSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - General Academic Strand
(GAS)" Then
Dim query As String = "SELECT Grade11GASCode,Grade11GASSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
Page | 267
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Humanities And Social
Sciences (HUMSS)" Then
Dim query As String = "SELECT Grade11HUMSSCode,Grade11HUMSSSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Science, Technology,
Engineering And Mathematics(STEM)" Then
Dim query As String = "SELECT Grade11STEMCode,Grade11STEMSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL - Home Economics (HE)" Then
Page | 268
Dim query As String = "SELECT Grade11HECode,Grade11HESubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL - Information And Communications
Technology (ICT)" Then
Dim query As String = "SELECT Grade11ICTCode,Grade11ICTSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 11 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL Tracks - Industrial Arts (IA)" Then
Dim query As String = "SELECT Grade11IACode,Grade11IASubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
Page | 269
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
'Grade 12
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Accountancy, Business And
Management(ABM)" Then
Dim query As String = "SELECT Grade12ABMCode,Grade12ABMSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - General Academic Strand
(GAS)" Then
Dim query As String = "SELECT Grade12GASCode,Grade12GASSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
Page | 270
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Humanities And Social
Sciences (HUMSS)" Then
Dim query As String = "SELECT Grade12HUMSSCode,Grade12HUMSSSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "Academic - Science, Technology,
Engineering And Mathematics(STEM)" Then
Dim query As String = "SELECT Grade12STEMCode,Grade12STEMSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL - Home Economics (HE)" Then
Page | 271
Dim query As String = "SELECT Grade12HECode,Grade12HESubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL - Information And Communications
Technology (ICT)" Then
Dim query As String = "SELECT Grade12ICTCode,Grade12ICTSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
ElseIf StudentEnrollment.cmbGradeLevel.Text = "Grade 12 - Senior High
School" And StudentEnrollment.cmbStrand.Text = "TVL Tracks - Industrial Arts (IA)" Then
Dim query As String = "SELECT Grade12IACode,Grade12IASubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
Page | 272
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
Else
Dim query As String = "SELECT Grade11ICTCode,Grade11ICTSubject FROM
Subject"
Dim dbDataReader As OleDbDataReader
Dim dbDataAdapter As New OleDbDataAdapter
Dim dbCommand As New OleDbCommand With {
.CommandText = query,
.Connection = SubjectConnection
}
dbDataAdapter.SelectCommand = dbCommand
dbDataReader = dbCommand.ExecuteReader
ListView1.Items.Clear()
If dbDataReader.HasRows Then
While dbDataReader.Read()
With ListView1.Items.Add(dbDataReader(0).ToString)
.SubItems.Add(dbDataReader(1).ToString)
End With
End While
End If
dbCommand.Dispose()
dbDataReader.Close()
End If
Catch ex As Exception
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error")
Exit Try
End Try
End Sub
End Class
Page | 273
TeacherData.vb
Imports System.Data.OleDb
Imports System.Drawing.Imaging
Imports System.IO
Imports System.Text
Sub Clear()
TeacherIDTextBox.Text = ""
PasswordTextBox.Text = ""
UsernameTextBox.Text = ""
DateOfBirthDateTimePicker.Value = Now
PlaceOfBirthTextBox.Text = ""
EmailIDTextBox.Text = ""
PictureID.Image = Image.FromFile(My.Application.Info.DirectoryPath &
"\Image\personal.png")
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnAdd.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Page | 274
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnClear.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnSave.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 14)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnDelete.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Page | 275
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnCapture.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Raduis.AddLine(btnBrowse.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
btn.FlatStyle = FlatStyle.Flat
btn.FlatAppearance.BorderSize = 0
btn.Cursor = Cursors.Hand
btn.Font = New Font("Century Gothic", 12)
Raduis.StartFigure()
Raduis.AddArc(New Rectangle(0, 0, 20, 20), 180, 90)
Raduis.AddLine(10, 0, btn.Width - 20, 0)
Raduis.AddArc(New Rectangle(btn.Width - 20, 0, 20, 20), -90, 90)
Page | 276
Raduis.AddLine(btnRemove.Width, 20, btn.Width, btn.Height - 10)
Raduis.AddArc(New Rectangle(btn.Width - 25, btn.Height - 25, 25, 25), 0, 90)
Raduis.AddLine(btn.Width - 10, btn.Width, 20, btn.Height)
Raduis.AddArc(New Rectangle(0, btn.Height - 20, 20, 20), 90, 90)
Raduis.CloseFigure()
End Sub
Validate()
TeacherInfoBindingSource.EndEdit()
TableAdapterManager.UpdateAll(Pre_enrollmentDataSet)
End If
End Sub
RoundButtonAdd(btnAdd)
RoundButtonClear(btnClear)
RoundButtonSave(btnSave)
RoundButtonDelete(btnDelete)
RoundButtonCapture(btnCapture)
RoundButtonBrowse(btnBrowse)
RoundButtonRemove(btnRemove)
Try
Page | 277
Dim POB As String = DataGridView1.CurrentRow.Cells(4).Value
PlaceOfBirthTextBox.Text = POB
SearchTeacherIDColumn.Add(SearchTeacherIDDataSet.Tables(0).Rows(i)("TeacherID").ToStrin
g())
Next
txtSearchTeacherID.AutoCompleteSource = AutoCompleteSource.CustomSource
txtSearchTeacherID.AutoCompleteCustomSource = SearchTeacherIDColumn
txtSearchTeacherID.AutoCompleteMode = AutoCompleteMode.SuggestAppend
SearchUsernameColumn.Add(SearchUsernameDataSet.Tables(0).Rows(j)("Username").ToString()
)
Next
txtSearchUsername.AutoCompleteSource = AutoCompleteSource.CustomSource
txtSearchUsername.AutoCompleteCustomSource = SearchUsernameColumn
Page | 278
txtSearchUsername.AutoCompleteMode = AutoCompleteMode.SuggestAppend
Catch ex As Exception
Clear()
PictureID.Image = Image.FromFile(My.Application.Info.DirectoryPath &
"\Image\personal.png")
MessageBox.Show(ex.Message.ToString(), "Failed to Load Picture Id! (If
adding a new teacher its normal)")
Exit Sub
End Try
End Sub
Clear()
End Sub
Private Sub BtnAddTeacher_Click(sender As Object, e As EventArgs) Handles
btnAdd.Click
Try
AddTeacher()
Me.TeacherInfoTableAdapter.Fill(Me.Pre_enrollmentDataSet.TeacherInfo)
txtSearchTeacherID.Text = "1"
txtSearchTeacherID.Text = ""
Catch ex As Exception
End Try
End Sub
Sub AddTeacher()
Try
NextConnection.Open()
' Teacher ID
Dim TeacherID As New OleDbParameter("@d1", OleDbType.VarWChar, 30) With {
.Value = TeacherIDTextBox.Text.ToString().ToUpper
}
NextCommand.Parameters.Add(TeacherID)
Page | 279
' Password
Dim Password As New OleDbParameter("@d2", OleDbType.VarWChar, 30) With {
.Value = Encrypt(txtUncrypticPassword.Text.ToString())
}
NextCommand.Parameters.Add(Password)
' Username
Dim Username As New OleDbParameter("@d3", OleDbType.VarWChar, 30) With {
.Value = UsernameTextBox.Text.ToString()
}
NextCommand.Parameters.Add(Username)
' EmailID
Dim EmailID As New OleDbParameter("@d6", OleDbType.VarWChar, 30) With {
.Value = EmailIDTextBox.Text.ToString()
}
NextCommand.Parameters.Add(EmailID)
PictureID.Image.Save(MemStream, ImageFormat.Png)
PictureID_Upload = MemStream.GetBuffer()
MemStream.Read(PictureID_Upload, 0, MemStream.Length)
If NextCommand.ExecuteNonQuery() Then
NextConnection.Close()
Else
End If
Catch ex As Exception
Page | 280
MessageBox.Show(ex.Message, "Error 'INSERT' New Teacher",
MessageBoxButtons.OK, MessageBoxIcon.Error)
Exit Sub
End Try
End Sub
Sub SaveData()
Try
' Password
Dim Password As New OleDbParameter("@Password", OleDbType.VarWChar, 50)
With {
.Value = Encrypt(txtUncrypticPassword.Text.ToString())
}
TeacherCommand.Parameters.Add(Password)
' Username
Dim Username As New OleDbParameter("@Username", OleDbType.VarWChar, 50)
With {
.Value = UsernameTextBox.Text.ToString()
}
TeacherCommand.Parameters.Add(Username)
' DateOfBirth
Dim DateOfBirth As New OleDbParameter("@DateOfBirth", OleDbType.Date, 50)
With {
.Value = DateOfBirthDateTimePicker.Text.ToString()
}
TeacherCommand.Parameters.Add(DateOfBirth)
' PlaceOfBirth
Dim PlaceOfBirth As New OleDbParameter("@PlaceOfBirth", OleDbType.VarWChar,
50) With {
.Value = PlaceOfBirthTextBox.Text.ToString()
}
TeacherCommand.Parameters.Add(PlaceOfBirth)
' EmailID
Dim EmailID As New OleDbParameter("@EmailID", OleDbType.VarWChar, 50) With
{
.Value = EmailIDTextBox.Text.ToString()
Page | 281
}
TeacherCommand.Parameters.Add(EmailID)
PictureID.Image.Save(TeacherMemStream, Imaging.ImageFormat.Png)
TeacherDataPic_Update = TeacherMemStream.GetBuffer()
TeacherMemStream.Read(TeacherDataPic_Update, 0, TeacherMemStream.Length)
If TeacherCommand.ExecuteNonQuery() Then
UpdateConnection.Close()
MsgBox("Your data updated successfully.", MsgBoxStyle.Information,
"Data Updated")
Else
MsgBox("Your data update failed.", MsgBoxStyle.Critical, "Update
Failed")
Return
End If
Catch ex As Exception
MessageBox.Show(ex.Message.ToString(), "Saving data failed!")
Exit Sub
End Try
Else
If MessageBox.Show("Do you want to countinue save?", "Question",
MessageBoxButtons.YesNo, MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
SaveData()
Me.TeacherInfoTableAdapter.Fill(Me.Pre_enrollmentDataSet.TeacherInfo)
txtSearchTeacherID.Text = "1"
txtSearchTeacherID.Text = ""
End If
End If
End Sub
Page | 282
If TeacherIDTextBox.Text <> "" Then
If MsgBox("Are you sure to delete data with Teacher Id: " &
TeacherIDTextBox.Text & " ?", MsgBoxStyle.OkCancel, "Delete confirm") =
MsgBoxResult.Cancel Then
' do nothing
Else
Dim cn As New
OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data
Source=|DataDirectory|\Database\Pre-enrollment.accdb")
If cn.State = ConnectionState.Open Then cn.Close()
cn.Open()
temp = cmd.ExecuteNonQuery()
If temp > 0 Then
cn.Close()
'Call DataSetFill()
MessageBox.Show("Successfully deleted", "Record",
MessageBoxButtons.OK, MessageBoxIcon.Information)
Me.TeacherInfoTableAdapter.Fill(Me.Pre_enrollmentDataSet.TeacherInfo)
txtSearchTeacherID.Text = "1"
txtSearchTeacherID.Text = ""
Else
'Call DataSetFill()
MessageBox.Show("No record found", "Sorry",
MessageBoxButtons.OK, MessageBoxIcon.Error)
End If
End If
Else
MsgBox("Fill Teacher Id on Id textbox which Teacher to delete!!",
MsgBoxStyle.OkOnly, "Info Data")
End If
Catch ex As Exception
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error")
End Try
End Sub
Try
Page | 283
Dim Password As String = DataGridView1.CurrentRow.Cells(1).Value
txtUncrypticPassword.Text = Decrypt(Password.ToString)
Catch ex As Exception
Clear()
DateOfBirthDateTimePicker.Value = Now
PictureID.Image = Image.FromFile(My.Application.Info.DirectoryPath &
"\Image\personal.png")
MessageBox.Show(ex.Message.ToString(), "Failed to Load Picture Id! (If
adding a new teacher its normal)")
Exit Sub
End Try
End Sub
cmbCapture.Text = "TeacherData"
CapturePicture.Show()
End Sub
Try
With OpenFile
.FileName = ""
.Title = "Select ID Picture:"
.Filter = "Image files:
(*.jpg)|*.jpg|(*.jpeg)|*.jpeg|(*.png)|*.png|(*.Gif)|*.Gif|(*.bmp)|*.bmp| All Files
(*.*)|*.*"
If .ShowDialog = Windows.Forms.DialogResult.OK Then
PictureID.Image = Image.FromFile(.FileName)
End If
End With
Catch ex As Exception
Page | 284
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error...")
Exit Sub
End Try
End Sub
End Sub
Private Sub TxtSearchTeacherID_TextChanged(sender As Object, e As EventArgs)
Handles txtSearchTeacherID.TextChanged
Try
SearchTeacherIDDataAdapter.SelectCommand = SearchTeacherIDCommand
SearchTeacherIDDataTable.Clear()
SearchTeacherIDDataAdapter.Fill(SearchTeacherIDDataTable)
DataGridView1.DataSource = SearchTeacherIDDataTable
SearchTeacherIDConnection.Close()
Clear()
Page | 285
Dim EmailID As String = DataGridView1.CurrentRow.Cells(5).Value
EmailIDTextBox.Text = EmailID
End If
Catch ex As Exception
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error Search Teacher ID")
Exit Sub
End Try
End Sub
Try
SearchUsernameDataAdapter.SelectCommand = SearchUsernameCommand
SearchUsernameDataTable.Clear()
SearchUsernameDataAdapter.Fill(SearchUsernameDataTable)
DataGridView1.DataSource = SearchUsernameDataTable
SearchUsernameConnection.Close()
Clear()
Page | 286
DateOfBirthDateTimePicker.Value = DOB
End If
Catch ex As Exception
MsgBox(ex.Message(), MsgBoxStyle.Critical, "Error Search Username")
Exit Sub
End Try
End Sub
PasswordTextBox.Text = Encrypt(txtUncrypticPassword.Text)
End Sub
txtUncrypticPassword.Text = Decrypt(PasswordTextBox.Text)
End Sub
'Encryption
Public Function Encrypt(Encryption As String) As String
Try
Catch ex As Exception
MessageBox.Show(ex.Message.ToString(), "Encrypting data failed!")
End Try
End Function
'Decryption
Public Function Decrypt(Decryption As String) As String
Try
Page | 287
Dim encodedtext As New UTF8Encoding
Dim decode As Decoder = encodedtext.GetDecoder
Dim code_byte As Byte() = Convert.FromBase64String(Decryption)
Dim charcount As Integer = decode.GetCharCount(code_byte, 0,
code_byte.Length)
Dim decode_char As Char() = New Char(charcount - 1) {}
decode.GetChars(code_byte, 0, code_byte.Length, decode_char, 0)
Dim decryptext As New String(decode_char)
Return decryptext
Catch ex As Exception
MessageBox.Show(ex.Message.ToString(), "Decrypting data failed!")
End Try
End Function
TeacherDataGuide.Show()
picHelp1.Visible = False
End Sub
End Class
Page | 288
TeacherDataGuide.vb
Imports System.ComponentModel
End Sub
TeacherData.picHelp1.Visible = True
End Sub
End Class
Page | 289
UserInfo.vb
Imports System.Data.OleDb
Imports System.IO
MainForm.Show()
End Sub
End Sub
Hide()
ChangePassword.Show()
End Sub
Hide()
GenarateID.Show()
End Sub
Try
Page | 290
dbCommand.CommandText = "select
[AdminID],[Username],[DateOfBirth],[PlaceOfBirth],[EmailID],[Status],[AdminPic] from
AdminInfo where AdminID = '" & LoginForm.txtAdminUsername.Text & "'"
dbCommand.Connection = dbConnection
dbDataReader = dbCommand.ExecuteReader
If dbDataReader.Read Then
Username.Text = dbDataReader(1).ToString()
Dim DOB As String = dbDataReader(2).ToString()
Dim SplitPart = DOB.Split(" "c)
Dim final As String = SplitPart(0).Trim
DateOfBirth.Text = (String.Format("{0}", final)).ToString
PlaceOfBirth.Text = dbDataReader(3).ToString()
EmailID.Text = LCase(dbDataReader(4)).ToString()
Status.Text = dbDataReader(5).ToString()
Dim LoadPic As Byte() = dbDataReader("AdminPic")
Dim Memory As New MemoryStream(LoadPic)
PicID.Image = Image.FromStream(Memory)
End If
dbConnection.Close()
dbDataReader.Close()
Return
End If
If dbDataReader.Read Then
Username.Text = dbDataReader(1).ToString()
Dim DOB As String = dbDataReader(2).ToString()
Dim SplitPart = DOB.Split(" "c)
Dim final As String = SplitPart(0).Trim
DateOfBirth.Text = (String.Format("{0}", final)).ToString
PlaceOfBirth.Text = dbDataReader(3).ToString()
EmailID.Text = LCase(dbDataReader(4)).ToString()
Label5.Visible = False
Status.Visible = False
Dim LoadPic As Byte() = dbDataReader("TeacherPic")
Dim Memory As New MemoryStream(LoadPic)
PicID.Image = Image.FromStream(Memory)
End If
dbConnection.Close()
dbDataReader.Close()
Return
Page | 291
End If
Catch ex As Exception
End Try
End Sub
End Class
Date: Date:
Page | 292
Curriculum Vitae
Page | 293
Page | 294
Page | 295
Page | 296
Page | 297
Page | 298
Page | 299
Page | 300
Page | 301
Page | 302
Page | 303
Page | 304