Free Essay

Sdsads

In:

Submitted By siidiane
Words 62907
Pages 252
CHAPTER I

INTRODUCTION

International Christian College of Manila (ICCM) according to the Wikipedia, is a private, non-profit co-educational Bible college of the non-denominational Christian Churches/Churches of Christ as rooted on the Stone-Campbell Restoration Movement, whose existence is anchored, among others, on the preservation of primitive New Testament Christianity. Its main campus is in San Jose, Antipolo City, province of Rizal, Philippines.

In accordance with the Philippine law, ICCM first received its permit to operate from the country’s Commission on Higher Education (CHED) on 8 March 2005.

The college started in July 2000 when a number of advanced students of theology from other Bible seminaries found that they no longer had a Bible college in which to study. The students approached church ministers of Metro Manila like Nick Alfafara, Robert and Nezie Cabalteja, and Ross and Cheryl Wissmann for help with a new college where they could continue their training for the church.

The first classes were held in the Wissmann’s residence then in Mapayapa Village I, Quezon City. The first professors were Bobby and Nezie Cabalteja, Tito Pel, Ferdinand Rosete, and Ross and Cheryl Wissmann. By August 2000, premises were rented in Village Plaza Building at the corner of Narra and Sampaguita streets at Mapayapa Village III that served as boys’ dorm and classrooms while the girls’ dormitory was at the nearby Bueno Sol, Ramax Subdivision, Quezon City.

The same year, the Board of Trustees was created to act as a policy-making body and to oversee the school’s operation, fund-raising drives and promotion. Its first chair and vice-chair were Dr. Violeta N. Arciaga and Dr. Josue S. Falla, respectively, both well-known educators and scientists in the Philippine civil service. The school was registered with the Securities and Exchange Commission on 21 June 2001.

In 2002, when Village Plaza was repossessed by a bank, the college moved to its present location at the corner of Provincial Road and Genesis streets in Antipolo City, province of Rizal. The site had been a resort, a private school, and then left derelict. Antipolo Church of Christ had been meeting there and is accommodated for their services each Sunday. The property is 5,000 square meters and a lease has been obtained for at least ten years.

ICCM began with 11 students but this had declined to six by end of the first semester. Enrollment grew to 27 at the beginning of second term 2000/01 and to 66 for the first semester 2001/2002. The enrollment for second semester 2003/4 was 84 and the first semester of 2006/7 it escalated to 125 students.

1. OVERVIEW OF THE CURRENT STATE OF TECHNOLOGY

International Christian College of Manila (ICCM) uses manual registration of enrollees. They have procedures on how student will be enrolled. The student information’s’ are compiled in a storage cabinet and staff are having a hard time managing and organizing the information.

1.2 STATEMENT OF THE PROBLEM

1.2.1 GENERAL PROBLEM

The problem of traditional student registration at International Christian College of Manila is that it is exhausting and takes time to organize the students’ information.

1.2.2 SPECIFIC PROBLEM • Hard time processing student information. There are procedures given by the International Christian College of Manila on how to enroll, since they are using traditional enrollment, it might be hard for the registrar to store and organize the students’ information. • Storing student information in a file cabinet. International Christian College of Manila is using a manual procedure in storing the information of the student enrollee. Application forms that are filled up by the students are stored in a file cabinet and there is no proper security. • Exhausting and consumes space.

The problem of storing all the students’ information in a file cabinet is that it takes time to organize student information, exhausting and also occupies a sizable amount of space.

3. OBJECTIVE OF THE STUDY

1.3.1 GENERAL OBJECTIVE

The main objective of this study is to improve the registration process of the organization, streamline administrative registration functions and to develop the current traditional procedures that will reduce human effort and the time to manage and organize information.
1.3.2 SPECIFIC OBJECTIVE • Easy access, storage and management of student information. The system allows the International Christian College of Manila registrar and administrators to easily manage the students’ information that will make better service quality, increase productivity and will make work easier and efficient. • To provide security for files and records. The proponent will ensure access to a registered data, all student information and ICCM reports will be secured. The system has strict validation of users that will log-in into the system. • Significantly reduce paper works. Storing student information in a computer will significantly minimize the storage of hard copies needed to store in a file cabinet that will make work easier, increase staff productivity and file management.

1.4 SCOPE AND LIMITATIONS

The system focuses on the enrollment of the students for the said organization, the system consists of:

• Enrolling students.

• Collect, organize and manage student information.

• Schedule appointments.

• Record academic performance, work review and Sunday worship reports of

students.

• Manage school subjects.

• Record Grades of students.

• Up to date information of the students.

The system is limited to these capabilities only; it does not cover the following activities:

• Make Class Schedule.

• Compute grades for the students.

• Access the system online.

• Print enrollment forms, grades, academic review, work review and sunday worship report.

1.5 SIGNIFICANCE OF THE STUDY

The system will help the faculty and staffs of the International Christian College of Manila and make enrollment easy by the help of the enrollment database system for the college. The system will make the enrollment and collection of student information easy, fast and organized.

These technologies play a vital role in our society. It makes man work easier and fast. It lessens error of work by using machines. It reduces costs to an organization from paper works up to computerized working system. Many manual transactions can be computerized by using software applications or computer systems to make work easier and efficient.

Information technology can give an organization ready access to improve product and service quality, reduce costs, increase productivity in smallest time possible, and communication between employees and to make things with lesser effort but having a better output and even improve organization morale.

1.6 DEFINITION OF TERMS

Application – A software program that runs on your computer.

Data - Information processed or stored by a computer.

Database - A database is a collection of information that is organized so that it can easily be accessed, managed, and updated.

Hard copy - A printed document on a paper.

HTTP (Hypertext Transfer Protocol) - Is the foundation of data communication for the World Wide Web.

Model – aid in decision making by simulating ‘what if’ scenarios.

Online-based Application - refers to any program that is accessed over a network connection using HTTP (Hypertext Transfer Protocol).

Process - an instance of a computer program that is being executed.

CHAPTER II

2.1 REVIEW OF RELATED LITERATURE

Entitled “Network-based student Permanent Recording keeping and enrollment System in Balian National High School”. This system was made to lessen the time and effort exerted by both student and school employees. It is also made to give accurate reports and keep records of every students and for easy and fast way of enrollment.

[Valina et. Al, 2009]

Enrollment is the process of entering and verifying data of students to register on a particular school. Different interrelated processes build up enrollment procedures called Enrollment System (ES). ES are used particularly in recording and retrieving student information. Tracking student information is also one feature of ES, in which the school can trace the standing of a student. Verifying payment was also added to update or browse student billings. Enrollment System is a good example of a computer generated process. This can lessen the workload and provides accurate information needed of the school. As a result, it will benefit not only the student but the administration as a whole.

[www.scribd.com, 2011]

2.2 REVIEW OF RELATED STUDIES

2.2.1 LOCAL STUDY

Enrollment system especially chose the students information and then, retrieves the important information from the student. The school can trace what is the standing of the students. Lack of Enrollment System in a school can lead to chaos and troubles. Students, registrars and faculty members will be confused on what they should do to be able to enroll. It is extremely useful in the school in the way of working processes, and enrolling becomes much easy.

[Ace Adrian Sandoval National High School Enrollment System, 2012]

Since June 2003 San Pedro Relocation Center National High School, Landayan Campus is using a manual method on their enrollment procedures. During enrollment, the enrollees are line up to the respective chief advisers according on their year levels. These four chief advisers are equipped with a notebook or a clean sheet of paper, ball pen and folders in admitting the students. As the proponents conducted their research and analyzed the existing system on enrollment, they have known that SPRCNHS are experiencing problems like slow transactions and requiring much time in organizing the files of the students that’s why, the researchers decided to recommend a computerized enrollment system for the benefit of the students as well as the faculty members and the school. The proposed system which is the computerized information system will help the enrollment staff to easily access the records of the students. Computerized Information System is more effective than the manual method or the traditional way of enrollment because it can lessen the time and efforts consumed by the enrollment facilitators as well as the students during enrollment

[San Pedro Relocation Center National High School Computerized Enrollment System, 2013]

2.2.2 FOREIGN STUDY

Changes in Information Technology (IT) allow schools to utilize databases and applications such as Online Student Information System (OSIS) thus, making the accessing of records centralized. One of the changes that came about is the online‐based applications. These applications improved the traditional‐transaction processing systems. Thus, most universities switch to the online‐based system because of its effectivity to acquire process, store and retrieve information from the Internet. Moreover, the system is accessible to all students’ information. Benguet State University (BSU) is still using a semi‐computer based system and paper‐based student information system. Staff finds it tedious in searching and preparing reports on student’s information and also laborious due to repetition of processes done in filling and updating of records. As main goals of the school “to generate and disseminate new knowledge and technologies that will promote sustainable resource development and enrich the competent and effective services geared towards efficiency and economy” the current system is inconsistent with the asserted school’s main goals.The methodology used in the study was Rapid Application Development (RAD). RAD is designed to provide quick software methodology that involves iterative development and quick construction of prototypes.
Keywords: Online Student Information System, Benguet State University, Rapid Application Development (RAD), Web Design and Development, Hypertext Preprocessor (PHP)

[Benguet State University (OSIS-BSU), Philippines,Online Student Information System, 2013] From my own experience working in Institutional Research for the past seven years, there is not a proper, reliable, and comprehensive model for forecasting student enrolment quickly. In many funding formulas, enrolment is the main driver of government grants and student tuition fees, which are sources of income to theuniversity. Existing enrolment management tools developed within Institutional Research departments tend to be “ad hoc” spreadsheets with multiple individuals manipulating them with the result that the output comes too late for departments to take remedial action in terms of their budgets and does not provide multiple scenarios in support of strategic decision-making. The purpose of this study is to describe a functional automated enrolment projection system methodology I developed from scratch through a case study of the Faculty of Arts & Science at the University of Toronto. My primary research was to actually build the model. The model in effect, is the thesis. The system provides multiple scenarios that allow senior management in a multi-campus university system to generate multiple income scenarios, enabling them to make well-informed decisions concerning the operation of their institution and timely calculation and allocation of resources to academic departments. The study then shows how this addresses the problems of “ad hoc” approaches, and how it may be applied in other situations.
[University of Toronto, An Automated Enrolment projection System, 2011]

APPENDIX

BIBLIOGRAPHY

• http://en.wikipedia.org/wiki/International_Christian_College_of_Manila

• [Valina et. Al, 2009] http://www.slideshare.net/alvinbobadilla/chapter-1-2

• [www.scribd.com, 2011]

• [Ace Adrian Sandoval National High School Enrollment System, 2012]

• [San Pedro Relocation Center National High School Computerized Enrollment System, 2013]

• [Benguet State University (OSIS-BSU), Philippines,Online Student Information System, 2013] • [University of Toronto, An Automated Enrolment projection System, 2011]

DATA FLOW DIAGRAM

[pic]

[pic]

ENTITY RELATIONSHIP DIAGRAM

USE CASE DIAGRAM

[pic]

DATA DICTIONARY

EfCheckboxchecker - used to check if the student has medical background, notes, work experience, Sponsors, Academic performance review, Sunday worship review and work review.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|medChk |Checks if student has medical |Varchar |Null |No |No |
| |conditions. | | | | |
|noteChk |Checks if student has note. |Varchar |Null |No |No |
|WorkChk |Checks if student has work |Varchar |Null |No |No |
| |experience. | | | | |
|SponsorChk |Checks if student has a sponsor. |Varchar |Null |No |No |
|AcaPerChk |Checks if student has academic |Varchar |Null |No |No |
| |performance | | | | |
|SWRChk |Checks if student has Sunday worship|Varchar |Null |No |No |
| |report | | | | |
|WRevChk |Checks if student has work review. |Varchar |Null |No |No |
|ScholarWorkChk |Checks if student is scholar. |Varchar |Null |No |No |

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|College_Name |College name of student |Varchar |Null |No |Yes |
|College_Course |College course of student |Varchar |Null |No |Yes |
|College_Year |College year of student |Varchar |Null |No |Yes |

EfCollegebackground – stores college information of student.

Efdupsubjects – handles the on the process subjects of student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|SubjectID |Duplicate Subject code of student |Varchar |Null |Yes |Yes |
|Descriptive_Title |Duplicate Descriptive title of |Varchar |Null |Yes |Yes |
| |student | | | | |
|Units |Duplicate Subject Units of student |Integer |Null |Yes |Yes |

Efmedical – stores medical background of student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|Recent_Illness |Checks recent illness of student |Varchar |Null |No |Yes |
|Allergies |Checks allergies of student |Varchar |Null |No |Yes |
|Handicaps |Checks handicaps of student |Varchar |Null |No |Yes |
|Taking_ |Checks if student is taking |Varchar |Null |No |Yes |
|Medications |medications | | | | |
|Pls_Specify |Specific medication of student |Varchar |Null |No |Yes |

Efnotes – handles the notes indicated from the student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|Notes |Notes indicated by the student |Text |Null |No |Yes |
|Date_Noted |Specific date noted |Varchar |Null |No |Yes |

Efpictures - stores the picture path of the student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StundentID |Idenfication of student |Varchar |Null |Yes |Yes |
|PicturePath |Stores path of the students’ |Varchar |Null |No |Yes |
| |uploaded picture | | | | |

Efrequirementsworkscholar – stores the work requirement of student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StundentID |Idenfication of student |Varchar |Null |Yes |Yes |
|Photo_of_House |Photo house requirement of the student|Varchar |Null |No |Yes |
|Telephone_Bill |Telephone bill of student |Varchar |Null |No |Yes |
|Electric_Bill |Electric bill of student |Varchar |Null |No |Yes |

Efsponsor – stores sponsor information of student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StundentID |Idenfication of student |Varchar |Null |Yes |Yes |
|Sponsors_Name |Stores students sponsor name |Varchar |Null |No |Yes |
|Sponsors_Email |Stores sponsors email |Varchar |Null |No |Yes |
|Sponsors_Address |Stores sponsors address |Varchar |Null |No |Yes |
|Sponsors_TelPhone |Stores sponsors telephone number |Varchar |Null |No |Yes |
|Sponsors_Cell |Stores sponsors cell number. |Varchar |Null |No |Yes |

Efstudentinfo – handles student’s basic informations.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|School_Year |Records school year of student |Varchar |Null |Yes |Yes |
|StudentID |Stores the number of the student. |Integer |0 |Yes |Yes |
|Number_Of_Enrollee |Stores enrollee number of a student |Integer |Null |Yes |Yes |
| |in a sem. | | | | |
|isEnrolled |checks if student is enrolled |Varchar |Null |Yes |Yes |
|Date_Enrolled |Stores Date when student is enrolled.|Varchar |Null |Yes |Yes |
|Last_Name |Stores Last Name of student |Varchar |Null |Yes |Yes |
|First_Name |Stores first name of student |Varchar |Null |Yes |Yes |
|Middle_Name |Stores middle name of student |Varchar |Null |Yes |Yes |
|Major |Stores course of student |Varchar |Null |Yes |Yes |
|Year_Level |Stores current Year Level of student |Integer |Null |Yes |Yes |
|Term |Stores the current term of student |Integer |Null |Yes |Yes |
|Birth_Place |Stores the birth place of student |Varchar |Null |Yes |Yes |
|Address |Stores primary address of student |Varchar |Null |Yes |Yes |
|Address2 |Stores secondary address of student |Varchar |Null |Yes |Yes |
|Contact_Info |Stores contact information of student|Varchar |Null |Yes |Yes |
|Contact_Info2 |Stores alternate contact information |Varchar |Null |Yes |Yes |
| |of student | | | | |
|Email_Add |Stores Email address of student |Varchar |Null |Yes |Yes |
|Email_Add2 |Stores alternate email address of |Varchar |Null |Yes |Yes |
| |student | | | | |
|Civil_Status |Stores current civil status of |Varchar |Null |Yes |Yes |
| |student | | | | |
|Birth_Date |Stores the birth date of student |Varchar |Null |Yes |Yes |
|Gender |Stores gender of the student |Varchar |Null |Yes |Yes |
|Citizenship |Stores the citizenship of student |Varchar |Null |Yes |Yes |
|Religion |Stores the religion of student |Varchar |Null |Yes |Yes |
|Fathers_Name |Stores the father’s name of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Fathers_Occupation |Stores the fathers occupation of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Fathers_Number |Stores the fathers contact number |Varchar |Null |Yes |Yes |
|Mothers_Name |Stores the mother’s name of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Mothers_Occupation |Stores the mothers occupation of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Mothers_Number |Stores the mothers contact number |Varchar |Null |Yes |Yes |
|Guardian_Name |Stores the guardian’s name of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Guardian_Number |Stores the guardian’s occupation of |Varchar |Null |Yes |Yes |
| |the student | | | | |
|Guardina_Occupation |Stores the guardian’s contact number |Varchar |Null |Yes |Yes |
|Blood_Type |Stores the students’ blood type |Varchar |Null |Yes |Yes |
|Financial_Payment |Stores the financial payment of |Varchar |Null |Yes |Yes |
| |student. | | | | |
|totalunits |Stores the total units taken by the |Integer |Null |Yes |Yes |
| |student | | | | |
|Student_ID |The complete identifier of the |Varchar |Null |Yes |Yes |
| |student | | | | |
|Elementary |Stores the elementary school whee the|Varchar |None |Yes |Yes |
| |student graduated | | | | |
|Elementary_Date_Graduate|Stores the year the student graduated|Varchar |None |Yes |Yes |
|d |elementary | | | | |
|HighSchool |Stores the High school where the |Varchar |None |Yes |Yes |
| |student graduated. | | | | |
|HighSchool_Date_Graduate|Stores the year the student graduated|Varchar |None |Yes |Yes |
|d |high school | | | | |
|isNewOrRegular |Checks and store if student is a |Varchar |None |Yes |Yes |
| |regular or enw student | | | | |
|SemsStudied |Stores the number of sems studied of |Integer |0 |Yes |Yes |
| |the student. | | | | |
|HasGrades |Checks and stores if student has |Varchar |No |Yes |Yes |
| |grade | | | | |
|Graduated |Checks if student has graduated |Varchar |No |No |Yes |

Efstudentjournal – stores past records of the student in the organization.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|School_Year |Stores the students past school year|Varchar |Null |Yes |Yes |
|StudentID |Identification of student |Varchar |Null |Yes |Yes |
|Last_Name |Stores last name of student |Varchar |Null |Yes |Yes |
|Major |Stores recent major of the student |Varchar |Null |Yes |Yes |
|Year_Level |Stores recent year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores recent term of the student |Integer |Null |Yes |Yes |
|TotalUnits |Stores total units of student in the|Integer |Null |Yes |Yes |
| |recent sem | | | | |
|Date_Enrolled |Stores students last date enrolled |Varchar |Null |Yes |Yes |
|Passed |Stores number of units passed by the|Integer |None |Yes |Yes |
| |student. | | | | |
|Failed |Stores number of units failed by the|Integer |None |Yes |Yes |
| |student. | | | | |
|Inc |Stores number of incomplete subjects|Integer |None |Yes |Yes |
| |of student. | | | | |

Efsubjects – stores the students’ current subjects taken.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|SubjectID |Code of the subject |Varchar |Null |Yes |Yes |
|Descriptive_Title |Title of the subject |Varchar |Null |yes |Yes |
|Units |Subject # of units |Integer |Null |Yes |Yes |

Efsubjectjournal – Stores the past subjects taken by the student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|SubjectID |Code of the subject |Varchar |Null |Yes |Yes |
|Descriptive_Title |Title of the subject |Varchar |Null |yes |Yes |
|Units |Subject # of units |Integer |Null |Yes |Yes |

Efworkexperience – Stores the work experience of the student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Recent_Work |Stores recent work experience of |Varchar |Null |No |Yes |
| |student | | | | |
|Work_Address |Stores recent work address of |Varchar |Null |No |Yes |
| |student | | | | |

Iccmsubjects – The current subjects of the organization.

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|SubjectID |Code of the subject |Varchar |Null |Yes |Yes |
|DescriptiveTitle |Descriptive title of the subjects |Varchar |Null |Yes |Yes |
|SUnits |# of units of a subject |Integer |Null |Yes |Yes |
|Professor_Name |Name of Professor of subject. |Varchar |None |Yes |Yes |
|Course_Department |Course department of the subject. |Varchar |Null |Yes |Yes |
|Year_Level |Year level of the subject |Integer |None |No |Yes |

Semremarks – Stores the 1st year 1st semester remark of a student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by |Varchar |Null |Yes |Yes |
| |the student | | | | |
|DescriptiveTitle |Stores the descriptive title |Varchar |Null |Yes |Yes |
| |stored by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |
|DateEnrolled |Stores when student has been |Varchar |Null |Yes |Yes |
| |enrolled. | | | | |

semREMARKS2ndSem – Stores the 1st year 2nd semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| | | | | | |
| |Student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |
|DateEnrolled |Stores when student has been |Varchar |Null |Yes |Yes |
| |enrolled. | | | | |

semremarks2ndyear – Stores the 2nd year 1st semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |
|DateEnrolled |Stores when student has been |Varchar |Null |Yes |Yes |
| |enrolled. | | | | |

semremarks2ndyear2ndsem – stores the 2nd year 2nd semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |

semremarksS3rdyear - stores the 3rd year 1st semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |

semremarks3rdyear2ndsem - stores the 3rd year 2nd semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |

semremarks4thyear – Stores the 4th year 1st semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value|Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |

semremarks4thyear2ndsem - stores the 4th year 2nd semester of a student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores full name of the student |Varchar |Null |yes |yes |
|Year_Level |Stores past year level of the |Integer |Null |Yes |Yes |
| |student | | | | |
|Term |Stores past term of the student |Integer |Null |Yes |Yes |
|SubjectID |Stores the subject code taken by the|Varchar |Null |Yes |Yes |
| |student | | | | |
|DescriptiveTitle |Stores the descriptive title stored |Varchar |Null |Yes |Yes |
| |by the | | | | |
| |Student. | | | | |
|Units |Stores the subject units of the |Integer |Null |Yes |Yes |
| |student. | | | | |
|Grade |Stores the grade of the student. |Decimal |Null |Yes |Yes |
|Remark |Checks if the student has failed, |Varchar |Null |Yes |Yes |
| |passed or still has no grade. | | | | |
|CheckK |Checks if the student has been |Integer |0 |Yes |Yes |
| |graded. | | | | |

Efrequirements – stores the students requirements

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Two_by_twoID |stores if student passed |Varchar |Null |Yes |Yes |
| |the 2x2ID picture | | | | |
|One_by_oneID |Stores if student passed |Varchar |Null |Yes |Yes |
| |1x1ID picture | | | | |
|Form137_or_ |Stores if student passed |Varchar |Null |Yes |Yes |
|138 |form137 /form138 | | | | |
|Transcript_Of_Records |Stores if student passed |Varchar |Null |Yes |Yes |
| |Transcript of records | | | | |
|Good_Moral_Character |Stores if student passed |Varchar |Null |Yes |Yes |
| |good moral character | | | | |
|Letter_Of_Referal |Stores if student passed |Varchar |Null |Yes |Yes |
| |letter of referral | | | | |
|Letter_Of_Financial |Stores if student passed |Varchar |Null |Yes |Yes |
| |letter of financial | | | | |
|One_Page_Essay |Stores if student passed 1|Varchar |Null |Yes |Yes |
| |page essay | | | | |
|Birth_Certificate |Stores if student passed |Varchar |Null |Yes |Yes |
| |birth certificate | | | | |
|Brgy_Clearance |Stores if student passed |Varchar |Null |Yes |Yes |
| |brgy clearance | | | | |
|NBI |Stores if student passed |Varchar |Null |Yes |Yes |
| |NBI | | | | |
|Police_Clearance |Stores if student passed |Varchar |Null |Yes |yes |
| |police clearance | | | | |
|Registration_Fee |Stores if student payed |Varchar |Null |Yes |Yes |
| |registration Fee | | | | |
|Marriage_Certifi |Stores if student passed |Varchar |Null |Yes |Yes |
|cate |marriage certificate | | | | |

Infoapacademicrecords – Stores academic records evaluation of student.

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Number_of |Checks and stores if |Integer |Null |Yes |Yes |
|_Units_Credited_From_OS |student has units credited| | | | |
| |from outside | | | | |
|Number_of_Sems_Completed_OS |Checks and stores if |Integer |Null |Yes |Yes |
| |student has sems completed| | | | |
| |outside | | | | |
|Number_of_sems_already_Completed_at_ICCM|Stores the number of sems |Integer |Null |Yes |Yes |
| |already completed outside | | | | |
|total_Number_of_Sems_Studied |Stores total # of sems |Integer |Null |Yes |Yes |
| |studied by the student | | | | |
|Number_of_Units_Earned_at_ICCM |Stores the # of units |Integer |Null |Yes |Yes |
| |earned at ICCM | | | | |
|Total_Number_of_Units_to_Date |Stores the total number of|Integer |Null |Yes |Yes |
|Number_of_units_Without_Grade_yet |Stores the students number|Integer |Null |Yes |Yes |
| |of units without grade yet| | | | |
|Overall_GPA_ |Stores students Overall |Decimal |Null |Yes |Yes |
|to_date |GPA to date | | | | |
|GPA_Last_Sem |Stores students GPA last |Decimal |Null |Yes |yes |
| |sem | | | | |
|Number_of_units_failed_last_Sem |Stores the number of units|Integer |Null |Yes |Yes |
| |failed by the student in | | | | |
| |the past sem. | | | | |
|Academic_Comment |Stores academic comment |Varchar |Null |No |Yes |
| |about the student | | | | |
|Year_Level |Stores the current year |Integer |None |Yes |Yes |
| |level of the student | | | | |
|Term |Stores the current term of|Integer |None |Yes |Yes |
| |the student. | | | | |

Infoapoutsidecredits – Stores outside credit records of student

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Outside_Credits |Stores and Checks and |Varchar |None |No |Yes |
| |stores if student has | | | | |
| |outside credits | | | | |
|OTR_received |Stores and Checks if |Varchar |Null |No |Yes |
| |student has OTR received | | | | |
|Class_Cards |Stores and Checks if |Varchar |Null |No |Yes |
| |student has class card | | | | |
| |received | | | | |
|Units_Completed_at_ICCM |Stores total units |Integer |Null |No |Yes |
| |completed at ICCM | | | | |
|Transfer_Credit_Form_Completed |Stores and checks if |Integer |Null |No |Yes |
| |student has transfer | | | | |
| |credit form completed | | | | |
|Number_of_Sem_Completed |Stores number of sem |Integer |Null |No |Yes |
| |completed | | | | |
|Number_Of_units_Credited_OS |Stores number of units |Integer |Null |No |Yes |
| |credited outside | | | | |
|Outside_Credits_Accepted |Stores if outside credits |Varchar |Null |No |Yes |
| |are accepted | | | | |
|Year_Level |Stores the year level when|Integer |None |Yes |Yes |
| |student has been evaluated| | | | |
|Term |Stores the term when |Integer |None |Yes |Yes |
| |student has been evaluated| | | | |

Infoappossiblegraduation1 – Stores the possible graduation of student.

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Graduating_Yes1 |Stores and checks 1st |Varchar |Null |Yes |Yes |
| |possible graduation of | | | | |
| |student | | | | |
|When1 |Stores and checks when |Varchar |Null |Yes |Yes |
| |first possible | | | | |
| |graduation of student | | | | |
|Minimum_Units_Completed1 |Stores minimum units |Integer |Null |Yes |Yes |
| |completed of student | | | | |
|Number_Of_Sem_Completed1 |Stores number of sem |Integer |Null |Yes |Yes |
| |completed at ICCM | | | | |
|Graduating_Yes2 |Stores and checks 2nd |Varchar |Null |Yes |Yes |
| |possible graduation of | | | | |
| |student | | | | |
|When2 |Stores and checks when |Varchar |Null |Yes |Yes |
| |second possible | | | | |
| |graduation of student | | | | |
|Minimum_Units_Completed2 |Stores minimum units |Integer |Null |Yes |Yes |
| |completed of student | | | | |
|Number_Of_Sem_Completed2 |Stores number of sem |Integer |Null |Yes |Yes |
| |completed at ICCM | | | | |
|Graduating_Yes3 |Stores and checks 3rd |Varchar |Null |Yes |Yes |
| |possible graduation of | | | | |
| |student | | | | |
|When3 |Stores and checks when |Varchar |Null |Yes |Yes |
| |third possible | | | | |
| |graduation of student | | | | |
|Minimum_Units_Completed3 |Stores minimum units |Integer |Null |Yes |Yes |
| |completed of student | | | | |
|Number_Of_Sem_Completed3 |Stores number of sem |Integer | |Yes |Yes |
| |completed at ICCM | | | | |
|Graduating_Yes4 |Stores and checks 4th |Varchar |Null |Yes |Yes |
| |possible graduation of | | | | |
| |student | | | | |
|When4 |Stores and checks when |Varchar |Null |Yes |Yes |
| |first possible | | | | |
| |graduation of student | | | | |
|Minimum_Units_Completed4 |Stores minimum units |Integer |Null |Yes |Yes |
| |completed of student | | | | |
|Number_Of_Sem_Completed4 |Stores number of sem |Integer |Null |Yes |Yes |
| |completed at ICCM | | | | |
|Year_Level | |Integer |None |Yes |Yes |
|Term | |Integer |None |Yes |Yes |

Sinfoapsubjects – Records the subjects the student has taken.

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student|Varchar |Null |Yes |Yes |
|Comprehension1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Comprehension2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Comprehension2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Comprehension4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Eng1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Eng2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Eng3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Lit1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Lit2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Student_Ministry1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Student_Ministry2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Student_Ministry3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Student_Ministry4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Practical_Evangelism1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Practical_Evangelism2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Practical_Evangelism3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Practical_Evangelism4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Ministry1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Ministry2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Ministry3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Ministry4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Greek1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Greek2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Greek3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Greek4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Key1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Key2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Key3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Music1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Music2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Music3 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Music4 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Methods |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|EdFound1 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Edfound2 |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Curriculum_D |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|M_and_E |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Learn_Dev |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|St_teach |Stores and checks if |Varchar |Null |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Year_Level |Stores and checks if |Integer |None |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |
|Term |Stores and checks if |Integer |None |No |Yes |
| |the student has | | | | |
| |completed this | | | | |
| |subject | | | | |

Sinfoswr – Stores and records the Sunday worship report of the student

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores the full name of the student |Varchar |Null |Yes |No |
|Month_Of |Stores the month when the Sunday |Varchar |Null |Yes |No |
| |worship report has been evaluated. | | | | |
|Year_Of |Stores the year when the Sunday |Varchar |Null |Yes |No |
| |worship has been evaluated. | | | | |
|Year_Level |Stores the year level of the student. |Integer |Null |Yes |No |
|Term |Stores the semester of the student. |Integer |Null |Yes |No |
|Week1 |Stores and checks the first week of |Varchar |Null |Yes |No |
| |work of the student | | | | |
|Week2 |Stores and checks the second week of |Varchar |Null |Yes |No |
| |work of the student | | | | |
|Week3 |Stores and checks the third week of |Varchar |Null |Yes |No |
| |work of the student | | | | |
|Week4 |Stores and checks the fourth week of |Varchar |Null |Yes |No |
| |work of the student | | | | |

Studentfailures - stores the subjects failed by the student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores the full name of student. |Varchar |Null |Yes |No |
|SubjectID |Stores the Code of the subject. |Varchar |Null |Yes |No |
|DescriptiveTitle |Stores a brief information about the|Varchar |Null |Yes |No |
| |subject. | | | | |
|Units | Number of units of the subject |Integer |Null |Yes |No |
|Remark |Stores if the student has failed / |Varchar |Null |Yes |No |
| |dropped from the subject. | | | | |
|Year_Level |Stores the current year level of the|Integer |Null |Yes |No |
| |student. | | | | |
|Term |Stores the current term of the |Integer |Null |Yes |No |
| |student. | | | | |

Studentremarks – stores the subject remarks of the student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Failed |Stores the number of units failed by|Integer |0 |Yes |No |
| |the student | | | | |
|Passed |Stores the number of units passed by|Integer |0 |Yes |No |
| |the student | | | | |
|Inc |Stores the number of subject still |Integer |0 |Yes |No |
| |incompleted by the student | | | | |
|Year_Level |Stores the current year level of the|Integer |1 |Yes |No |
| |student | | | | |
|Term |Stores the current term of the |Integer |1 |Yes |No |
| |student | | | | |

Swsworkreview – Stores the work review of the student.

| | | | | | |
|Data Member |Description |Types |Default Value |Required |Unique |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Name |Stores the name of the student |Varchar |Null |Yes |No |
|Date1 |Stores the month of first review of|Varchar |Null |No |No |
| |the student | | | | |
|Review1 |Stores the first review of the |Integer |Null |No |No |
| |student | | | | |
|Date2 |Stores the month of second review |Varchar |Null |No |No |
| |of the student | | | | |
|Review2 |Stores the second review of the |Integer |Null |No |No |
| |student | | | | |
|Date3 |Stores the third of first review of|Varchar |Null |No |No |
| |the student | | | | |
|Review3 |Stores the third review of the |Integer |Null |No |No |
| |student | | | | |
|Date_Reviewed |Stores the date the work review has|Varchar |Null |No |No |
| |been stored. | | | | |
|OverAll_Rating |Stores the work review overvall |Decimal |Null |No |No |
| |rating | | | | |
|Rating |Stores the work review rating of |Varchar |Null |No |No |
| |the student. | | | | |
|Year_Level |Stores the current year level of |Integer |None |No |No |
| |the student | | | | |
|Term |Stores the current term of the |Integer |None |No |No |
| |student. | | | | |

Swsworkreviewoutstanding – stores the record of outstanding work review.

| | | | | | |
|Data Member |Description |Types |Default |Required |Unique |
| | | |Value | | |
|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Rating |Stores the rating of the |Varchar |Null |No |No |
| |student. | | | | |
|Excellent_Keep_ |Checks and stores the student |Varchar |Null |No |No |
|Up_The_ |work review. | | | | |
|Good_Work | | | | | |
|SWS_Work_Will_Be_At_ |Checks and stores the student |Varchar |Null |No |No |
|P52_Per_Hr_Next_Sem_ |work review | | | | |
|P53_for_cnstruction | | | | | |
|Date_Reviewed |Stores the date the review has|Varchar |None |No |No |
| |been recorded. | | | | |

swsWorkreviewpoor - stores the record of poor work review.

|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Rating |Stores the rating of the |Varchar |Null |No |No |
| |student. | | | | |
|Second2ratingYouWillNotBeOfferedASWSNextYea|Checks and stores the |Varchar |Null |No |No |
|r |student work review. | | | | |
|Final_Warning_or_You_Will_Not_Be_Offered_a_|Checks and stores the |Varchar |Null |No |No |
|SWS_next_Sem |student work review | | | | |
|WS_work_Will_Be_Assessed_At_P45_per_hour_Ne|Checks and stores the |Varchar |Null |No |No |
|xt_sem |student work review | | | | |
|Max_Number_Of_Hours_You_May_Work_Per_Week_N|Checks and stores the |Varchar |Null |No |No |
|ext_Sem_is_18 |student work review | | | | |
|Date_Reviewed |Stores the date the review |Varchar |None |No |No |
| |has been recorded. | | | | |

Swsworkreviewsatisfactory - stores the record of satisfactory work review.

|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Rating |Stores the rating of the |Varchar |Null |No |No |
| |student. | | | | |
|Pls_Improve_Please_Strive_For_Excellence |Checks and stores the student|Varchar |Null |No |No |
| |work review. | | | | |
|SWS_work_Will_Be_Assessed_At_P50_Per_Hour_N|Checks and stores the student|Varchar |Null |No |No |
|ext_Sem |work review | | | | |
|Date_Reviewed |Stores the date the review |Varchar |None |No |No |
| |has been recorded. | | | | |

Swsworkreviewverypoor - stores the record of very poor work review.

|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Rating |Stores the rating of the |Varchar |Null |No |No |
| |student. | | | | |
|You_Will_Not_Be_Offered_A_SWS_next_sem |Checks and stores the student|Varchar |Null |No |No |
| |work review. | | | | |
|Work_Scholarship_Is_Cancelled_Immediately |Checks and stores the student|Varchar |Null |No |No |
| |work review | | | | |
|Date_Reviewed |Stores the date the review |Varchar |None |No |No |
| |has been recorded. | | | | |

Swsworkreviewverysatisfactory - stores the record of very satisfactory work review.

|StudentID |Identifier of student |Varchar |Null |Yes |Yes |
|Rating |Stores the rating of the |Varchar |Null |No |No |
| |student. | | | | |
|Work_Will_Be_Assessed_At_P51_Per_Hr_Next|Checks and stores the student |Varchar |Null |No |No |
|_Sem_P52_for_cnstrction |work review. | | | | |
|Date_Reviewed |Stores the date the review has |Varchar |None |No |No |
| |been recorded. | | | | |

UserAccounts - handles the users of the system, the number of enrollees and semesters.

|AdminUser |Handles the admin user of the |Varchar |None |Yes |Yes |
| |system | | | | |
|AdminPassword |Handles the admin password of |Varchar |None |Yes |Yes |
| |the system | | | | |
|AdminPincode |Handles the admin pincode of |Varchar |None |Yes |Yes |
| |the system | | | | |
|User |Handles the username of the |Varchar |Null |Yes |Yes |
| |system | | | | |
|UserPassword |Handles the user password of |Varchar |Null |Yes |Yes |
| |the system | | | | |
|UserPincode |Handles the user pincode of the|Varchar |None |Yes |Yes |
| |system | | | | |
|Term |Handles the current term of the|Integer |None |Yes |Yes |
| |Enrollment system. | | | | |
|EnrolleNum |Handles the current enrollee |Integer |0 |Yes |Yes |
| |per semester of the system | | | | |
|TotalEnrollee |Handles the total number of |Integer |0 |Yes |Yes |
| |enrollee of the system. | | | | |
|Graduates |Handles the total number of |Integer |0 |Yes |Yes |
| |graduates of the system. | | | | |

SCREEN SHOTS

[pic]

[pic]

[pic]

[pic]

[pic]

SOURCE CODE

SPLASH SCREEN

Imports System.Runtime.InteropServices
Imports System.Drawing

Public NotInheritable Class SplashScreen1

Dim x As Integer = 0 Dim y As Integer = 0

_ Public Structure MARGINS Public Destra As Integer Public Sinistra As Integer Public Su As Integer Public Giu As Integer End Structure Declare Auto Function DwmIsCompositionEnabled Lib "dwmapi.dll" Alias "DwmIsCompositionEnabled" (ByRef pfEnabled As Boolean) As Integer Declare Auto Function DwmExtendFrameIntoClientArea Lib "dwmapi.dll" Alias "DwmExtendFrameIntoClientArea" (ByVal hWnd As IntPtr, ByRef pMargin As Margins) As Integer Dim pMargins As New Margins With {.Su = -1, .Sinistra = -1, .Destra = -1, .Giu = -1}

Private Sub LoadingScreen_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

Me.BringToFront()

Timer1.Enabled = True

End Sub

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

If (Me.ProgressBar1.Value > 0) Then Me.ProgressBar1.Value = Me.ProgressBar1.Value - 1 End If

If Me.ProgressBar2.Value < 101 Then Me.Label5.Text = "" & Me.ProgressBar2.Value & "%" End If

Me.ProgressBar2.Value = Me.ProgressBar2.Value + 1

If Me.ProgressBar2.Value = 101 Then Me.ProgressBar2.Value = 100 ProgressBar4.Visible = True ProgressBar1.Visible = False ProgressBar2.Visible = False ProgressBar4.Value = ProgressBar4.Value + 1

If ProgressBar4.Value = 100 Then Me.Timer1.Enabled = False ' SplashScreen2.Show() LoginForm1.Show() Me.Hide() End If

End If

If Me.ProgressBar2.Value = 5 Then Me.Label4.Text = "Setting Up Connection to Database ..." Me.Label2.Text = "Loading . . . " Label1.Text = "G" ElseIf Me.ProgressBar2.Value = 8 Then Me.Label2.Text = "Loading . . " Label1.Text = " M" ElseIf Me.ProgressBar2.Value = 10 Then Me.Label4.Text = "Initializing Database Connection .." Me.Label2.Text = "Loading . " Label1.Text = " C" ElseIf Me.ProgressBar2.Value = 16 Then Me.Label2.Text = "Loading . . " Label1.Text = " N" ElseIf Me.ProgressBar2.Value = 22 Then Me.Label2.Text = "Loading . . . " Label1.Text = " 7" ElseIf Me.ProgressBar2.Value = 29 Then Me.Label4.Text = "Loading Forms.." Me.Label2.Text = "Loading . " Label1.Text = " S" ElseIf Me.ProgressBar2.Value = 36 Then Me.Label2.Text = "Loading . . " Label1.Text = " Y" ElseIf Me.ProgressBar2.Value = 41 Then Me.Label2.Text = "Loading . . . " Label1.Text = " S" ElseIf Me.ProgressBar2.Value = 48 Then Me.Label4.Text = "Gathering Information ." Me.Label2.Text = "Loading . . " Label1.Text = " T" ElseIf Me.ProgressBar2.Value = 53 Then Me.Label2.Text = "Loading . " Label1.Text = " E" ElseIf Me.ProgressBar2.Value = 60 Then Me.Label4.Text = "Information Gathered .." Me.Label2.Text = "Loading . . " Label1.Text = " M" ElseIf Me.ProgressBar2.Value = 71 Then Me.Label2.Text = "Loading . . . " Label1.Text = " !" ElseIf Me.ProgressBar2.Value = 78 Then Me.Label2.Text = "Loading . . " Label1.Text = "GMCN7 SYSTEM 2014™ " ElseIf Me.ProgressBar2.Value = 86 Then Me.Label4.Text = "Starting ..." Me.Label2.Text = "Loading . " Label1.Text = " " ElseIf Me.ProgressBar2.Value = 90 Then Me.Label2.Text = "Loading . . " Label1.Text = "GMCN7 SYSTEM 2014™ " ElseIf Me.ProgressBar2.Value = 93 Then Me.Label2.Text = "Loading . . . " Label1.Text = " 4" ElseIf Me.ProgressBar2.Value = 94 Then Me.Label2.Text = "Loading . " Label1.Text = "GMCN7 SYSTEM 2014™ " ElseIf Me.ProgressBar2.Value = 97 Then Me.Label2.Text = "Loading . . " Label1.Text = "" ElseIf Me.ProgressBar2.Value = 100 Then Me.Label4.Text = "Start Up Complete ......" Me.Label2.Text = "Loading . . . " End If

End Sub
End Class

LOG IN FORM

Imports System.Drawing

Public Class LoginForm1

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

If txtusername.Text = D.Item(0, 0).Value Then Magulang.ADMINbox.Text = 1

If txtusername.Text D.Item(0, 0).Value Then 'pasok MsgBox("Incorrect Username or Password", MsgBoxStyle.OkOnly, "Invalid Password") Exit Sub ElseIf txtpassword.Text D.Item(1, 0).Value Then MsgBox("Incorrect Username or Password", MsgBoxStyle.OkOnly, "Invalid Password") Exit Sub Else MsgBox("Good Day !", MsgBoxStyle.Information, "WELCOME") Magulang.EnrollmentToolStripMenuItem1.Visible = False Magulang.AcademicPerformanceToolStripMenuItem.Visible = False Magulang.WorkReviewToolStripMenuItem.Visible = False Magulang.SundayWorshipReportToolStripMenuItem.Visible = False Magulang.LibraryHoursToolStripMenuItem.Visible = False Magulang.AddRemoveSubjectsToolStripMenuItem.Visible = False Magulang.InputGradeToolStripMenuItem.Visible = False Magulang.EditSubjectsToolStripMenuItem.Visible = False Magulang.GradeToolStripMenuItem.Visible = False GoTo here End If

Else Magulang.ADMINbox.Text = 0 If txtusername.Text D.Item(3, 0).Value Then MsgBox("Incorrect Username or Password", MsgBoxStyle.OkOnly, "Invalid Password") Exit Sub ElseIf txtpassword.Text D.Item(4, 0).Value Then MsgBox("Incorrect Username or Password", MsgBoxStyle.OkOnly, "Invalid Password") Exit Sub Else MsgBox("Good day !", MsgBoxStyle.Information, "WELCOME") Magulang.EnrollmentToolStripMenuItem1.Visible = True Magulang.SubjectsToolStripMenuItem.Visible = True Magulang.AcademicPerformanceToolStripMenuItem.Visible = True Magulang.WorkReviewToolStripMenuItem.Visible = True Magulang.SundayWorshipReportToolStripMenuItem.Visible = True Magulang.LibraryHoursToolStripMenuItem.Visible = True here: txtpassword.Text = "" txtusername.Text = "" Magulang.GroupBox1.BringToFront()

Magulang.T1.Text = 1 Me.Hide()

Magulang.BringToFront() Magulang.Show() Magulang.Enabled = True Magulang.MenuStrip.Enabled = True Magulang.KeyPreview = True

Me.Name = "" Magulang.Visible = True Magulang.ShowInTaskbar = True

End If End If

End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Dim Ext As MsgBoxResult Ext = MsgBox("Really Exit?", MsgBoxStyle.Critical + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Dispose() Magulang.Dispose() SplashScreen1.Dispose() SplashScreen2.Dispose()

ElseIf Ext = MsgBoxResult.No Then Exit Sub End If End Sub

Private Sub LoginForm1_EnabledChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.EnabledChanged Populate("Select * from gmcn7enrollmentdatabase.useraccounts;", D) End Sub

Private Sub LoginForm1_VisibleChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.VisibleChanged Populate("Select * from gmcn7enrollmentdatabase.useraccounts;", D) End Sub

Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim Sem As Integer = Val(MySelectSpecific("Select Term from GMCN7enrollmentdatabase.useraccounts;"))

If Sem = 1 Then Label1.Text = Sem & "st Semester" Else Label1.Text = Sem & "nd Semester" End If

Magulang.Hide() Me.BringToFront() Me.Show() Me.ShowInTaskbar = False Magulang.GroupBox1.SendToBack() Populate("Select * from gmcn7enrollmentdatabase.useraccounts;", D) End Sub

Private Sub ForgotPass_MouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ForgotPass.MouseDoubleClick LForgotPasswordAskUser.Show() Me.Enabled = False

End Sub
End Class

FORGOT PASSWORD ASK USER

Public Class LForgotPasswordAskUser

Dim x As String Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

If User.Text = "" Then Exit Sub End If If User.Text = D2.Item(0, 0).Value Then LAdminEnterNewPinNPassword.Show() Me.Close() ElseIf User.Text = "ADMIN" Then LAdminEnterNewPinNPassword.Show() Me.Close() ElseIf User.Text x Then MsgBox("NO SUCH USER OR CHECK SPELLING, TRY AGAIN!", MsgBoxStyle.Information) Exit Sub Else LAskUserNewPassword.TName.Text = User.Text LogInAdminPass.Show() Me.Close() End If

End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() LoginForm1.Enabled = True End Sub

Private Sub UsernameTextBox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles User.TextChanged Populate("select User from gmcn7enrollmentdatabase.useraccounts where User = '" & User.Text & "';", D) x = D.Item(0, 0).Value End Sub

Private Sub LogInAskUser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("select * from gmcn7enrollmentdatabase.useraccounts;", D2) LoginForm1.Enabled = False End Sub
End Class

FORGOT PASSWORD ASK USER PINCODE

Public Class LogInAdminPass

Private Sub LogInAdminPass_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed LoginForm1.Enabled = True End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() LoginForm1.Enabled = True End Sub

Private Sub LogInAdminPass_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("select UserPincode from gmcn7enrollmentdatabase.useraccounts;", D) LoginForm1.Enabled = False End Sub

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

If A1.Text D.Item(0, 0).Value Then 'pasok MsgBox("Invalid Pincode", MsgBoxStyle.Exclamation) Exit Sub ElseIf A2.Text D.Item(0, 0).Value Then MsgBox("Invalid Pincode", MsgBoxStyle.Exclamation) Exit Sub ElseIf A1.Text A2.Text Then MsgBox("Invalid Pincode", MsgBoxStyle.Exclamation) Exit Sub Else LAskUserNewPassword.Show() Me.Close() End If End Sub

End Class

FORGOT PASSWORD ASK USER NEW PASSWORD

Public Class LAskUserNewPassword Private Sub LogInForgotPass_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load LoginForm1.Enabled = False End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() LoginForm1.Enabled = True End Sub

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click

If T1.Text.Length < 4 Or T2.Text.Length < 4 Then MsgBox("Password must be at least (5) characters!", MsgBoxStyle.Exclamation) Exit Sub ElseIf T1.Text = "" Or T1.Text = Nothing Then MsgBox("NO PASSWORD INPUTTED, TRY AGAIN!", MsgBoxStyle.Exclamation) Exit Sub ElseIf T2.Text = "" Or T2.Text = Nothing Then MsgBox("NO PASSWORD INPUTTED,, TRY AGAIN!", MsgBoxStyle.Exclamation) Exit Sub ElseIf T1.Text T2.Text Then MsgBox("Password did not match, TRY AGAIN!", MsgBoxStyle.Exclamation) Exit Sub ElseIf T2.Text T1.Text Then MsgBox("Password did not match, TRY AGAIN!", MsgBoxStyle.Exclamation) Exit Sub Else Dim Ext As MsgBoxResult Ext = MsgBox("Password matched! Submit ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("update GMCN7EnrollmentDatabase.Useraccounts set Userpassword = '" & T2.Text & "' where User = '" & TName.Text & "';") MsgBox("PASSWORD UPDATED", MsgBoxStyle.Information) Me.Close() LoginForm1.Hide() LoginForm1.Enabled = True LoginForm1.Show() LoginForm1.BringToFront()

Else Exit Sub End If End If

End Sub

Private Sub T1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles T1.KeyPress, T2.KeyPress Dim allowedChars As String = " " 'dag dag mo nalang si (.) kung needed sila for decimal)

If Not allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

End Class

FORGOT PASSWORD ASK ADMIN PINCODE AND PASSWORD

Public Class LAdminEnterNewPinNPassword

Dim c As Integer = 0 Dim x As String Dim Ext As MsgBoxResult Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Try

If c = 1 Then If Pass1.Text.Length < 4 Or Pass2.Text.Length < 4 Then MsgBox("Password must be at least (5) characters!", MsgBoxStyle.Exclamation) Exit Sub

ElseIf Pass1.Text = "" Or Pass1.Text = Nothing Or Pass2.Text = "" Or Pass2.Text = Nothing Then MsgBox("NO PASSWORD INPUTTED, TRY AGAIN!", MsgBoxStyle.Exclamation) Exit Sub ElseIf Pass1.Text Pass2.Text Then MsgBox("Password did not match!", MsgBoxStyle.Exclamation) Exit Sub ElseIf Pass2.Text Pass1.Text Then MsgBox("Password did not match!", MsgBoxStyle.Exclamation) Exit Sub Else

Ext = MsgBox("Password matched! Submit ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("update GMCN7EnrollmentDatabase.Useraccounts set Adminpassword = '" & Pass1.Text & "';") MsgBox("ADMIN PASSWORD UPDATED", MsgBoxStyle.Information) Me.Close() LoginForm1.Hide() LoginForm1.Enabled = True LoginForm1.Show() LoginForm1.BringToFront() Else Exit Sub End If End If c = 0 End If

If Pin1.Text D.Item(0, 0).Value Then MsgBox("Incorrect Pincode!", MsgBoxStyle.Exclamation) Exit Sub ElseIf Pin2.Text D.Item(0, 0).Value Then MsgBox("Incorrect Pincode!", MsgBoxStyle.Exclamation) Exit Sub ElseIf Pin1.Text Pin2.Text Then MsgBox("Pincode did not match!", MsgBoxStyle.Exclamation) Exit Sub ElseIf Pin2.Text Pin1.Text Then MsgBox("Pincode did not match!", MsgBoxStyle.Exclamation) Exit Sub Else c = 1 Pin1.Visible = False Pin2.Visible = False l1.Visible = False l2.Visible = False

l3.Visible = True l4.Visible = True Pass1.Visible = True Pass2.Visible = True Exit Sub

End If Catch ex As Exception Exit Sub End Try End Sub

Private Sub T1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Pass1.KeyPress, Pass2.KeyPress Dim allowedChars As String = " " 'dag dag mo nalang si (.) kung needed sila for decimal)

If Not allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() LoginForm1.Enabled = True End Sub

Private Sub LogInAdminForgotPassword_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select AdminPincode from gmcn7enrollmentdatabase.useraccounts;", D) LoginForm1.Enabled = False End Sub
End Class

PARENT FORM

Imports System.IO
Imports System.Drawing

Public Class Magulang Dim newS As Integer = 0 ' number of forms of new student Dim regS As Integer = 0 ' number of forms of reg student Dim clickS As Integer = 0

Dim Closer As Integer = 0 ' CHECK FORM CLOSE

#Region "MAIN MENU" Public Sub ShowDesktop() keybd_event(VK_LWIN, 0, 0, 0)

keybd_event(77, 0, 0, 0)

keybd_event(VK_LWIN, 0, KEYEVENTF_KEYUP, 0)

End Sub

Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long) Private Const KEYEVENTF_KEYUP = &H2

Private Const VK_LWIN = &H5B

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MainMenuToolStripMenuItem.Click For Each dr As Form In Me.MdiChildren dr.WindowState = FormWindowState.Minimized

Next Me.Show()

GroupBox1.Visible = True GroupBox1.BringToFront()

' Call ShowDesktop End Sub

Private Sub MinimizeAllFormsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MinimizeAllFormsToolStripMenuItem.Click For Each dr As Form In Me.MdiChildren dr.WindowState = FormWindowState.Minimized

Next Me.Show() GroupBox1.SendToBack() Me.Name = ""

' GroupBox1.Visible = False End Sub

Private Sub CloseAllFormsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseAllFormsToolStripMenuItem.Click Dim Ext As MsgBoxResult Ext = MsgBox("Closing all forms will delete all unfinished work, continue ? ", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

For Each dr As Form In Me.MdiChildren dr.Close()

Next MsgBox("ALL FORMS CLOSED", MsgBoxStyle.Information) Me.GroupBox1.BringToFront() End If End Sub

Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click Dim Ext As MsgBoxResult Ext = MsgBox("LOG OUT ? ", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

clickS = 1 For Each dr As Form In Me.MdiChildren dr.Close()

Next LoginForm1.BringToFront() LoginForm1.Show() LoginForm1.ShowInTaskbar = True

Me.Close() End If End Sub

'LOCK Private Sub LockToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LockToolStripMenuItem.Click Me.Enabled = False Lock.Show() End Sub

#End Region

#Region "ENROLLMENT"

Private Sub AsdToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AsdToolStripMenuItem.Click

GroupBox1.SendToBack() LoginForm1.Hide()

If LimiterNew.Text < 2 Then Dim x As New NEWEnrolForm

LimiterNew.Text = LimiterNew.Text + 1 newS += 1 x.ShowInTaskbar = True adopt(x, Me)

End If

End Sub

Private Sub RegularStudentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RegularStudentToolStripMenuItem.Click

GroupBox1.SendToBack()

If LimiterOld.Text < 2 Then Dim x As New OLD_REG_FORM LimiterOld.Text = LimiterOld.Text + 1 adopt(x, Me) End If

End Sub

Private Sub EnrollmentProceduresToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EnrollmentProceduresToolStripMenuItem.Click GroupBox1.SendToBack() If EnProc.Text < 2 Then Dim x As New EnrollmentProcedures EnProc.Text = EnProc.Text + 1 adopt(x, Me) End If End Sub

#End Region

#Region "STUDENT INFORMATION"

Private Sub OverviewOfStudentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OverviewOfStudentsToolStripMenuItem.Click GroupBox1.SendToBack() adopt(StudentOverview, Me) End Sub

Private Sub StudentInformationToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentInformationToolStripMenuItem1.Click ' GroupBox1.Visible = False

GroupBox1.SendToBack()

If SFF.Text < 3 And SFF.Text 4 Then Dim x As New SF adopt(x, Me) SFF.Text = SFF.Text + 1 End If End Sub

Private Sub AcademicPerformanceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AcademicPerformanceToolStripMenuItem.Click ' GroupBox1.Visible = False GroupBox1.SendToBack()

If Acaf.Text < 3 And Acaf.Text 4 Then Dim x As New Academic_Performance Acaf.Text = Acaf.Text + 1 adopt(x, Me) End If

End Sub

Private Sub WorkReviewToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkReviewToolStripMenuItem.Click ' GroupBox1.Visible = False GroupBox1.SendToBack()

If WrkF.Text < 3 And WrkF.Text 4 Then Dim x As New Work_Review WrkF.Text = WrkF.Text + 1 adopt(x, Me) End If

End Sub

Private Sub SundayWorshipReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SundayWorshipReportToolStripMenuItem.Click ' GroupBox1.Visible = False GroupBox1.SendToBack()

If SWRF.Text < 3 And SWRF.Text 4 Then Dim x As New SWR SWRF.Text = SWRF.Text + 1 adopt(x, Me) End If End Sub
#End Region

#Region "SUBJECTS / TEACHERS"

'EDIT STUDENT SUBJECTS Private Sub AddRemoveSubjectsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddRemoveSubjectsToolStripMenuItem.Click SubjectsStudent.Show() End Sub

'VIEW GRADE Private Sub UpdateGradeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateGradeToolStripMenuItem.Click GradeView.Show() End Sub

'ADD GRADE TO SUBJECTS Private Sub InputGradeToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles InputGradeToolStripMenuItem.Click GradesAndRemarks.Show() End Sub

' EDIT ICCM SUBJECTS Private Sub EditSubjectsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EditSubjectsToolStripMenuItem.Click SubjectsPass.Show() End Sub

Private Sub TeachersInformationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeachersInformationToolStripMenuItem.Click ' GroupBox1.Visible = False GroupBox1.SendToBack() adopt(zTeacherInfo, Me) End Sub

#End Region

#Region "NOTES AND REMINDERS"

Dim m As MsgBoxResult Dim t As String

Private Sub MonthCalendar1_DateSelected(ByVal sender As Object, ByVal e As System.Windows.Forms.DateRangeEventArgs) Handles MonthCalendar1.DateSelected t = MonthCalendar1.SelectionRange.Start.Month.ToString & MonthCalendar1.SelectionRange.Start.Day.ToString

Try If File.Exists(t & ".txt") = True Then MonthCalendar1.Enabled = False MonthCalendar1.Hide() TextBox1.Enabled = True TextBox1.Show() Button1.Enabled = True Button1.Show() Button2.Enabled = True Button2.Show() Clear.Enabled = True Clear.Show() TextBox1.Text = File.ReadAllText(t & ".txt") Else m = MsgBox("Would you like to write a reminder for this date?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If m = MsgBoxResult.Yes Then MonthCalendar1.Enabled = False MonthCalendar1.Hide() TextBox1.Enabled = True TextBox1.Show() Button1.Enabled = True Button1.Show() Button2.Enabled = True Button2.Show() Clear.Enabled = True Clear.Show() End If End If Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click TextBox1.Enabled = False TextBox1.Hide() Button1.Enabled = False Button1.Hide() Button2.Enabled = False Button2.Hide() Clear.Enabled = False Clear.Hide() MonthCalendar1.Show() MonthCalendar1.Enabled = True ' BACK End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Try ' SAVE

Dim ext As MsgBoxResult ext = MsgBox("Save Appointment? ", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then If TextBox1.Text = "" Then If File.Exists(t & ".txt") = True Then File.Delete(t & ".txt") End If End If

If TextBox1.Text.Length > 0 Then File.WriteAllText(t & ".txt", TextBox1.Text) End If MsgBox("Appointment Noted", MsgBoxStyle.Information) End If

Catch ex As Exception MsgBox(ex.Message) End Try End Sub

Private Sub Clear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Clear.Click If TextBox1.Text = "" Then Exit Sub End If

If TextBox1.Text.Length > 0 Then

Dim ext As MsgBoxResult ext = MsgBox("Clear Appointment? ", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then TextBox1.Text = "" End If End If End Sub

Private Sub textbox2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress

e.Handled = True

End Sub

' BIRTHDAY Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Button4.Hide() GroupBox8.Hide() SetAppointment.Show() End Sub

' SET APPOINTMENT Private Sub SetAppointment_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SetAppointment.Click SetAppointment.Hide() Button4.Show() 'GroupBox9.Hide() GroupBox8.Show() GroupBox8.Visible = True MonthCalendar1.Show() GroupBox8.BringToFront()

End Sub

#End Region

#Region "LOAD / CLOSE"

Private Sub Magulang_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim WhatNow As String

WhatNow = Date.Today.DayOfWeek

If WhatNow = "1" Then NOWS.Text = "(Monday)" ElseIf WhatNow = "2" Then NOWS.Text = "(Tuesday)" ElseIf WhatNow = "3" Then NOWS.Text = "(Wednesday)" ElseIf WhatNow = "4" Then NOWS.Text = "(Thursday)" ElseIf WhatNow = "5" Then NOWS.Text = "(Friday)" ElseIf WhatNow = "6" Then NOWS.Text = "(Saturday)" Else NOWS.Text = "(Sunday)" End If

Dim month month = Format(Now, "MM") t = MonthCalendar1.SelectionRange.Start.Month.ToString & MonthCalendar1.SelectionRange.Start.Day.ToString

Dim Bmonth = t.Substring(0, 2) Dim BDay = t.Substring(2)

TotalEnrollee.Text = MySelectSpecific("Select TotalEnrollee from GMCN7Enrollmentdatabase.useraccounts;") EnrolleeThisSem.Text = MySelectSpecific("Select EnrolleeNum from GMCN7Enrollmentdatabase.useraccounts;")

GroupBox1.Hide()

Dim m1 As MsgBoxResult t = MonthCalendar1.SelectionRange.Start.Month.ToString & MonthCalendar1.SelectionRange.Start.Day.ToString

If Date.Today = MonthCalendar1.TodayDate And File.Exists(t & ".txt") = True Then m1 = MsgBox("You have appointments set for today, would you like to view them?", MsgBoxStyle.YesNo, "Confirm")

If m1 = MsgBoxResult.Yes Then GroupBox1.Show() MainTab.Show() TextBox1.Text = File.ReadAllText(t & ".txt") AppointsText.Visible = False TextBox2.Text = TextBox1.Text Label23.Visible = True TextBox2.Show() MainTab.SelectedTab = Reminders Else TextBox1.Text = File.ReadAllText(t & ".txt") TextBox2.Text = TextBox1.Text TextBox1.Hide() Label23.Show() TextBox2.Show() End If Else Label23.Text = "Today is.............. " AppointsText.Visible = True TextBox2.Visible = False TextBox1.Visible = False End If

If MainTab.SelectedTab Is (Mission) Then Mission.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png") ElseIf MainTab.SelectedTab Is (WAW) Then WAW.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png") ElseIf MainTab.SelectedTab Is (Goals) Then Goals.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png") ElseIf MainTab.SelectedTab Is (Reminders) Then Reminders.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png") ElseIf MainTab.SelectedTab Is (Philsophy) Then Philsophy.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png") ElseIf MainTab.SelectedTab Is (Boards) Then Boards.BackgroundImage = Image.FromFile("D:\ICCMStudentPictures\Pics\BackgroundColor.png")

End If

End Sub
#End Region

Private Sub GraduatesAndWorkScholarshipsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduatesAndWorkScholarshipsToolStripMenuItem.Click GroupBox1.SendToBack() ProbationsAndGraduates.Show() End Sub

End Class

FORM LOCK

Public Class Lock

Private Sub OK_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Dim xx = MySelectSpecific("Select AdminPassword from gmcn7enrollmentdatabase.useraccounts;") Dim xxx = MySelectSpecific("Select UserPassword from gmcn7enrollmentdatabase.useraccounts;")

If P.Text = xxx Then Me.Close() Magulang.BringToFront() Magulang.Enabled = True ElseIf P.Text = xx Then Me.Close() Magulang.BringToFront() Magulang.Enabled = True Else Exit Sub End If End Sub

Private Sub Lock_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

End Sub

Private Sub lock_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.Load If e.KeyCode = Keys.F4 And e.Modifiers = Keys.Alt Then e.Handled = True End If End Sub

End Class

NEW ENROLLMENT FORM

Imports System.Drawing

Public Class NEWEnrolForm

Dim UploadChck As Integer = 0 'IMAGE CHECKER Dim y As Integer ' WILL TAKE THE VALUE OF STUDENTID Dim z As Integer = 0 'WILL TAKE THE VALUE OF NO OF ENROLLEE Dim totalValue As Integer ' WILL TAKE THE VALUE OF TOTALUNITS Dim checker As Integer = 0 Dim work As String Dim subj As Integer = 0 Dim Petsa As Integer Dim medchk, notchk, wrkchk, sponchk, workscholarchk As String Dim updatechecker As Integer = 1 Dim xc As String Dim aaa As Integer = 0 Dim a, b, c As String ' SUBJECT INFO TEMP VARIABLE

#Region "FORM LOAD / CLOSING"

Private Sub NEWEnrolForm_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed Magulang.GroupBox1.SendToBack() Magulang.Visible = True

End Sub

Private Sub NEWEnrolForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Populate("Select term from GMCN7EnrollmentDatabase.useraccounts;", XXX)

Term.Text = XXX.Item(0, 0).Value 'SID

Petsa = Format(Now, "yyyy") SYear.Text = Petsa & " - " & Petsa + 1

Me.BringToFront()

z = Val(MySelectSpecific("Select EnrolleeNum from GMCN7EnrollmentDatabase.useraccounts ;")) + 1 y = Val(MySelectSpecific("Select StudentID from GMCN7EnrollmentDatabase.EFStudentInfo order by StudentID DESC limit 1;")) + 1 Populate("Select EnrolleeNum from GMCN7enrollmentDatabase.useraccounts;", ooo)

z = ooo.Item(0, 0).Value + 1

If y < 100000 And y > 9999 Then xc = "000000" & y End If If y < 10000 And y > 999 Then xc = "0000000" & y End If If y < 1000 And y > 99 Then xc = "00000000" & y End If If y < 100 And y > 9 Then xc = "000000000" & y End If If y > 0 And y < 10 Then xc = "0000000000" & y End If

Dim datenow datenow = Format(Now, "yyyy-MM-dd") StudentNumber.Text = Petsa & "-" & xc & "-" & z ' STUDENT_ID

DateEnrolled.Text = datenow SiD.Text = y SubjNum.Text = StudentNumber.Text

End Sub

#End Region

#Region "Enrollment Form"

Private Sub NextBtn_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextBtn.Click Try EnForm2.Enabled = True

Dim textBoxes = EnForm1.Controls.OfType(Of TextBox)() For Each t In textBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t

Dim comboBoxes = EnForm1.Controls.OfType(Of ComboBox)() For Each t In comboBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t

EnForm2.Enabled = True Tab.SelectedTab = EnForm2 Me.Text = "New Enrollee Assessment Form for " & FName.Text & " " & MName.Text & " " & LName.Text Me.Refresh() Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "Enrollment Form2"

Private Sub ADDBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ADDBtn.Click Try If CollegeName.Text = Nothing Or CollegeCourse.Text = Nothing Or CollegeSY.Text = Nothing Then MsgBox("Missing Field(s)", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim Ext As MsgBoxResult Ext = MsgBox("Is this information correct?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then nonQuery("insert into GMCN7EnrollmentDatabase.EFCollegebackground values('" & StudentNumber.Text & "','" & CollegeName.Text & "','" & CollegeCourse.Text & "','" & CollegeSY.Text & "');") MsgBox("Information recorded", MsgBoxStyle.Information, "Confirm") ElseIf Ext = MsgBoxResult.No Then Exit Sub End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

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

Dim textBoxes = EnForm2.Controls.OfType(Of TextBox)() For Each t In textBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Tmedic_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tmedic.SelectedIndexChanged

If Tmedic.Text = "Yes" Then YesSpecify.Enabled = True ElseIf Tmedic.Text = "No" Then YesSpecify.Enabled = False End If

End Sub

Private Sub Addnote_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Addnote.CheckedChanged If Addnote.Checked = True Then NoteTxt.Enabled = True Else NoteTxt.Enabled = False End If End Sub

#End Region

#Region "NAVIGATE BUTTONS" ' BUTTONS FOR NAVIGATION next/back/ CHECKBOXES

#Region "Tab Settings" Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles Tab.SelectedIndexChanged

If Tab.SelectedTab Is EnForm2 Then Me.Text = FName.Text & " " & MName.Text & " " & LName.Text & " New Enrollment Process" Me.Refresh() End If

If Tab.SelectedTab Is (Requirements) Then

'Dim cont As Control 'Dim inc As Integer = 0 'For Each cont In EnForm1.Controls ' If TypeOf cont Is TextBox Or TypeOf cont Is ComboBox Then ' If cont.Text = Nothing Then ' inc += 1 ' End If

' End If

'Next

'If inc > 0 Then ' MsgBox("MISSING FIELD(s)", MsgBoxStyle.Exclamation)

' Tab.SelectedTab = EnForm1

'End If If CStatus.Text = "Married" Then GroupBox13.Visible = True Else GroupBox13.Visible = False End If

End If

If Tab.SelectedTab Is (SubjectInfo) Then SubjNum.Text = StudentNumber.Text SubjName.Text = FName.Text & " " & MName.Text & " " & LName.Text End If

End Sub
#End Region

Private Sub Next2Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next2Btn.Click Try If String.IsNullOrEmpty(ESchool.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing elementary School Field") Exit Sub End If If String.IsNullOrEmpty(EYrGrad.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing elementary Year Grad Field") Exit Sub End If If String.IsNullOrEmpty(HSchool.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing High School School Field") Exit Sub End If If String.IsNullOrEmpty(HYrGrad.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing High School Year Grad Field") Exit Sub End If If String.IsNullOrEmpty(CollegeName.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing College Field") Exit Sub End If If String.IsNullOrEmpty(CollegeCourse.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing College Field") Exit Sub End If If String.IsNullOrEmpty(CollegeSY.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing College Field") Exit Sub End If

If CheckIf.Checked = True Then If String.IsNullOrEmpty(RecentIll.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Medical Field") Exit Sub End If

If String.IsNullOrEmpty(Allergies.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Medical Field") Exit Sub End If If String.IsNullOrEmpty(Handicaps.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Medical Field") Exit Sub End If If String.IsNullOrEmpty(Tmedic.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Medical Field") Exit Sub End If

If Tmedic.Text = "YES" Then If String.IsNullOrEmpty(YesSpecify.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Medical Field") Exit Sub End If End If End If

If Addnote.Checked = True Then If String.IsNullOrEmpty(NoteTxt.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Notes Field") Exit Sub End If End If

WorkExperience.Enabled = True Tab.SelectedTab = WorkExperience

SubjNum.Text = StudentNumber.Text SubjName.Text = FName.Text & " " & MName.Text & " " & LName.Text Me.Text = FName.Text & " " & MName.Text & " " & LName.Text & " New Enrollment Process" Me.Refresh Catch ex As Exception

End Try

End Sub

Private Sub Next3Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next3Btn.Click

Dim textBoxes = WorkExperience.Controls.OfType(Of TextBox)()

If WorkChk.Checked = True Then

If String.IsNullOrEmpty(Workxp.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Work Field") Exit Sub End If If String.IsNullOrEmpty(WorkAdd.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Work Field") Exit Sub End If End If

If SponsorChk.Checked = True Then If String.IsNullOrEmpty(SponsorName.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Sponsor Field") Exit Sub End If If String.IsNullOrEmpty(SponsorsEmail.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Sponsor Field") Exit Sub End If If String.IsNullOrEmpty(SponsorAddress.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Sponsor Field") Exit Sub End If If String.IsNullOrEmpty(SponsorsTelephone.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Sponsor Field") Exit Sub End If If String.IsNullOrEmpty(SponsorsCellphone.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical, "Missing Sponsor Field") Exit Sub End If

End If

SubjectInfo.Enabled = True Tab.SelectedTab = SubjectInfo

End Sub

Private Sub Next4Bt_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next4Btn.Click 'MARRIED OR NOT Dim comboBoxes = SubjectInfo.Controls.OfType(Of ComboBox)() For Each t In comboBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" PLEASE SPECIFY COURSE AND SUBJECTS", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t If subj < 1 Then MsgBox("CHOOSE SUBJECTS", MsgBoxStyle.Information) Exit Sub End If

If AllSubjects.Visible = False Then MsgBox(" PLEASE SPECIFY COURSE AND SUBJECTS", MsgBoxStyle.Critical) Exit Sub Else Requirements.Enabled = True Tab.SelectedTab = Requirements If CStatus.Text = "Married" Then GroupBox13.Visible = True Else GroupBox13.Visible = False End If End If

End Sub

Private Sub Back2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back2Btn.Click Tab.SelectedTab = EnForm1 End Sub

Private Sub Back3Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back3Btn.Click Tab.SelectedTab = EnForm2 End Sub

Private Sub Back4Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back4Btn.Click Tab.SelectedTab = WorkExperience End Sub

Private Sub Back5Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back5Btn.Click Tab.SelectedTab = SubjectInfo End Sub

Private Sub CheckIf_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckIf.CheckedChanged If CheckIf.Checked = True Then RecentIll.Enabled = True Tmedic.Enabled = True Allergies.Enabled = True Handicaps.Enabled = True Else RecentIll.Enabled = False Tmedic.Enabled = False Allergies.Enabled = False Handicaps.Enabled = False End If End Sub

Private Sub WorkChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkChk.CheckedChanged

If WorkChk.Checked = True Then Workxp.Enabled = True WorkAdd.Enabled = True Else Workxp.Enabled = False WorkAdd.Enabled = False End If

End Sub

Private Sub FinancialChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SponsorChk.CheckedChanged If SponsorChk.Checked = True Then SponsorName.Enabled = True SponsorAddress.Enabled = True SponsorsCellphone.Enabled = True SponsorsTelephone.Enabled = True SponsorsEmail.Enabled = True Else SponsorName.Enabled = False SponsorAddress.Enabled = False SponsorsCellphone.Enabled = False SponsorsTelephone.Enabled = False SponsorsEmail.Enabled = False End If

End Sub

Private Sub jimmyexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jimmyexit.Click

Dim Ext As MsgBoxResult Ext = MsgBox("Really Exit?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Magulang.LimiterNew.Text = Magulang.LimiterNew.Text - 1

If aaa = 0 Then nonQuery("Delete from gmcn7enrollmentdatabase.efcollegebackground where StudentID = '" & StudentNumber.Text & "';") Else

End If

Me.Close() Magulang.GroupBox1.Visible = True Magulang.GroupBox1.BringToFront()

End If End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Close() Magulang.GroupBox1.BringToFront() End Sub

' ENROLLMENT PROCEDURES Private Sub GOTOP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GOTOP.Click Dim Ext As MsgBoxResult Ext = MsgBox("Go to Enrollment Procedures?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Me.SendToBack() Dim x As New EnrollmentProcedures adopt(x, Magulang) End If End Sub

#End Region

#Region "UPLOAD PICTURE"

Private Sub UploadBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UploadBtn.Click

Browseforfile(FilePath, PicsKo, "jpeg|*.jpeg| jpg|*.jpg| png|*.png") UploadChck = 1

End Sub

Public Sub getTargetPath(ByVal target As String, ByVal resulttextbox As Label, _ ByVal pinanggalingan As String, ByVal Filename As String) 'pinanggalingan ay yung result file

resulttextbox.Text = target & "\" & Filename & System.IO.Path.GetExtension(pinanggalingan)

End Sub

Public Sub Browseforfile(ByVal resultpath As Label, ByVal pic As PictureBox, ByVal filter As String)

Dim fd As OpenFileDialog = New OpenFileDialog() Dim strFileName As String

fd.Title = "Open File Dialog" fd.InitialDirectory = "C:\" fd.Filter = filter

If fd.ShowDialog() = DialogResult.OK Then strFileName = fd.FileName pic.Image = Image.FromFile(strFileName)

resultpath.Text = strFileName

End If

getTargetPath("D:\ICCMStudentPictures\Pics", ResultFile, FilePath.Text, StudentNumber.Text)

'if working thru network ang ilalagay ay yung IP, then yung shared na folder

End Sub

Public Sub Copyer(ByVal sourcepath As String, ByVal resultpath As String)

My.Computer.FileSystem.CopyFile(sourcepath, resultpath)

End Sub

#Region "save Image"

Private Sub SaveImage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) 'nonQuery("insert into sample.accounts values(" & SiD.Text & ", '" & "D:\\CopyAndPastePROG\\Pics" & "\\'" & SiD.Text & System.IO.Path.GetExtension(FilePath.Text) & "');") ' MsgBox("insert into sample.accounts values(" & SiD.Text & ", '" & "D:\CopyAndPastePROG\Pics" & "\" & SiD.Text & System.IO.Path.GetExtension(FilePath.Text) & "');") ' Copyer(FilePath.Text, ResultFile.Text) 'from 'to

' PictureBox1.Image = Image.FromFile("D:\CopyAndPastePROG\Pics\luffy.jpg")

End Sub
#End Region

#End Region

#Region "KEY RESTRICTIONS"

Private Sub HyrGrad_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles HYrGrad.SelectedIndexChanged Try Dim y As Integer y = Format(Now, "yyyy")

If HYrGrad.Text > y Then HYrGrad.Text = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub CollegeSY_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CollegeSY.SelectedIndexChanged Try

Dim restOfChars = CollegeSY.Text.Substring(0, 4) Dim y As Integer y = Format(Now, "yyyy")

If y - 1 < CInt(restOfChars) Then CollegeSY.Text = "2013 - 2014" y = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub EYrGrad_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EYrGrad.SelectedIndexChanged Try Dim y As Integer y = Format(Now, "yyyy")

If EYrGrad.Text > y Then EYrGrad.Text = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub NEWEnrolForm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress 'GlobalKeyRestriction(e)

End Sub

Private Sub eadd_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Eadd.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_." 'If (Eadd.Text.IndexOf(".") >= 0 And e.KeyChar = ".") Then ' e.Handled = True 'End If If (Eadd.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub SponsorsEmail_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SponsorsEmail.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_."

If (SponsorsEmail.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub eadd2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Eadd2.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_."

If (Eadd2.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub GuaContact_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles GuaContact.KeyPress, FatContact.KeyPress, MotContact.KeyPress, SponsorsCellphone.KeyPress, SponsorsTelephone.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal)

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub Cinfo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CInfo.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If (CInfo.Text.IndexOf("N") >= 0 And e.KeyChar = "N") Then e.Handled = True End If If (CInfo.Text.IndexOf("A") >= 0 And e.KeyChar = "A") Then e.Handled = True End If If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub Cinfo2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CInfo2.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If (CInfo2.Text.IndexOf("N") >= 0 And e.KeyChar = "N") Then e.Handled = True End If If (CInfo2.Text.IndexOf("A") >= 0 And e.KeyChar = "A") Then e.Handled = True End If If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub textbox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress Dim allowedChars As String = "0123" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub Religion_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Religion.KeyPress, Citizenship.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ " 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub textbox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Dim allowedChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890^#+-*" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then

e.Handled = True End If End Sub

Private Sub major_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles YrLevel.KeyPress, Gender.KeyPress, Bloodtype.KeyPress, Tmedic.KeyPress, CStatus.KeyPress, _ Major.KeyPress, CollegeSY.KeyPress, YrLevel.KeyPress, TotalUnits.KeyPress, HYrGrad.KeyPress, EYrGrad.KeyPress, SubjName.KeyPress, SubjNum.KeyPress, Term.KeyPress, Editt.KeyPress e.Handled = True End Sub

#End Region

#Region "SUBJECT INFORMATION"

'POPULATE SUBJECTS Private Sub btnsubject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubject.Click

Try

If checker = 0 Then

Dim Ext As MsgBoxResult Ext = MsgBox("CHOOSE COURSE?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

' CODE NI DIANE

If Major.Text = Nothing Then MsgBox("SPECIFY COURSE ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If YrLevel.Text = Nothing Then MsgBox("SPECIFY YEAR LEVEL ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If Term.Text = Nothing Then MsgBox("SPECIFY SEMESTER ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If Major.Text = "Bachelor in Theology Major in Education" Then ' EDUCATION

If YrLevel.Text = 1 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc1yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc2yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc3yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc4yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 1 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc1yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc2yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc3yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc4yr2sem ;", DupMySubject) GoTo here End If End If

If Major.Text = "Bachelor in Theology Major in Ministry" Then ' MINISTRY

ElseIf YrLevel.Text = 1 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry1yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry2yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry3yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry4yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 1 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry1yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry2yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry3yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry4yr2sem ;", DupMySubject) GoTo here End If

If Major.Text = "Bachelor in Theology Major in Outreach" Then ' OUTREACH

ElseIf YrLevel.Text = 1 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach1yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach2yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach3yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach4yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 1 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach1yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach2yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach3yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach4yr2sem ;", DupMySubject) GoTo here End If

If Major.Text = "Bachelor in Theology Major in Worship" Then 'WORSHIP

ElseIf YrLevel.Text = 1 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship1yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship2yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship3yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship4yr1sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 1 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship1yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 2 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship2yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 3 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship3yr2sem ;", DupMySubject) GoTo here ElseIf YrLevel.Text = 4 And Term.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship4yr2sem ;", DupMySubject) GoTo here End If

here: 'DUPLICATE DATAGRID MYSUBJECTS

For Each dgvRow As DataGridViewRow In DupMySubject.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFDupsubjects values(" & y & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");") totalValue += CInt(dgvRow.Cells(2).Value) '2 means the number of the column

End If Next

Populate("Select SubjectID, Descriptive_Title, Units from GMCN7EnrollmentDatabase.EFdupsubjects;", MySubject) Populate("select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects order by SUnits asc;", AllSubjects) Label54.Visible = True Label55.Visible = True btnremove.Visible = True zz.Visible = True TotalUnits.Visible = True xx.Visible = True SearchSubj.Visible = True btnadd.Visible = True MySubject.Visible = True

TotalUnits.Text = totalValue checker = 1

subj = subj + 1 End If Else

End If Catch ex As Exception MsgBox(ex.ToString) End Try

End Sub

'ADD SUBJECT

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click Try

totalValue = totalValue + AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value

If totalValue > 34 Then MsgBox("YOU ARE FULLY LOADED, CANNOT ENROLL ANY MORE SUBJECTS", MsgBoxStyle.Exclamation) totalValue = totalValue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") ' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & (AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value) & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("SUBJECT ALREADY ADDED", MsgBoxStyle.Information) totalValue = totalValue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value ' rdr = Nothing con.Close() Exit Sub End If con.Close() Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT : " & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim dt As DataTable = DirectCast(MySubject.DataSource, DataTable) dt.Rows.Add(AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value) TotalUnits.Text = totalValue

nonQuery("insert into GMCN7EnrollmentDatabase.EFDupsubjects values(" & y & ",'" & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & "','" & AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value & "'," & AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value & ");")

End If

Catch ex As Exception Exit Sub End Try End Sub

'DELETE SUBJECT

Private Sub btnremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnremove.Click

Dim Ext As MsgBoxResult Ext = MsgBox("REMOVE SUBJECT : " & MySubject.Item(0, MySubject.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

If MySubject.RowCount < 2 Then MsgBox("YOU SHOULD HAVE AT LEAST 1 SUBJECT ENROLLED", MsgBoxStyle.Information) Exit Sub End If

totalValue = totalValue - MySubject.Item(2, MySubject.CurrentRow.Index).Value TotalUnits.Text = totalValue

nonQuery("delete from GMCN7EnrollmentDatabase.EFDupsubjects where subjectID = '" & MySubject.Item(0, MySubject.CurrentRow.Index).Value & "';") MySubject.Rows.RemoveAt(MySubject.CurrentRow.Index)

End If

End Sub

Private Sub MySubject_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles MySubject.CellDoubleClick

Dim Ext As MsgBoxResult Ext = MsgBox("UPDATE SUBJECT : '" & MySubject.Item(0, MySubject.CurrentRow.Index).Value & "' ? ", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then btnremove.Enabled = False btnadd.Enabled = False MySubject.Enabled = False UpdateBox.Show() Editt.Text = MySubject.Item(0, MySubject.CurrentRow.Index).Value

TextBox1.Text = MySubject.Item(0, MySubject.CurrentRow.Index).Value TextBox2.Text = MySubject.Item(1, MySubject.CurrentRow.Index).Value TextBox3.Text = MySubject.Item(2, MySubject.CurrentRow.Index).Value

Exit Sub End If

' End If

End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox1.Text = Nothing Or TextBox2.Text = Nothing Or TextBox3.Text = Nothing Then MsgBox("Missing Fields", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") ' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & TextBox1.Text & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("THAT SUBJECT IS ALREADY ADDED", MsgBoxStyle.Information, "Students Subjects")

con.Close() Exit Sub End If con.Close()

Dim Ext As MsgBoxResult Ext = MsgBox("Update subject ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

totalValue = totalValue - MySubject.Item(2, MySubject.CurrentRow.Index).Value

MySubject.Item(0, MySubject.CurrentRow.Index).Value = TextBox1.Text MySubject.Item(1, MySubject.CurrentRow.Index).Value = TextBox2.Text MySubject.Item(2, MySubject.CurrentRow.Index).Value = TextBox3.Text btnremove.Enabled = True btnadd.Enabled = True MySubject.Enabled = True UpdateBox.Hide() totalValue = totalValue + TextBox3.Text MsgBox("Subject Updated", MsgBoxStyle.Information, "Confirm") TotalUnits.Text = totalValue End If End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click btnremove.Enabled = True btnadd.Enabled = True MySubject.Enabled = True UpdateBox.Hide() End Sub

Private Sub major_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Major.SelectedIndexChanged, YrLevel.SelectedIndexChanged nonQuery("delete from GMCN7EnrollmentDatabase.EFDupSubjects;") totalValue = 0 checker = 0 End Sub

' SEARCH SUBJECT

Private Sub SearchSubj_TextChanged_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchSubj.TextChanged

If SearchSubj.Text = Nothing Then Populate("select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects order by Sunits asc;", AllSubjects) Else Populate("Select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects where SubjectID or DescriptiveTitle like '%" & SearchSubj.Text & "%';", AllSubjects)

End If

End Sub

#End Region

#Region "SUBMIT ALL"

' SCHOLAR Private Sub ScholarChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ScholarChk.CheckedChanged If ScholarChk.Checked = True Then GB1.Visible = True GB2.Visible = True GB3.Visible = True Else GB1.Visible = False GB2.Visible = False GB3.Visible = False End If End Sub

Dim EnrolleeChecker As Integer = 0 Dim dont As Integer = 1 ' PREVENT Private Sub SubmitAllBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitAllBtn.Click Try dont = 1 If dont = 1 Then again: 'CHECKS IF THERE ARE MISSING FIELDS LEFT Dim textBoxes1 = EnForm1.Controls.OfType(Of TextBox)() For Each t In textBoxes1 If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at PAGE 1", MsgBoxStyle.Information) Exit Sub Exit For End If Next t

Dim comboBoxes = EnForm1.Controls.OfType(Of ComboBox)() For Each t In comboBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at PAGE 1", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t

If String.IsNullOrEmpty(ESchool.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(EYrGrad.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HSchool.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HYrGrad.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(CollegeName.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(CollegeCourse.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(CollegeSY.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If CheckIf.Checked = True Then If String.IsNullOrEmpty(RecentIll.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If String.IsNullOrEmpty(Allergies.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Handicaps.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Tmedic.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If Tmedic.Text = "YES" Then If String.IsNullOrEmpty(YesSpecify.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If End If End If

If Addnote.Checked = True Then If String.IsNullOrEmpty(NoteTxt.Text) Then MsgBox(" MISSING FIELD(S) at NOTES FIELD", MsgBoxStyle.Critical) Exit Sub End If End If ' GoTo a 'a:

If WorkChk.Checked = True Then

If String.IsNullOrEmpty(Workxp.Text) Then MsgBox(" MISSING FIELD(S) at WORK EXPERIENCE", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(WorkAdd.Text) Then MsgBox(" MISSING FIELD(S) at WORK EXPERIENCE", MsgBoxStyle.Critical) Exit Sub End If

End If

If SponsorChk.Checked = True Then

If String.IsNullOrEmpty(SponsorName.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SponsorsEmail.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SponsorAddress.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SponsorsTelephone.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SponsorsCellphone.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If

End If

If subj = 0 Then MsgBox(" NO COURSE YET ", MsgBoxStyle.Critical, "Confirm") Exit Sub End If

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim extt As MsgBoxResult If RegFeeYes.Checked = False Then extt = MsgBox("Registration fee has not been paid/settled yet, proceed?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If extt = MsgBoxResult.Yes Then

Else Exit Sub End If End If

'ENROLLMENT FORM PAGE 1

aaa = 1

nonQuery("insert into GMCN7EnrollmentDatabase.EFStudentInfo values('" & SYear.Text & "'," & y & ", 0 ,'NOT ENROLLED','" & DateEnrolled.Text & "','" & _ LName.Text & "','" & FName.Text & "','" & MName.Text & "','" & Major.Text & "'," & YrLevel.Text & ",'" & _ Term.Text & "','" & BPlace.Text & "','" & Address.Text & "','" & Address2.Text & "','" & CInfo.Text & "','" & CInfo2.Text & "','" & Eadd.Text & "','" & _ Eadd2.Text & "','" & CStatus.Text & "','" & DTP.Text & "','" & Gender.Text & "','" & Citizenship.Text & "','" & Religion.Text & "','" & FatName.Text & _ "','" & OccFat.Text & "','" & FatContact.Text & "','" & MotName.Text & "','" & OccMot.Text & "','" & MotContact.Text & "','" & GuaName.Text & "','" & GuaContact.Text & "','" & _ OccGua.Text & "','" & Bloodtype.Text & "','" & work & "'," & totalValue & ",'" & StudentNumber.Text & "','" & ESchool.Text & "','" & EYrGrad.Text & "','" & HSchool.Text & "','" & HYrGrad.Text & "','New Student', 0 , 'NO', 'NO');")

'ENROLLMENT FORM PAGE 2 For Each dgvRow As DataGridViewRow In bnm.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFCollegebackground values('" & StudentNumber.Text & "','" & dgvRow.Cells(1).Value & "','" & dgvRow.Cells(2).Value & "','" & dgvRow.Cells(3).Value & "');") End If Next nonQuery("insert into GMCN7EnrollmentDatabase.EFCollegebackground values('" & StudentNumber.Text & "','" & CollegeName.Text & "','" & CollegeCourse.Text & "','" & CollegeSY.Text & "');")

If Addnote.Checked = True Then notchk = "YES" nonQuery("insert into GMCN7EnrollmentDatabase.EFnotes values('" & StudentNumber.Text & "', '" & NoteTxt.Text & "','" & DateEnrolled.Text & "');") ElseIf Addnote.Checked = False Then notchk = "NO" nonQuery("insert into GMCN7EnrollmentDatabase.EFnotes values('" & StudentNumber.Text & "', '-','-');") End If

' MEDICAL ISSUES If CheckIf.Checked = True Then medchk = "YES" If Tmedic.Text = "Yes" Then nonQuery("insert into GMCN7EnrollmentDatabase.EFmedical values('" & StudentNumber.Text & "' ,'" & RecentIll.Text & "','" & Allergies.Text & "','" & Handicaps.Text & "','" & Tmedic.Text & "','" & YesSpecify.Text & "');") ElseIf Tmedic.Text = "No" Then nonQuery("insert into GMCN7EnrollmentDatabase.EFmedical values('" & StudentNumber.Text & "', '" & RecentIll.Text & "','" & Allergies.Text & "','" & Handicaps.Text & "','" & Tmedic.Text & "',' ');") End If ElseIf CheckIf.Checked = False Then nonQuery("insert into GMCN7EnrollmentDatabase.EFmedical values('" & StudentNumber.Text & "','NA','NA','NA','No','NA');") medchk = "NO" End If

' UPLOAD THE IMAGE

If UploadChck = 0 Then nonQuery("insert into GMCN7EnrollmentDatabase.EFpictures values('" & StudentNumber.Text & "','NA');") Else nonQuery("insert into GMCN7EnrollmentDatabase.EFpictures values('" & StudentNumber.Text & "', 'D:\\ICCMStudentPictures\\Pics" & "\\" & StudentNumber.Text & System.IO.Path.GetExtension(FilePath.Text) & "');") Copyer(FilePath.Text, ResultFile.Text) UploadChck = 0 End If

' WORK EXPERIENCE

If WorkChk.Checked = True Then wrkchk = "YES" nonQuery("insert into GMCN7EnrollmentDatabase.EFWorkExperience values('" & StudentNumber.Text & "','" & Workxp.Text & "','" & WorkAdd.Text & "');") Else nonQuery("insert into GMCN7EnrollmentDatabase.EFWorkExperience values('" & StudentNumber.Text & "','NA','NA');") wrkchk = "NO" End If

' SPONSORS If SponsorChk.Checked = True Then sponchk = "YES" nonQuery("insert into GMCN7EnrollmentDatabase.EFsponsor values('" & StudentNumber.Text & "', '" & SponsorName.Text & "','" & SponsorsEmail.Text & "','" & SponsorAddress.Text & "','" & SponsorsTelephone.Text & "','" & SponsorsCellphone.Text & "');") ElseIf SponsorChk.Checked = False Then nonQuery("insert into GMCN7EnrollmentDatabase.EFsponsor values('" & StudentNumber.Text & "', 'NA','NA','NA','NA','NA');") sponchk = "NO" End If

' SUBJECT INFORMATION For Each dgvRow As DataGridViewRow In MySubject.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFsubjects values('" & StudentNumber.Text & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");") nonQuery("insert into GMCN7EnrollmentDatabase.efsubjectsjournal values('" & StudentNumber.Text & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");")

If YrLevel.Text = 1 And Term.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 1 And Term.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 2 And Term.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 2 And Term.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 3 And Term.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks3rdYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 3 And Term.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks3rdYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 4 And Term.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks4thYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel.Text = 4 And Term.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks4thYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel.Text & "," & Term.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") End If End If Next

' DELETES DUPLICATE SUBJECTS CONTENT nonQuery("delete from GMCN7EnrollmentDatabase.EFDupSubjects;")

' STUDENTS JOURNAL

nonQuery("insert into GMCN7EnrollmentDatabase.efstudentjournal values('" & SYear.Text & "','" & StudentNumber.Text & "','" & LName.Text & "','" & Major.Text & "'," & YrLevel.Text & "," & Term.Text & "," & totalValue & ",'" & DateEnrolled.Text & "', 0,0,0);")

' REQUIREMENTS Dim R1, R2, R3, R5, R6, R7, R8, R9, R10, R11, R12, R13, R14, R15 As String

If TwoxTwoYes.Checked = True Then R1 = "Yes" Else R1 = "No" End If

If OneXOneYes.Checked = True Then R2 = "Yes" Else R2 = "No" End If

If Form137or138Yes.Checked = True Then R3 = "YES" Else R3 = "No" End If

If TORYes.Checked = True Then R5 = "YES" Else R5 = "No" End If

If GoodMoralYes.Checked = True Then R6 = "YES" Else R6 = "No" End If

If LetterRefYes.Checked = True Then R7 = "YES" Else R7 = "No" End If

If LetterFinancialYes.Checked = True Then R8 = "YES" Else R8 = "No" End If

If EssayYes.Checked = True Then R9 = "YES" Else R9 = "No" End If

If BirthCertYes.Checked = True Then R10 = "YES" Else R10 = "No" End If

If MarriageCertYes.Checked = True Then R11 = "YES" Else R11 = "No" End If

If BrgyClearYes.Checked = True Then R12 = "YES" Else R12 = "No" End If

If NBIYes.Checked = True Then R13 = "YES" Else R13 = "No" End If

If PoliceClearYes.Checked = True Then R14 = "YES" Else R14 = "No" End If

If RegFeeYes.Checked = True Then R15 = "YES" Else R15 = "No" End If

Dim r16, r17, r18 As String 'FOR WORK SCHOLARS

If PhotoHouse.Checked = True Then r16 = "Yes" Else r16 = "No" End If

If ElecBill.Checked = True Then r17 = "Yes" Else r17 = "No" End If

If TelBil.Checked = True Then r18 = "Yes" Else r18 = "No" End If

If ScholarChk.Checked = True Then workscholarchk = "YES" nonQuery("insert into GMCN7EnrollmentDatabase.EFrequirementsWorkScholar values('" & StudentNumber.Text & "','" & r16 & "','" & r17 & "','" & r18 & "');") Else workscholarchk = "NO" nonQuery("insert into GMCN7EnrollmentDatabase.EFrequirementsWorkScholar values('" & StudentNumber.Text & "','NO','NO','NO');")

End If

nonQuery("Insert into GMCN7EnrollmentDatabase.EFrequirements values ('" & StudentNumber.Text & "','" & R1 & "','" & R2 & "','" & R3 & _ "','" & R5 & "','" & R6 & "','" & R7 & "','" & R8 & "','" & R9 & _ "','" & R10 & "','" & R12 & "','" & R13 & "','" & R14 & "','" & R15 & "','" & R11 & "');")

' CHECK CHECKER

nonQuery("insert into GMCN7EnrollmentDatabase.efCheckBoxChecker values('" & StudentNumber.Text & "','" & medchk & "','" & notchk & "','" & wrkchk & "','" & sponchk & "','NO', 'NO' , 'NO','" & workscholarchk & "');") nonQuery("update GMCN7EnrollmentDatabase.useraccounts set EnrolleeNum = " & z & ";")

If EnrolleeChecker = 0 Then nonQuery("Update GMCN7EnrollmentDatabase.useraccounts set TotalEnrollee = TotalEnrollee + 1;") EnrolleeChecker = 1 End If

Magulang.TotalEnrollee.Text = MySelectSpecific("Select TotalEnrollee from GMCN7EnrollmentDatabase.useraccounts;") Magulang.EnrolleeThisSem.Text = MySelectSpecific("Select EnrolleeNum from GMCN7EnrollmentDatabase.useraccounts;")

SubmitAllBtn.Hide() MsgBox("INFORMATION SUCCESSFULLY SUBMITTED", MsgBoxStyle.Information)

Magulang.LimiterNew.Text = Magulang.LimiterNew.Text - 1 dont = 1 Me.ControlBox = True GroupBox19.Visible = True

EnrollmentProcedures.TextID.Text = StudentNumber.Text ' Me.Close()

ElseIf Ext = MsgBoxResult.No Then Exit Sub End If

' DISREGARD v ElseIf dont = 2 Then nonQuery("delete from GMCN7EnrollmentDatabase.efstudentinfo where student_id = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efCheckBoxChecker where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efrequirements where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efrequirementsworkscholar where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efstudentjournal where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.EFsubjects where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efsponsor where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efworkexperience where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efpictures where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efmedical where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efnotes where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.efcollegebackground where studentid = '" & StudentNumber.Text & "';") nonQuery("delete from GMCN7EnrollmentDatabase.studentremarks where studentid = '" & StudentNumber.Text & "';")

dont = 1 GoTo again

End If Catch ex As Exception ' MsgBox(ex.ToString) Exit Sub End Try End Sub
#End Region

End Class

OLD ENROLLMENT FORM

Imports System.Drawing

Public Class OLD_REG_FORM Dim UploadChck As Integer = 0 Dim CollegeAddChck As Integer = 0 Dim CollegeAdd As Integer = 0 Dim z As Integer 'NO OF ENROLLEE Dim x As Integer ' LATTER NO OF ENROLLEE Dim LastSemUnits As Integer ' WILL TAKE THE VALUE OF LAST SEM UNITS Dim ThisSemUnits As Integer ' THIS SEM UNITS Dim totalAllunits As Integer ' OVERALLUNITS Dim SID As String ' WILL TAKE STUDENT NUMBER

Dim dont As Integer = 0 Dim subj As Integer = 0 'Subj checker Dim work As String ' financial Dim medchk, notchk, wrkchk, sponchk, workscholarchk As String ' checkbox checker Dim updatechecker As Integer = 1 Dim x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14 As String ' REQUIREMENTS Dim j, k, l As String ' SUBJECT INFO TEMP VARIABLE Dim tabchecker As Integer = 0

#Region "FORM LOAD / CLOSE"

Private Sub OLD_REG_FORM_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed Magulang.GroupBox1.BringToFront() Me.Close() End Sub Private Sub OLD_REG_FORM_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID , concat(Last_Name , ' , ', First_Name, ' ' , Middle_Name) as Name,major, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo WHERE isEnrolled = 'NOT ENROLLED' order by Year_Level asc;", DGView) Populate("Select Term from GMCN7EnrollmentDatabase.useraccounts;", Dzxc) Sems.Text = Dzxc.Item(0, 0).Value

Enform2.Enabled = False SubjectInfo.Enabled = False WorkExperience.Enabled = False Requirements.Enabled = False ' Magulang.GroupBox1.Visible = False

Me.BringToFront() Magulang.GroupBox1.SendToBack()

End Sub

#End Region

#Region "ADD NOTE PG2" Dim note As Integer = 1 Dim counter As Integer = 0

Private Sub NoteAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NoteAdd.Click Try Dim checkk As String Dim datenow datenow = Format(Now, "yyyy-MM-dd") If note = 1 Then

Dim Ext As MsgBoxResult Ext = MsgBox("ADD A NOTE ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then NoteAdd.Text = "Submit Note" Notebook.Visible = True DD5.Visible = False NoteNote.Visible = False note = 2 Else If checkk = "NO" Then ' NOTES Notebook.Visible = False DD5.Visible = False NoteNote.Visible = True Notebook.Text = "" Else Notebook.Visible = False DD5.Visible = True DD5.BringToFront() Notebook.Text = ""

End If Exit Sub End If

ElseIf note = 2 Then Dim Ext2 As MsgBoxResult Ext2 = MsgBox("SUBMIT NOTE ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext2 = MsgBoxResult.Yes Then note = 1

If Notebook.Text = Nothing Then MsgBox("Enter your note", MsgBoxStyle.Information) note = 2 Exit Sub End If NoteAdd.Text = "Add Note" If counter = 0 Then counter = 1 checkk = "YES" Populate("Select Notes, Date_Noted from gmcn7enrollmentdatabase.efnotes where StudentID = '" & SID & "';", DD5) Dim dt As DataTable = DirectCast(DD5.DataSource, DataTable) dt.Rows.Add(Notebook.Text, datenow) MsgBox("NOTE ADDED", MsgBoxStyle.Information) Notebook.Visible = False Notebook.Text = "" NoteNote.Visible = False DD5.Visible = True ' MySubject.Rows.RemoveAt(0) DD5.BringToFront()

Else

checkk = "NO" DD5.Visible = True Dim dt As DataTable = DirectCast(DD5.DataSource, DataTable) dt.Rows.Add(Notebook.Text, datenow) MsgBox("NOTE ADDED", MsgBoxStyle.Information) Notebook.Visible = False Notebook.Text = "" NoteNote.Visible = False

End If

Else NoteAdd.Text = "Add Note" If checkk = "NO" Then ' NOTES Notebook.Visible = False DD5.Visible = False NoteNote.Visible = True Notebook.Text = "" Else Notebook.Visible = False DD5.Visible = True DD5.BringToFront() Notebook.Text = ""

End If note = 1 Exit Sub End If

End If Catch ex As Exception Exit Sub End Try End Sub
#End Region

#Region "SELECT"

Private Sub OldTab_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles OldTab.SelectedIndexChanged If tabchecker = 0 Then ' Checks if a student has been picked If Not OldTab.SelectedTab Is (Enform1) Then MsgBox("PlEASE SPECIFY FIRST STUDENT TO PROCEED", MsgBoxStyle.Information) OldTab.SelectedTab = Enform1

Exit Sub End If End If End Sub

Private Sub Input_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Input.TextChanged

If Input.Text = Nothing Then Populate("Select Student_ID, concat( Last_Name, ' , ', First_Name, ' ' , Middle_Name) as Name , major, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo where isEnrolled = 'NOT ENROLLED' order by Student_ID asc;", DGView) Else Populate("Select Student_ID, concat( Last_Name, ' , ', First_Name, ' ' , Middle_Name) as Name, major, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo where isEnrolled = 'NOT ENROLLED' and Last_Name like '%" & Input.Text & "%' order by Student_ID asc;", DGView)

End If

End Sub

Dim haveGrades As String Private Sub DGView_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGView.CellDoubleClick 'Dim value As Object = DGView.Rows(e.RowIndex).Cells(e.ColumnIndex).Value

Try haveGrades = MySelectSpecific("Select HasGrades from GMCN7EnrollmentDatabase.EFstudentinfo where Student_ID = '" & DGView.Item(0, DGView.CurrentRow.Index).Value & "';")

If haveGrades = "NO" Then Dim Ext2 As MsgBoxResult Ext2 = MsgBox(DGView.Item(1, DGView.CurrentRow.Index).Value & "'s last sems grade is still not evaluated, do you want to continue ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext2 = MsgBoxResult.Yes Then GoTo here Else Exit Sub End If End If

Dim Ext As MsgBoxResult Ext = MsgBox("Select " & DGView.Item(1, DGView.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then here: Num.Text = DGView.Item(0, DGView.CurrentRow.Index).Value tabchecker = 1 ' HIDE!

SID = Num.Text

Dim TextBoxes = Enform1.Controls.OfType(Of TextBox)() For Each t In TextBoxes

t.Visible = True

Next t

Dim Labels = Enform1.Controls.OfType(Of Label)() For Each la In Labels

la.Visible = True Next la

Dim CBox = Enform1.Controls.OfType(Of ComboBox)() For Each c In CBox

c.Visible = True

Next c

Dim Btn = Enform1.Controls.OfType(Of Button)() For Each b In Btn

b.Visible = True

Next b

Dim Petsa As Integer Petsa = Format(Now, "yyyy") SYear.Text = Petsa & " - " & Petsa + 1 SchoolY.Text = Petsa

Dim datenow datenow = Format(Now, "yyyy-MM-dd") DateEnrolled.Text = datenow

Populate("select * from GMCN7EnrollmentDatabase.EFstudentinfo where Student_ID = '" & Num.Text & "';", D) Populate("Select * from GMCN7EnrollmentDatabase.EFCollegeBackground where StudentID = '" & SID & "';", Dcollege) Populate("select Term from GMCN7EnrollmentDatabase.useraccounts ;", XXX)

Populate("Select * from GMCN7EnrollmentDatabase.efRequirements where StudentID = '" & Num.Text & "';", D7) ' REQUIREMENTS

Populate("Select * from GMCN7EnrollmentDatabase.EFsubjects where studentID = '" & Num.Text & "';", LastSubjects) ' SUBJECTS LAST SEM ' Populate("Select Units, Descriptive_Title, SubjectID from gmcn7enrollmentdatabase.efsubjects where StudentID = '" & Num.Text & "';", DGPass)

Populate("Select * from GMCN7EnrollmentDatabase.EFCheckBoxChecker where studentID = '" & Num.Text & "';", D12)

Dim sy As Integer Dim ys

'Dim enrolled

x = Val(MySelectSpecific("Select number_Of_enrollee from GMCN7EnrollmentDatabase.EFStudentInfo where StudentID = '" & Num.Text & "';")) sy = Val(MySelectSpecific("Select School_Year from GMCN7EnrollmentDatabase.EFStudentInfo where StudentID = '" & Num.Text & "';")) ys = sy

' STUDENT INFO

' ENROLLMENT FORM 1

StudentNumber.Text = D.Item(35, 0).Value SchoolY.Text = ys

DateEnrolled.Text = D.Item(4, 0).Value LName.Text = D.Item(5, 0).Value FName.Text = D.Item(6, 0).Value MName.Text = D.Item(7, 0).Value Major2.Text = D.Item(8, 0).Value YrLevel2.Text = D.Item(9, 0).Value Term2.Text = XXX.Item(0, 0).Value Term.Text = D.Item(10, 0).Value ' TERM BPlace.Text = D.Item(11, 0).Value Address.Text = D.Item(12, 0).Value AAddress.Text = D.Item(13, 0).Value CInfo.Text = D.Item(14, 0).Value ACInfo.Text = D.Item(15, 0).Value Eadd.Text = D.Item(16, 0).Value AEadd.Text = D.Item(17, 0).Value CStatus.Text = D.Item(18, 0).Value Bdate.Text = D.Item(19, 0).Value Gender.Text = D.Item(20, 0).Value Citizenship.Text = D.Item(21, 0).Value Religion.Text = D.Item(22, 0).Value FatName.Text = D.Item(23, 0).Value OccFat.Text = D.Item(24, 0).Value FatContact.Text = D.Item(25, 0).Value MotName.Text = D.Item(26, 0).Value OccMot.Text = D.Item(27, 0).Value MotContact.Text = D.Item(28, 0).Value GuaName.Text = D.Item(29, 0).Value OccGua.Text = D.Item(31, 0).Value GuaContact.Text = D.Item(30, 0).Value Bloodtype.Text = D.Item(32, 0).Value

'FINANCIAL

If D.Item(33, 0).Value = "WORKING" Then FinWork.Checked = True ElseIf D.Item(33, 0).Value = "PART TIME WORKING and PAYING" Then FinPart.Checked = True Else FinPaying.Checked = True End If

LastSemUnits = D.Item(34, 0).Value ' LAST SEM UNITS ESchool.Text = D.Item(36, 0).Value EYrGrad.Text = D.Item(37, 0).Value HSchool.Text = D.Item(38, 0).Value HYrGrad.Text = D.Item(39, 0).Value

' ENROLLMENT FORM 2

'EDUCATIONAL(BACKGROUND)

If Not Dcollege.Item(1, 0).Value = Nothing Then Dcollege.Show() Populate("Select College_Name, College_course, College_Year from GMCN7EnrollmentDatabase.efcollegebackground where StudentID = '" & SID & "';", Dcollege) ' MEDICAL ' 'CollegeName.Text = D3.Item(1, 0).Value 'CollegeCourse.Text = D3.Item(2, 0).Value 'CollegeSY.Text = D3.Item(3, 0).Value

Else Populate("Select College_Name, College_course, College_Year from GMCN7EnrollmentDatabase.efcollegebackground where StudentID = '" & SID & "';", Dcollege) ' MEDICAL Label372.Show() Label373.Show() Label374.Show() CollegeName.Show() CollegeSY.Show() CollegeCourse.Show() Dcollege.Hide() End If

' CHECK

If D12.Item(1, 0).Value = "YES" Then ' MEDICAL CheckIf.Checked = True Populate("Select * from GMCN7EnrollmentDatabase.EFmedical where StudentID = '" & SID & "';", D4) ' MEDICAL

RecentIll.Text = D4.Item(1, 0).Value Allergy.Text = D4.Item(2, 0).Value Handicap.Text = D4.Item(3, 0).Value Tmedic.Text = D4.Item(4, 0).Value YesSpecify.Text = D4.Item(5, 0).Value Else CheckIf.Checked = False End If

If D12.Item(2, 0).Value = "YES" Then ' NOTES

Populate("Select Notes, Date_Noted from GMCN7EnrollmentDatabase.EFnotes where StudentID = '" & SID & "';", DD5) ' NOTES Notebook.Visible = False NoteNote.Visible = False Else DD5.Visible = False Notebook.Visible = False NoteNote.Visible = True End If

If D12.Item(3, 0).Value = "YES" Then ' WORK WorkCheck.Checked = True Populate("Select * from GMCN7EnrollmentDatabase.EFworkexperience where StudentID = '" & Num.Text & "';", D6) ' WORK EXPERIENCE Workxp.Text = D6.Item(1, 0).Value WorkAdd.Text = D6.Item(2, 0).Value Else WorkCheck.Checked = False End If

If D12.Item(4, 0).Value = "YES" Then ' SPONSOR SponsorChk.Checked = True Populate("Select * from GMCN7EnrollmentDatabase.EFsponsor where StudentID = '" & Num.Text & "';", D8) ' SPONSOR Sname.Text = D8.Item(1, 0).Value SAddress.Text = D8.Item(2, 0).Value SEmail.Text = D8.Item(3, 0).Value STEL.Text = D8.Item(4, 0).Value SCell.Text = D8.Item(5, 0).Value Else SponsorChk.Checked = False End If

Label6.Visible = False Input.Visible = False DGView.Visible = False Num.Visible = False ResultFile.Visible = False FilePath.Visible = False SPECIFY.Visible = False

PicsKo.Visible = True NextBtn.Visible = True

'OPENS ALL TAB Enform2.Enabled = True SubjectInfo.Enabled = True WorkExperience.Enabled = True Requirements.Enabled = True

Me.Text = FName.Text & " " & MName.Text & " " & LName.Text & "'s Regular Student Assessment Form" Me.Refresh()

' Dim picssss = MySelectSpecific("Select PicturePath from gmcn7enrollmentdatabase.efpictures where StudentID = '" & Num.Text & "';")

Populate("Select PicturePath from GMCN7EnrollmentDatabase.efpictures where studentID = '" & Num.Text & "';", D12)

If D12.Item(0, 0).Value = "NA" Then Exit Sub Else PicsKo.Image = Image.FromFile(D12.Item(0, 0).Value)

End If

End If

Catch ex As Exception MsgBox(ex.ToString) End Try

End Sub

#End Region

#Region "ADD COLLEGE / ADDnotes / TMEDIC"

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

CollegeName.Visible = True CollegeSY.Visible = True CollegeCourse.Visible = True

CollegeAdd = CollegeAdd + 1

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub CheckIf_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckIf.CheckedChanged

If CheckIf.Checked = True Then RecentIll.Enabled = True Tmedic.Enabled = True Allergy.Enabled = True Handicap.Enabled = True Else RecentIll.Enabled = False Tmedic.Enabled = False Allergy.Enabled = False Handicap.Enabled = False End If End Sub

Private Sub Tmedic_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tmedic.SelectedIndexChanged

If Tmedic.Text = "Yes" Then YesSpecify.Enabled = True ElseIf Tmedic.Text = "No" Then YesSpecify.Enabled = False End If

End Sub

Private Sub WorkCheck_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles WorkCheck.CheckedChanged If WorkCheck.Checked = True Then Workxp.Enabled = True WorkAdd.Enabled = True Else Workxp.Enabled = False WorkAdd.Enabled = False End If End Sub

Private Sub SponsorChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SponsorChk.CheckedChanged If SponsorChk.Checked = True Then Sname.Enabled = True SAddress.Enabled = True SCell.Enabled = True STEL.Enabled = True SEmail.Enabled = True Else Sname.Enabled = False SAddress.Enabled = False SCell.Enabled = False STEL.Enabled = False SEmail.Enabled = False End If End Sub

#End Region

#Region "KEY RESTRICTIONS"

Private Sub HyrGrad_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles HYrGrad.SelectedIndexChanged Try Dim y As Integer y = Format(Now, "yyyy")

If HYrGrad.Text > y Then HYrGrad.Text = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub CollegeSY_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles CollegeSY.SelectedIndexChanged Try

Dim restOfChars = CollegeSY.Text.Substring(0, 4) Dim y As Integer y = Format(Now, "yyyy")

If y - 1 < CInt(restOfChars) Then CollegeSY.Text = "2013 - 2014" y = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub EYrGrad_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EYrGrad.SelectedIndexChanged Try Dim y As Integer y = Format(Now, "yyyy")

If EYrGrad.Text > y Then EYrGrad.Text = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub NEWEnrolForm_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress 'GlobalKeyRestriction(e)

End Sub

Private Sub eadd_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Eadd.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_."

If (Eadd.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub SponsorsEmail_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SEmail.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_." 'If (SEmail.Text.IndexOf(".") >= 0 And e.KeyChar = ".") Then ' e.Handled = True 'End If If (SEmail.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub eadd2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Eadd2.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_." 'If (Eadd2.Text.IndexOf(".") >= 0 And e.KeyChar = ".") Then ' e.Handled = True 'End If If (Eadd2.Text.IndexOf("@") >= 0 And e.KeyChar = "@") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub YrLevel2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim allowedChars As String = "1234" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub GuaContact_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles GuaContact.KeyPress, FatContact.KeyPress, MotContact.KeyPress, SCell.KeyPress, STEL.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal)

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Cinfo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CInfo.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If (CInfo.Text.IndexOf("N") >= 0 And e.KeyChar = "N") Then e.Handled = True End If If (CInfo.Text.IndexOf("A") >= 0 And e.KeyChar = "A") Then e.Handled = True End If If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Cinfo2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles CInfo2.KeyPress Dim allowedChars As String = "NA1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If (CInfo2.Text.IndexOf("N") >= 0 And e.KeyChar = "N") Then e.Handled = True End If If (CInfo2.Text.IndexOf("A") >= 0 And e.KeyChar = "A") Then e.Handled = True End If If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Religion_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Religion.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ. " 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Major2_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles YrLevel2.KeyPress, Editt.KeyPress, Term2.KeyPress, HYrGrad.KeyPress, EYrGrad.KeyPress, CollegeSY.KeyPress, SubjName.KeyPress, SubjNum.KeyPress, TotalUnits.KeyPress, Sems.KeyPress e.Handled = True

End Sub

Private Sub textbox93_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox93.KeyPress Dim allowedChars As String = "0123" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub textbox91_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox91.KeyPress Dim allowedChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890^#+-*" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

#End Region

#Region "UPLOAD IMAGE"

Private Sub UploadBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UploadBtn.Click Browseforfile(FilePath, PicsKo, "jpeg|*.jpeg| jpg|*.jpg| png|*.png") UploadChck = UploadChck + 1 End Sub

Public Sub getTargetPath(ByVal target As String, ByVal resulttextbox As Label, _ ByVal pinanggalingan As String, ByVal Filename As String) 'pinanggalingan ay yung result file

resulttextbox.Text = target & "\" & Filename & System.IO.Path.GetExtension(pinanggalingan)

End Sub

Public Sub Browseforfile(ByVal resultpath As Label, ByVal pic As PictureBox, ByVal filter As String)

Dim fd As OpenFileDialog = New OpenFileDialog() Dim strFileName As String

fd.Title = "Open File Dialog" fd.InitialDirectory = "C:\" fd.Filter = filter

If fd.ShowDialog() = DialogResult.OK Then strFileName = fd.FileName pic.Image = Image.FromFile(strFileName)

resultpath.Text = strFileName

End If

getTargetPath("D:\ICCMStudentPictures\Pics", ResultFile, FilePath.Text, SID)

End Sub

Public Sub Copyer(ByVal sourcepath As String, ByVal resultpath As String) If System.IO.File.Exists(resultpath) Then System.IO.File.Delete(resultpath) End If My.Computer.FileSystem.CopyFile(sourcepath, resultpath)

End Sub

#End Region

#Region "NAVIGATE BUTTONS"

Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles OldTab.SelectedIndexChanged Try If OldTab.SelectedTab Is (Enform2) Then Me.Text = FName.Text & " " & MName.Text & " " & LName.Text & "'s Regular Student Assessment Form" Me.Refresh()

End If

' REQUIREMENTS

If OldTab.SelectedTab Is (Requirements) Then

If CStatus.Text = "Married" Then GroupBox13.Visible = True Else GroupBox13.Visible = False End If

Requirements.Enabled = True OldTab.SelectedTab = Requirements

x1 = D7.Item(1, 0).Value ' 2x2 x2 = D7.Item(2, 0).Value ' 1x1 '2 means the number of the column x3 = D7.Item(3, 0).Value ' 137 x4 = D7.Item(4, 0).Value ' TOR x5 = D7.Item(5, 0).Value ' GOODmoral x6 = D7.Item(6, 0).Value ' Letter Of Referal x7 = D7.Item(7, 0).Value ' Letter of Financial x8 = D7.Item(8, 0).Value ' One Page Essay x9 = D7.Item(9, 0).Value ' B cert x10 = D7.Item(10, 0).Value ' Brgy Clearance x11 = D7.Item(11, 0).Value ' NBI x12 = D7.Item(12, 0).Value ' Police Clearance x13 = D7.Item(13, 0).Value ' Reg Fee x14 = D7.Item(14, 0).Value ' Marriage

If x1 = "YES" Then R1.Checked = True End If If x2 = "YES" Then R2.Checked = True End If If x3 = "YES" Then R3.Checked = True End If

If x4 = "YES" Then R4.Checked = True End If If x5 = "YES" Then R5.Checked = True End If If x6 = "YES" Then R6.Checked = True End If If x7 = "YES" Then R7.Checked = True End If If x8 = "YES" Then R8.Checked = True End If If x9 = "YES" Then R9.Checked = True End If If x10 = "YES" Then R10.Checked = True End If If x11 = "YES" Then R11.Checked = True End If If x12 = "YES" Then R12.Checked = True End If If x13 = "YES" Then R13.Checked = False End If If x14 = "YES" Then R14.Checked = True End If

End If

Catch ex As Exception MsgBox(ex.ToString) End Try

End Sub

Private Sub NextBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NextBtn.Click

Enform2.Enabled = True OldTab.SelectedTab = Enform2

Num.Text = SubjNum.Text SubjName.Text = FName.Text & " " & MName.Text & " " & LName.Text Me.Text = FName.Text & " " & MName.Text & " " & LName.Text & "'s Regular Student Assessment Form" Me.Refresh() End Sub

Private Sub Next2Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next2Btn.Click

Try

If String.IsNullOrEmpty(ESchool.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(EYrGrad.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HSchool.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HYrGrad.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If

If CheckIf.Checked = True Then If String.IsNullOrEmpty(RecentIll.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If

If String.IsNullOrEmpty(Allergy.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Handicap.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Tmedic.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If

If Tmedic.Text = "YES" Then If String.IsNullOrEmpty(YesSpecify.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If End If End If

OldWorkExp.Enabled = True OldTab.SelectedTab = OldWorkExp

Num.Text = SubjNum.Text SubjName.Text = FName.Text & " " & MName.Text & " " & LName.Text

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Next3Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next3Btn.Click ' FINANCIAL W E

Dim textBoxes = OldWorkExp.Controls.OfType(Of TextBox)()

If WorkCheck.Checked = True Then

If String.IsNullOrEmpty(Workxp.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(WorkAdd.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If End If

If SponsorChk.Checked = True Then If String.IsNullOrEmpty(Sname.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SEmail.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SAddress.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(STEL.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SCell.Text) Then MsgBox(" MISSING FIELD(S)", MsgBoxStyle.Critical) Exit Sub End If

End If

SubjNum.Text = StudentNumber.Text SubjectInfo.Enabled = True

OldTab.SelectedTab = SubjectInfo End Sub

Private Sub Next4Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Next4Btn.Click If Major2.Text = Nothing Then MsgBox("SPECIFY COURSE! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If YrLevel2.Text = Nothing Then MsgBox("SPECIFY YEAR LEVEL! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If Term2.Text = Nothing Then MsgBox("SPECIFY SEMESTER! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If kkkk < 1 Then MsgBox("CHOOSE SUBJECTS", MsgBoxStyle.Information) Exit Sub End If

If CStatus.Text "Married" Then GroupBox13.Hide() Else GroupBox13.Show() End If

Requirements.Enabled = True

OldTab.SelectedTab = Requirements End Sub

Private Sub BackBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BackBtn.Click OldTab.SelectedTab = Enform1

End Sub

Private Sub Back3Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back3Btn.Click OldTab.SelectedTab = Enform2 End Sub

Private Sub Back4Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back4Btn.Click OldTab.SelectedTab = OldWorkExp End Sub

Private Sub Back5Btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back5Btn.Click OldTab.SelectedTab = SubjectInfo End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Close() Magulang.GroupBox1.BringToFront() End Sub Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click

Dim Ext As MsgBoxResult Ext = MsgBox("Really Exit?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Magulang.LimiterOld.Text = Magulang.LimiterOld.Text - 1 Magulang.GroupBox1.Visible = True Me.Close()

End If

End Sub

Private Sub GOTOP_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GOTOP.Click Dim Ext As MsgBoxResult Ext = MsgBox("Go to Enrollment Procedures?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Me.SendToBack() Dim x As New EnrollmentProcedures adopt(x, Magulang) End If End Sub

#End Region

Dim kkkk As Integer = 0
#Region "SUBJECT INFORMATION"

Private Sub btnsubject_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubject.Click

' CODE NI DIANE Try ' If subj = 0 Then

Dim Ext As MsgBoxResult Ext = MsgBox("CHOOSE COURSE?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

If Major2.Text = Nothing Then MsgBox("SPECIFY COURSE! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If YrLevel2.Text = Nothing Then MsgBox("SPECIFY YEAR LEVEL! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If Term2.Text = Nothing Then MsgBox("SPECIFY SEMESTER! ", MsgBoxStyle.Exclamation, "OK") Exit Sub End If

If Major2.Text = "Bachelor in Theology Major in Education" Then ' EDUCATION

If YrLevel2.Text = 1 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc1yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc2yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc3yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc4yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 1 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc1yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc2yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc3yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bseduc4yr2sem ;", MySubject) GoTo here End If End If

If Major2.Text = "Bachelor in Theology Major in Ministry" Then ' MINISTRY

ElseIf YrLevel2.Text = 1 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry1yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry2yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry3yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry4yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 1 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry1yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry2yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry3yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsministry4yr2sem ;", MySubject) GoTo here End If

If Major2.Text = "Bachelor in Theology Major in Outreach" Then ' OUTREACH

ElseIf YrLevel2.Text = 1 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach1yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach2yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach3yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach4yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 1 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach1yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach2yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach3yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsoutreach4yr2sem ;", MySubject) GoTo here End If

If Major2.Text = "Bachelor in Theology Major in Worship" Then 'WORSHIP

ElseIf YrLevel2.Text = 1 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship1yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship2yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship3yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 1 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship4yr1sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 1 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship1yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 2 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship2yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 3 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship3yr2sem ;", MySubject) GoTo here ElseIf YrLevel2.Text = 4 And Term2.Text = 2 Then Populate("Select CourseID, DescriptiveTitle, Units from subjectdatabase.bsworship4yr2sem ;", MySubject) GoTo here End If

here:

'INSERT INTO DUPLICATE SUBJECT TABLE

For Each dgvRow As DataGridViewRow In MySubject.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFDupsubjects values('" & SID & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");") ThisSemUnits += CInt(dgvRow.Cells(2).Value) '2 means the number of the column

End If Next

Populate("select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects;", AllSubjects)

TotalUnits.Text = ThisSemUnits subj = 1 kkkk = 1 ' End If End If Catch ex As Exception MsgBox(ex.ToString) End Try

End Sub

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click

ThisSemUnits = ThisSemUnits + AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value

If ThisSemUnits > 34 Then MsgBox("YOU ARE FULLY LOADED, CANNOT ENROLL ANY MORE SUBJECTS", MsgBoxStyle.Exclamation) ThisSemUnits = ThisSemUnits - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") 'Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & (AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value) & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("SUBJECT ALREADY ADDED", MsgBoxStyle.Information) ThisSemUnits = ThisSemUnits - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value ' rdr = Nothing con.Close() Exit Sub End If con.Close()

Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT : " & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim dt As DataTable = DirectCast(MySubject.DataSource, DataTable) dt.Rows.Add(AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value) TotalUnits.Text = ThisSemUnits

nonQuery("insert into GMCN7EnrollmentDatabase.EFdupsubjects values('" & SID & "','" & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & "','" & AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value & "'," & AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value & ");")

End If End Sub

Private Sub btnremove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnremove.Click

Dim Ext As MsgBoxResult Ext = MsgBox("REMOVE SUBJECT : " & MySubject.Item(0, MySubject.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

If MySubject.RowCount < 2 Then MsgBox("YOU SHOULD HAVE AT LEAST 1 SUBJECT ENROLLED", MsgBoxStyle.Information) Exit Sub End If

ThisSemUnits = ThisSemUnits - MySubject.Item(2, MySubject.CurrentRow.Index).Value TotalUnits.Text = ThisSemUnits

nonQuery("delete from GMCN7EnrollmentDatabase.EFdupsubjects where subjectID = '" & MySubject.Item(0, MySubject.CurrentRow.Index).Value & "';") MySubject.Rows.RemoveAt(MySubject.CurrentRow.Index)

End If End Sub

Private Sub MySubject_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles MySubject.CellDoubleClick

If updatechecker = 1 Then

Dim Ext As MsgBoxResult Ext = MsgBox("UPDATE SUBJECT : '" & MySubject.Item(0, MySubject.CurrentRow.Index).Value & "' ? ", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then btnremove.Enabled = False btnadd.Enabled = False MySubject.Enabled = False UpdateBox.Show() Editt.Text = MySubject.Item(0, MySubject.CurrentRow.Index).Value

TextBox91.Text = MySubject.Item(0, MySubject.CurrentRow.Index).Value TextBox92.Text = MySubject.Item(1, MySubject.CurrentRow.Index).Value TextBox93.Text = MySubject.Item(2, MySubject.CurrentRow.Index).Value

Else Exit Sub End If

End If

End Sub

Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If TextBox93.Text = Nothing Or TextBox91.Text = Nothing Or TextBox92.Text = Nothing Then MsgBox("Missing Fields", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") ' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & TextBox91.Text & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("THAT SUBJECT IS ALREADY ADDED", MsgBoxStyle.Information, "Students Subjects") ' totalvalue = totalvalue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value ' rdr = Nothing con.Close() Exit Sub End If con.Close()

Dim Ext As MsgBoxResult Ext = MsgBox("Update subject ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

ThisSemUnits = ThisSemUnits - MySubject.Item(2, MySubject.CurrentRow.Index).Value

MySubject.Item(0, MySubject.CurrentRow.Index).Value = TextBox91.Text MySubject.Item(1, MySubject.CurrentRow.Index).Value = TextBox92.Text MySubject.Item(2, MySubject.CurrentRow.Index).Value = TextBox93.Text btnremove.Enabled = True btnadd.Enabled = True MySubject.Enabled = True UpdateBox.Hide() ThisSemUnits = ThisSemUnits + TextBox93.Text MsgBox("Subject Updated", MsgBoxStyle.Information, "Confirm") TotalUnits.Text = ThisSemUnits End If

End Sub

Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click btnremove.Enabled = True btnadd.Enabled = True MySubject.Enabled = True UpdateBox.Hide()

End Sub

Private Sub Major2_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Major2.SelectedIndexChanged, YrLevel2.SelectedIndexChanged nonQuery("delete from GMCN7EnrollmentDatabase.EFDupSubjects;") ThisSemUnits = 0 subj = 0

End Sub

Private Sub SearchSubj_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchSubj.TextChanged If SearchSubj.Text = Nothing Then Populate("select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects order by SUnits asc;", AllSubjects) Else Populate("Select SubjectID, DescriptiveTitle, SUnits from GMCN7EnrollmentDatabase.iccmsubjects where DescriptiveTitle like '%" & SearchSubj.Text & "%';", AllSubjects)

End If End Sub

#End Region

#Region "SUBMIT ALL"

Private Sub ScholarChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ScholarChk.CheckedChanged If ScholarChk.Checked = True Then GB1.Visible = True GB2.Visible = True GB3.Visible = True Else GB1.Visible = False GB2.Visible = False GB3.Visible = False End If End Sub

Private Sub SubmitAllBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click Try If dont = 0 Then

Input.Dispose() Num.Dispose()

SID = DGView.Item(0, DGView.CurrentRow.Index).Value

If kkkk = 0 Then MsgBox(" PLEASE SPECIFY COURSE AND SUBJECTS", MsgBoxStyle.Critical) Exit Sub End If

'CHECKS IF THERE ARE MISSING FIELDS LEFT Dim textBoxes1 = Enform1.Controls.OfType(Of TextBox)() For Each t In textBoxes1 If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at PAGE 1", MsgBoxStyle.Information) Exit Sub Exit For End If Next t

Dim comboBoxes = Enform1.Controls.OfType(Of ComboBox)() For Each t In comboBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at PAGE 1", MsgBoxStyle.Critical) Exit Sub Exit For End If Next t

If String.IsNullOrEmpty(ESchool.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(EYrGrad.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HSchool.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(HYrGrad.Text) Then MsgBox(" MISSING FIELD(S) at EDUCATION BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If CheckIf.Checked = True Then If String.IsNullOrEmpty(RecentIll.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If String.IsNullOrEmpty(Allergies.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Handicaps.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(Tmedic.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If

If Tmedic.Text = "YES" Then If String.IsNullOrEmpty(YesSpecify.Text) Then MsgBox(" MISSING FIELD(S) at MEDICAL BACKGROUND", MsgBoxStyle.Critical) Exit Sub End If End If End If

If WorkCheck.Checked = True Then

If String.IsNullOrEmpty(Workxp.Text) Then MsgBox(" MISSING FIELD(S) at WORK EXPERIENCE", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(WorkAdd.Text) Then MsgBox(" MISSING FIELD(S) at WORK EXPERIENCE", MsgBoxStyle.Critical) Exit Sub End If

End If

If SponsorChk.Checked = True Then

If String.IsNullOrEmpty(Sname.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SEmail.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SAddress.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(STEL.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If If String.IsNullOrEmpty(SCell.Text) Then MsgBox(" MISSING FIELD(S) at SPONSOR FIELD", MsgBoxStyle.Critical) Exit Sub End If

End If

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim extt As MsgBoxResult If RegFeeYes.Checked = False Then extt = MsgBox("Registration fee has not been paid/settled yet, proceed?", MsgBoxStyle.Information + MsgBoxstyle.yesno ,"Confirm") If extt = MsgBoxResult.Yes Then

Else Exit Sub End If End If

' FINANCIAL If Working.Checked = True Then work = "WORKING" ElseIf PartWorkPay.Checked = True Then work = "PART TIME WORKING and PAYING" ElseIf Paying.Checked = True Then work = "PAYING" End If

'ENROLLMENT FORM 1 totalAllunits = LastSemUnits + ThisSemUnits

nonQuery("update GMCN7EnrollmentDatabase.EFStudentInfo set School_Year = " & SYear.Text & ", Date_Enrolled = '" & DateEnrolled.Text & "', Last_Name = '" & _ LName.Text & "', First_Name = '" & FName.Text & "', Middle_Name = '" & MName.Text & "', major = '" & Major2.Text & "', Year_Level = " & YrLevel2.Text & ", term = " & Term2.Text & ", Birth_place = '" & _ BPlace.Text & "', Address = '" & Address.Text & "', Address2 = '" & AAddress.Text & "', Contact_info = '" & CInfo.Text & "', Contact_Info2 = '" & ACInfo.Text & "', Email_Add = '" & Eadd.Text & "', Email_Add2 = '" & _ AEadd.Text & "', Civil_Status = '" & CStatus.Text & "', Birth_date = '" & Bdate.Text & "', Gender = '" & _ Gender.Text & "', Citizenship = '" & Citizenship.Text & "', Religion = '" & Religion.Text & "', Fathers_Name = '" & FatName.Text & "', Fathers_Occupation = '" & OccFat.Text & "', Fathers_Number = '" & _ FatContact.Text & "', Mothers_Name = '" & MotName.Text & "', Mothers_Occupation = '" & OccMot.Text & "', Mothers_Number = '" & MotContact.Text & "', Guardian_Name = '" & GuaName.Text & "', Guardian_Number = '" & _ GuaContact.Text & "', Guardian_Occupation = '" & OccGua.Text & "', blood_type = '" & Bloodtype.Text & "', Financial_Payment ='" & work & "', totalunits = " & totalAllunits & _ ",Elementary = '" & ESchool.Text & "', Elementary_Date_Graduated = '" & EYrGrad.Text & "', HighSchool = '" & HSchool.Text & "', Highschool_Date_Graduated = '" & HYrGrad.Text & "', isNewOrRegular = 'Regular Student' , HasGrades = 'NO' where Student_ID = '" & SID & "';")

' UPLOAD THE IMAGE

If UploadChck = 1 Then nonQuery("update GMCN7EnrollmentDatabase.EFPictures set picturePath = 'D:\\ICCMStudentPictures\\Pics" & "\\" & SID & System.IO.Path.GetExtension(FilePath.Text) & "' where StudentID = '" & SID & "';") Copyer(FilePath.Text, ResultFile.Text) UploadChck = 0 End If

' COLLEGE nonQuery("delete from GMCN7Enrollmentdatabase.efcollegebackground where StudentID = '" & StudentNumber.Text & "';")

For Each dgvRow As DataGridViewRow In Dcollege.Rows If Not dgvRow.IsNewRow Then nonQuery("Insert into GMCN7Enrollmentdatabase.efcollegebackground values ('" & StudentNumber.Text & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "','" & dgvRow.Cells(2).Value & "');") End If Next

'MEDICAL BACKGROUND

If CheckIf.Checked = True Then medchk = "YES" If Tmedic.Text = "YES" Then nonQuery("insert into GMCN7EnrollmentDatabase.EFmedical values ('" & SID & "','" & RecentIll.Text & "','" & Allergy.Text & "','" & Handicap.Text & "','" & Tmedic.Text & "','" & YesSpecify.Text & "');") ElseIf Tmedic.Text = "NO" Then nonQuery("insert into GMCN7EnrollmentDatabase.EFmedical values ('" & SID & "','" & RecentIll.Text & "','" & Allergy.Text & "','" & Handicap.Text & "','" & Tmedic.Text & "',' NA ');") End If Else medchk = "NO" End If

' NOTES If DD5.RowCount > 1 Then notchk = "YES" nonQuery("delete from gmcn7enrollmentdatabase.efnotes where StudentID = '" & SID & "';")

For Each dgvRow As DataGridViewRow In D5.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.efnotes values('" & SID & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "');")

End If Next

Else notchk = "NO" End If

' WORK EXPERIENCE

If WorkCheck.Checked = True Then wrkchk = "YES" nonQuery("update GMCN7EnrollmentDatabase.EFWorkExperience set Recent_Work = '" & Workxp.Text & "', Work_Address = '" & WorkAdd.Text & "' where StudentID = '" & SID & "';") Else wrkchk = "NO" End If ' SPONSOR

If SponsorChk.Checked = True Then sponchk = "YES" nonQuery("update GMCN7EnrollmentDatabase.EFSponsor set Sponsors_Name = '" & Sname.Text & "', Sponsors_Email = '" & SEmail.Text & "', Sponsors_Address = '" & SAddress.Text & "', Sponsors_TelPhone = '" & STEL.Text & "', Sponsors_Cell = '" & SCell.Text & "' where StudentID = '" & SID & "';") Else sponchk = "NO" End If

' SUBJECT INFORMATION nonQuery("delete from GMCN7EnrollmentDatabase.EFdupsubjects where studentID = '" & SID & "';") nonQuery("delete from GMCN7EnrollmentDatabase.EFsubjects where studentID = '" & SID & "';")

For Each dgvRow As DataGridViewRow In MySubject.Rows

If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFSubjects values('" & SID & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");")

If YrLevel2.Text = 1 And Term2.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 2 And Term2.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 2 And Term2.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks2ndYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 3 And Term2.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks3rdYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 3 And Term2.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks3rdYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 4 And Term2.Text = 1 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks4thYear values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") ElseIf YrLevel2.Text = 4 And Term2.Text = 2 Then nonQuery("insert into GMCN7EnrollmentDatabase.SemRemarks4thYear2ndSem values('" & StudentNumber.Text & "','" & SubjName.Text & "'," & YrLevel2.Text & "," & Term2.Text & ",'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 0 , 'NA' , 0,'" & DateEnrolled.Text & "');") End If End If Next

'PLACES LAST SEM's SUBJECTS TO STUDENT SUBJECTS JOURNAL

For Each dgvRow As DataGridViewRow In LastSubjects.Rows If Not dgvRow.IsNewRow Then

nonQuery("insert into GMCN7EnrollmentDatabase.EFSubjectsJournal values('" & SID & "','" & dgvRow.Cells(1).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(3).Value & ");")

End If Next

' STUDENTS JOURNAL nonQuery("insert into GMCN7EnrollmentDatabase.efstudentjournal values('" & SYear.Text & "','" & SID & "','" & LName.Text & "','" & Major2.Text & "'," & YrLevel2.Text & "," & Term2.Text & "," & totalAllunits & ",'" & DateEnrolled.Text & "',0,0,0);")

' REQUIREMENTS

Dim y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14 As String

If R1.Checked = True Then y1 = "YES" Else y1 = "NO" End If

If R2.Checked = True Then y2 = "YES" Else y2 = "NO" End If If R3.Checked = True Then y3 = "YES" Else y3 = "NO" End If If R4.Checked = True Then y4 = "YES" Else y4 = "NO" End If If R5.Checked = True Then y5 = "YES" Else y5 = "NO" End If If R6.Checked = True Then y6 = "YES" Else y6 = "NO" End If If R7.Checked = True Then y7 = "YES" Else y7 = "NO" End If If R8.Checked = True Then y8 = "YES" Else y8 = "NO" End If If R9.Checked = True Then y9 = "YES" Else y9 = "NO" End If If R10.Checked = True Then y10 = "YES" Else y10 = "NO" End If If R11.Checked = True Then y11 = "YES" Else y11 = "NO" End If If R12.Checked = True Then y12 = "YES" Else y12 = "NO" End If If R13.Checked = True Then y13 = "YES" Else y13 = "NO" End If If R14.Checked = True Then y14 = "YES" Else y14 = "NO" End If nonQuery("update GMCN7EnrollmentDatabase.EFRequirements set Two_by_TwoID = '" & y1 & "', One_by_OneID = '" & y2 & "', Form137_or_138 = '" & y3 & "', Transcript_Of_Records = '" & y4 & "', Good_Moral_Character = '" & y5 & "', Letter_Of_Referal = '" & y6 & _ "', Letter_Of_Financial = '" & y7 & "', One_Page_Essay = '" & y8 & "', Birth_Certificate = '" & y9 & "', Brgy_Clearance = '" & y10 & "', NBI = '" & y11 & _ "', Police_Clearance = '" & y12 & "', Registration_Fee = '" & y13 & "', Marriage_Certificate = '" & y14 & "' where StudentID = '" & SID & "';")

Dim y15, y16, y17 As String ' SCHOLARS

If R15.Checked = True Then y15 = "YES" Else y15 = "NO" End If

If R16.Checked = True Then y16 = "YES" Else y16 = "NO" End If If R17.Checked = True Then y17 = "YES" Else y17 = "NO" End If

If ScholarChk.Checked = True Then workscholarchk = "YES" nonQuery("update GMCN7EnrollmentDatabase.efrequirementsworkscholar set Photo_of_House = '" & y15 & "', Telephone_Bill = '" & y16 & "', Electric_Bill = '" & y17 & "' where StudentID = '" & SID & "';") Else workscholarchk = "NO" End If

' CHECK CHECKER nonQuery("update GMCN7EnrollmentDatabase.efCheckBoxChecker set medChk = '" & medchk & "', notechk = '" & notchk & "', Workchk = '" & wrkchk & "', SponsorChk = '" & sponchk & "', ScholarWorkChk = '" & workscholarchk & "' where StudentID = '" & SID & "';")

nonQuery("update GMCN7EnrollmentDatabase.useraccounts set EnrolleeNum = EnrolleeNum + 1;")

Magulang.TotalEnrollee.Text = MySelectSpecific("Select TotalEnrollee from GMCN7EnrollmentDatabase.useraccounts;") Magulang.EnrolleeThisSem.Text = MySelectSpecific("Select EnrolleeNum from GMCN7EnrollmentDatabase.useraccounts;")

nonQuery("update GMCN7EnrollmentDatabase.semremarks set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndsem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndYear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndYear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks3rdYear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks4thyear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks4thyear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Last_Name = '" & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.sinfoswr set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.studentfailures set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';") nonQuery("update GMCN7EnrollmentDatabase.swsworkreview set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & SID & "';")

MsgBox("INFORMATION SUCCESSFULLY SUBMITTED", MsgBoxStyle.Information)

Magulang.LimiterOld.Text = Magulang.LimiterOld.Text - 1 GroupBox56.Visible = True Me.ControlBox = True EnrollmentProcedures.TextID.Text = SID dont = 1 ' Me.Close()

End If End If Catch ex As Exception MsgBox(ex.ToString) Exit Sub End Try

End Sub
#End Region

Dim Cc As Integer = 0 Private Sub ADDBtn_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ADDBtn.Click

If Cc = 1 Then

If CollegeCourse.Text = Nothing Or CollegeSY.Text = "" Or CollegeName.Text = Nothing Then MsgBox("Missing Fields", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim ext As MsgBoxResult ext = MsgBox("Add College ? ", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then Cc = 0 CollegeSY.Hide() CollegeCourse.Hide() CollegeName.Hide() Label373.Hide() Label372.Hide() Label374.Hide() Dcollege.Hide() Dcollege.Show() Dim dt As DataTable = DirectCast(Dcollege.DataSource, DataTable) dt.Rows.Add(CollegeName.Text, CollegeCourse.Text, CollegeSY.Text) MsgBox("ADDED", MsgBoxStyle.Information, "Confirm")

CollegeCourse.Text = "" CollegeName.Text = "" CollegeSY.Text = ""

Exit Sub Else CollegeSY.Hide() CollegeCourse.Hide() CollegeName.Hide() Label373.Hide() Label372.Hide() Label374.Hide() Dcollege.Show() CollegeCourse.Text = "" CollegeName.Text = "" CollegeSY.Text = "" Cc = 0 Button34.Hide() Exit Sub End If

End If

If Cc = 0 Then Button34.Show() CollegeSY.Show() CollegeCourse.Show() CollegeName.Show() Label373.Show() Label372.Show() Label374.Show() Dcollege.Hide() Cc += 1 End If End Sub

Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button34.Click CollegeSY.Hide() CollegeCourse.Hide() CollegeName.Hide() Label373.Hide() Label372.Hide() Label374.Hide() Dcollege.Show() Button34.Hide() Cc = 0 End Sub
End Class

ENROLLMENT PROCEDURES FORM

Public Class EnrollmentProcedures

Dim count As Integer = 0 Dim chk As Integer = 0 Dim max As Integer Private Sub EnrollmentProcedures_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.BringToFront()

Populate("Select Student_ID , concat (Last_Name, ',' , First_Name, ' ' , Middle_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.efstudentinfo where isEnrolled = 'NOT ENROLLED'", D) If TextID.Text = Nothing Then GroupBox19.Enabled = False GroupBox20.Enabled = False GroupBox21.Enabled = False End If

End Sub

Private Sub TextSearch_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextSearch.TextChanged If TextSearch.Text = Nothing Then Populate("Select Student_ID , concat (Last_Name, ' , ' , First_Name, ' ' , Middle_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.efstudentinfo where isEnrolled = 'NOT ENROLLED' order by Student_ID asc;", D) Else Populate("Select Student_ID , concat (Last_Name, ' , ' , First_Name, ' ' , Middle_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.efstudentinfo where isEnrolled = 'NOT ENROLLED' and Last_Name like '%" & TextSearch.Text & "%' or First_Name like '%" & TextSearch.Text & "%' order by Student_ID asc;", D)

End If

End Sub

Private Sub D_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles D.CellContentDoubleClick Dim Ext As MsgBoxResult Ext = MsgBox("Select " & D.Item(1, D.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then TextID.Text = D.Item(0, D.CurrentRow.Index).Value Populate("Select isNewOrRegular from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & TextID.Text & "';", D2) Label127.Hide() TextSearch.Hide() D.Hide() SubmitAllBtn.Visible = True If D2.Item(0, 0).Value = "Regular Student" Then c8.Enabled = True chk = 1 GroupBox19.Enabled = True GroupBox20.Enabled = True GroupBox21.Enabled = True Else GroupBox19.Enabled = True GroupBox20.Enabled = True GroupBox21.Enabled = True max = 20 End If count = 0 Me.Text = "Enrollment Procedures of " & D.Item(1, D.CurrentRow.Index).Value Me.Refresh()

End If End Sub

Private Sub SubmitAllBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitAllBtn.Click

' ENROLLMENT PROCEDURES / FINAL FORM

If chk = 1 Then max = 21 If c8.Checked = True Then count += 1 Else count -= 1 End If End If

If C1.Checked = True Then count += 1 Else count -= 1 End If

If C2.Checked = True Then count += 1 Else count -= 1 End If

If C3.Checked = True Then count += 1 Else count -= 1 End If

If C4.Checked = True Then count += 1 Else count -= 1 End If If C5.Checked = True Then

count += 1 Else count -= 1 End If

If c6.Checked = True Then count += 1 Else count -= 1 End If

If C7.Checked = True Then count += 1 Else count -= 1 End If

If c9.Checked = True Then count += 1 Else count -= 1 End If

If c11.Checked = True Then count += 1 Else count -= 1 End If

If c12.Checked = True Then count += 1 Else count -= 1 End If

If c13.Checked = True Then count += 1 Else count -= 1 End If

If c14.Checked = True Then count += 1 Else count -= 1 End If

If c15.Checked = True Then count += 1 Else count -= 1 End If

If c16.Checked = True Then count += 1 Else count -= 1 End If

If c17.Checked = True Then count += 1 Else count -= 1 End If

If c18.Checked = True Then count += 1 Else count -= 1 End If

If c19.Checked = True Then count += 1 Else count -= 1 End If

If c20.Checked = True Then count += 1 Else count -= 1 End If

If c21.Checked = True Then count += 1 Else count -= 1 End If

If c22.Checked = True Then count = count + 1 Else count = count - 1 End If If count = max Then

Dim Ext As MsgBoxResult Ext = MsgBox(" Enroll Student? " & D.Item(1, D.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then If D2.Item(0, 0).Value = "New Student" Then MsgBox("Enrollment Procedures Completed!", MsgBoxStyle.Information) nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set isNewOrRegular = 'New Student' where Student_ID = '" & TextID.Text & "';") nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set isEnrolled = 'ENROLLED' where Student_ID = '" & TextID.Text & "';") nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set SemsStudied = 1 where Student_ID = '" & TextID.Text & "';") count = 0 Else Dim SemsStudied As Integer SemsStudied = Val(MySelectSpecific("Select SemsStudied from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & TextID.Text & "' order by SemsStudied DESC limit 1;")) + 1 MsgBox("Enrollment Procedures Completed!", MsgBoxStyle.Information) nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set isNewOrRegular = 'Regular Student' where Student_ID = '" & TextID.Text & "';") nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set isEnrolled = 'ENROLLED' where Student_ID = '" & TextID.Text & "';") nonQuery("Update GMCN7EnrollmentDatabase.EFStudentInfo set SemsStudied = " & SemsStudied & " where Student_ID = '" & TextID.Text & "';") count = 0 End If

Me.Close() Me.Show()

Else

count = 0 End If Else MsgBox("Please finish the necessary procedures to complete the Enrollment!", MsgBoxStyle.Information) count = 0 Exit Sub End If End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Ext As MsgBoxResult Ext = MsgBox(" Really Exit ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Close() Magulang.GroupBox1.BringToFront() Magulang.EnProc.Text = Magulang.EnProc.Text - 1 End If End Sub

End Class

STUDENT INFORMATION FORM

Imports System.Drawing

Public Class SF Dim monthnow, yearnow Dim xx1, xx2, xx3, xx4, xx5, x6, x7, x8, x9, x10, x11, x12, x13, x14 As String ' REQUIREMENTS Dim sid As String Dim tabchecker As Integer = 0 Dim FindS As Integer = 0 Dim countForm As Integer = 2

#Region "Search Page / LOAD / CLOSE"

'EXIT Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Magulang.SFF.Text = Magulang.SFF.Text - 1 Me.Close() Magulang.GroupBox1.BringToFront()

End Sub

Private Sub SF_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed Magulang.SFF.Text = Magulang.SFF.Text - 1 Me.Close()

End Sub

'SEARCH TAB Private Sub StudentInfo_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles StudentInfo.SelectedIndexChanged If tabchecker = 0 Then ' Checks if a student has been picked If Not StudentInfo.SelectedTab Is (SearchTab) Then StudentInfoPg1.Enabled = False AcademicPerformance.Enabled = False WorkReview.Enabled = False SWR.Enabled = False TabPage2.Enabled = False MsgBox("PlEASE SPECIFY STUDENT TO PROCEED", MsgBoxStyle.Information) StudentInfo.SelectedTab = SearchTab

Exit Sub End If End If End Sub

Private Sub Student_Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID , concat(Last_Name , ' , ', First_Name, ' ' ,Middle_Name) as Name, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo order by Year_Level asc;", SearchMe) Populate("Select Term from GMCN7EnrollmentDatabase.useraccounts;", Dzxc) Sems.Text = Dzxc.Item(0, 0).Value monthnow = Format(Now, "MM") yearnow = Format(Now, "yyyy") If Magulang.ADMINbox.Text = 1 Then Button1.Visible = False GREQ.Enabled = False Label146.Visible = False ScholarChk.Visible = False End If

End Sub

Private Sub StudentBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBox.SelectedIndexChanged If SearchBox.Text = "Student_ID" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name , Year_Level , Major from gmcn7enrollmentdatabase.efstudentinfo order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Last_Name" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name , Year_Level , Major from gmcn7enrollmentdatabase.efstudentinfo order by Last_Name asc;", SearchMe) ElseIf SearchBox.Text = "First_Name" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name , Year_Level , Major from gmcn7enrollmentdatabase.efstudentinfo order by First_Name asc;", SearchMe) ElseIf SearchBox.Text = "Year_Level" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by Year_Level asc;", SearchMe) ElseIf SearchBox.Text = "Course" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo order by Major asc;", SearchMe) ElseIf SearchBox.Text = "Date_Enrolled" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major , Date_Enrolled from gmcn7enrollmentdatabase.efstudentinfo order by Date_Enrolled asc;", SearchMe) ElseIf SearchBox.Text = "Number_Of_Enrollee" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Number_Of_Enrollee from gmcn7enrollmentdatabase.efstudentinfo order by Number_Of_Enrollee asc;", SearchMe) ElseIf SearchBox.Text = "School_Year" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, School_Year from gmcn7enrollmentdatabase.efstudentinfo order by School_Year asc;", SearchMe) ElseIf SearchBox.Text = "Active" Then

SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major, term from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Enrolled' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Inactive" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major, term from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Not Enrolled' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Regular_Students" Then SearchMe.Visible = False SearchMe2.Visible = True RegS.Visible = True NewS.Visible = False SS.Visible = True Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, isNewOrRegular as NeworRegular from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' order by Student_ID asc;", SearchMe2) SS.Text = SearchMe2.RowCount ElseIf SearchBox.Text = "New_Students" Then

SearchMe.Visible = False SearchMe2.Visible = True Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, isNewOrRegular as NeworRegular from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' order by Student_ID asc;", SearchMe2) NewS.Visible = True RegS.Visible = False SS.Visible = True SS.Text = SearchMe2.RowCount End If End Sub

Private Sub StudentName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentName.TextChanged

If StudentName.Text = Nothing Then Exit Sub ElseIf SearchBox.Text = "Student_ID" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Student_ID like '%" & StudentName.Text & "%' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Last_Name" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' order by Last_Name asc;", SearchMe) ElseIf SearchBox.Text = "First_Name" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where First_Name like '%" & StudentName.Text & "%' order by First_Name asc;", SearchMe) ElseIf SearchBox.Text = "Year_Level" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Year_Level asc;", SearchMe) ElseIf SearchBox.Text = "Course" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' like '%" & StudentName.Text & "%' order by Major asc;", SearchMe) ElseIf SearchBox.Text = "Date_Enrolled" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Major, Date_Enrolled from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Date_Enrolled asc;", SearchMe) ElseIf SearchBox.Text = "Number_Of_Enrollee" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Major,Number_Of_Enrollee from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Number_Of_Enrollee asc;", SearchMe) ElseIf SearchBox.Text = "School_Year" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Major, School_Year from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by School_Year asc;", SearchMe) ElseIf SearchBox.Text = "Active" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Enrolled' and Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Year_Level asc;", SearchMe) ElseIf SearchBox.Text = "Inactive" Then SearchMe.Visible = True SearchMe2.Visible = False RegS.Visible = False SS.Visible = False Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Term, Major, Date_Enrolled from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'NOT ENROLLED' and Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Year_Level asc;", SearchMe)

ElseIf SearchBox.Text = "Regular_Students" Then SearchMe.Visible = False SearchMe2.Visible = True RegS.Visible = True NewS.Visible = False SS.Visible = True Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major, isNewOrRegular as NeworRegular from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' and Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Student_ID asc;", SearchMe2) SS.Text = SearchMe2.RowCount ElseIf SearchBox.Text = "New_Students" Then SearchMe.Visible = False SearchMe2.Visible = True Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major, isNewOrRegular as NeworRegular from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' and Last_Name like '%" & StudentName.Text & "%' or First_Name like '%" & StudentName.Text & "%' order by Student_ID asc;", SearchMe2) NewS.Visible = True RegS.Visible = False SS.Visible = True SS.Text = SearchMe2.RowCount

End If End Sub
#End Region

#Region "SELECT"

Private Sub DGV_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles SearchMe2.CellDoubleClick, SearchMe.CellDoubleClick Try Dim Ext As MsgBoxResult Ext = MsgBox("Select Student ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim value As Object = SearchMe.Rows(e.RowIndex).Cells(e.ColumnIndex).Value

If SearchMe.Visible = True Then StudentID.Text = SearchMe.Item(0, SearchMe.CurrentRow.Index).Value Else StudentID.Text = SearchMe2.Item(0, SearchMe2.CurrentRow.Index).Value End If SWRYear.Items.Clear() tabchecker = 1 'jimby TGIF HEHEHE

Populate("select AmountShouldbePaid, Fines, PenaltyInterest, TotalAmounttobePaid, AmountPaid, TotalAmountPaid, Behind, Ahead, date from gmcn7enrollmentdatabase.acz1cashpayments where Student_ID = '" & StudentID.Text & "';", dgvcp) Populate("select HrsWorkshouldbedone, hrsworkthisweek, totalhrswork, Ahead, Behind, cashtobepaid from gmcn7enrollmentdatabase.acz1workscholar where Student_ID = '" & StudentID.Text & "';", dgvsws) Populate("select HrsTobeDone, StudiedThisWeek, TotalStudy, Ahead, Behind, Date from gmcn7enrollmentdatabase.acz1library where Student_ID = '" & StudentID.Text & "';", dgvlib) ' Jimby end TGIF

Populate("Select * from GMCN7EnrollmentDatabase.EFStudentInfo where Student_ID = '" & StudentID.Text & "';", D1) Populate("Select * from GMCN7EnrollmentDatabase.efcheckboxchecker where StudentID = '" & StudentID.Text & "';", DCheck)

' JOURNAL Populate("Select Year_Level, Term, TotalUnits, Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where studentID = '" & StudentID.Text & "';", DGJournal)

GREQ.SuspendLayout()

' PAGE 1

sid = StudentID.Text ' STUDENTID

SYear.Text = D1.Item(0, 0).Value

DateEnrolled.Text = D1.Item(4, 0).Value LName.Text = D1.Item(5, 0).Value FName.Text = D1.Item(6, 0).Value MName.Text = D1.Item(7, 0).Value Major.Text = D1.Item(8, 0).Value Year.Text = D1.Item(9, 0).Value Term.Text = D1.Item(10, 0).Value BPlace.Text = D1.Item(11, 0).Value Address.Text = D1.Item(12, 0).Value Address2.Text = D1.Item(13, 0).Value CInfo.Text = D1.Item(14, 0).Value CInfo2.Text = D1.Item(15, 0).Value Eadd.Text = D1.Item(16, 0).Value Eadd2.Text = D1.Item(17, 0).Value Cstatus.Text = D1.Item(18, 0).Value Birthdate.Text = D1.Item(19, 0).Value Gender.Text = D1.Item(20, 0).Value Citizenship.Text = D1.Item(21, 0).Value Religion.Text = D1.Item(22, 0).Value FatName.Text = D1.Item(23, 0).Value OccFat.Text = D1.Item(24, 0).Value FatContact.Text = D1.Item(25, 0).Value MotName.Text = D1.Item(26, 0).Value OccMot.Text = D1.Item(27, 0).Value MotContact.Text = D1.Item(28, 0).Value GuaName.Text = D1.Item(29, 0).Value GuaContact.Text = D1.Item(31, 0).Value OccGua.Text = D1.Item(30, 0).Value Bloodtype.Text = D1.Item(32, 0).Value FPayment.Text = D1.Item(33, 0).Value TUnits.Text = D1.Item(34, 0).Value StudentNumber.Text = D1.Item(35, 0).Value ESchool.Text = D1.Item(36, 0).Value EYrGrad.Text = D1.Item(37, 0).Value HSchool.Text = D1.Item(38, 0).Value HYrGrad.Text = D1.Item(39, 0).Value

' EDUCATIONAL ATTAINMENT COLLEGE

Populate("Select College_Name ,College_Course ,College_Year from GMCN7EnrollmentDatabase.efcollegebackground where StudentID = '" & sid & "';", D3)

If D3.Item(1, 0).Value = "NA" Or D3.Item(1, 0).Value = "N/A" Then D3.Visible = False Label157.Visible = False Else Label157.Visible = True

D3.Visible = True End If

' MEDICAL

If DCheck.Item(1, 0).Value = "YES" Then Populate("Select * from GMCN7EnrollmentDatabase.efmedical where StudentID = '" & sid & "';", D4) W.Visible = True RecentIll.Text = D4.Item(1, 0).Value Allergies.Text = D4.Item(2, 0).Value Handicaps.Text = D4.Item(3, 0).Value TextBox1.Text = D4.Item(4, 0).Value YesSpecify.Text = D4.Item(5, 0).Value Else Label131.Show() Label131.Visible = True W.Visible = False End If

' NOTES If DCheck.Item(2, 0).Value = "YES" Then Populate("Select Notes, Date_Noted from GMCN7EnrollmentDatabase.efnotes where StudentID = '" & sid & "';", D5)

If D5.Item(0, 0).Value = Nothing Then Label62.Visible = False D5.Visible = False Else NoteBook.Text = "" NoteBook.Hide() Populate("Select Notes, Date_Noted from GMCN7EnrollmentDatabase.efnotes where StudentID = '" & sid & "';", D5) Label62.Visible = True Label167.Hide() D5.Visible = True End If

Else Label167.Visible = True Label167.Show() Label62.Visible = False D5.Visible = False Populate("Select Notes, Date_Noted from GMCN7EnrollmentDatabase.efnotes where StudentID = '" & sid & "';", D5)

End If

' WORK If DCheck.Item(3, 0).Value = "YES" Then Populate("Select * from GMCN7EnrollmentDatabase.efworkexperience where StudentID = '" & sid & "';", D6) W1.Visible = True RecentWOrk.Text = D6.Item(1, 0).Value WorkAddress.Text = D6.Item(2, 0).Value Else Label132.Show() Label131.Visible = True W1.Visible = False End If

' SPONSOR If DCheck.Item(4, 0).Value = "YES" Then Populate("Select * from GMCN7EnrollmentDatabase.efsponsor where StudentID = '" & sid & "';", d7) W2.Visible = True SponsorName.Text = d7.Item(1, 0).Value SponsorsEmail.Text = d7.Item(2, 0).Value SponsorAddress.Text = d7.Item(3, 0).Value SponsorsTelephone.Text = d7.Item(4, 0).Value SponsorsCellphone.Text = d7.Item(5, 0).Value Else Label159.Show() Label159.Visible = True W2.Visible = False End If

' SUBJECTS Populate("Select SubjectID, Descriptive_Title, Units from GMCN7EnrollmentDatabase.efsubjects where StudentID = '" & sid & "';", DGMySubject) Populate("Select SubjectID, DescriptiveTitle, Units from GMCN7EnrollmentDatabase.efsubjectsjournal where StudentID = '" & sid & "' order by Units asc ;", DGSubjectFinished)

'REQUIREMENTS

Populate("Select * from GMCN7EnrollmentDatabase.efrequirements where StudentID = '" & sid & "' ;", REQ)

xx1 = REQ.Item(1, 0).Value ' 2x2 xx2 = REQ.Item(2, 0).Value ' 1x1 '2 means the number of the column xx3 = REQ.Item(3, 0).Value ' 137 xx4 = REQ.Item(4, 0).Value ' TOR xx5 = REQ.Item(5, 0).Value ' GOODmoral x6 = REQ.Item(6, 0).Value ' Letter Of Referal x7 = REQ.Item(7, 0).Value ' Letter of Financial x8 = REQ.Item(8, 0).Value ' One Page Essay x9 = REQ.Item(9, 0).Value ' B cert x10 = REQ.Item(10, 0).Value ' Brgy Clearance x11 = REQ.Item(11, 0).Value ' NBI x12 = REQ.Item(12, 0).Value ' Police Clearance x13 = REQ.Item(13, 0).Value ' Reg Fee x14 = REQ.Item(14, 0).Value ' Marriage

If xx1 = "YES" Then Rr1.Checked = True End If If xx2 = "YES" Then Rr2.Checked = True End If If xx3 = "YES" Then rr3.Checked = True End If

If xx4 = "YES" Then R4.Checked = True End If If xx5 = "YES" Then R5.Checked = True End If If x6 = "YES" Then R6.Checked = True End If If x7 = "YES" Then R7.Checked = True End If If x8 = "YES" Then R8.Checked = True End If If x9 = "YES" Then R9.Checked = True End If If x10 = "YES" Then R10.Checked = True End If If x11 = "YES" Then R11.Checked = True End If If x12 = "YES" Then R12.Checked = True End If If x13 = "YES" Then R13.Checked = True End If If x14 = "YES" Then R14.Checked = True End If

If DCheck.Item(8, 0).Value = "YES" Then Populate("Select * from GMCN7EnrollmentDatabase.efrequirementsworkscholar where StudentID = '" & sid & "' ;", REQ2) ScholarChk.Checked = True Dim yy1, yy2, yy3 As String ' SCHOLAR yy1 = REQ2.Item(1, 0).Value yy2 = REQ2.Item(2, 0).Value yy3 = REQ2.Item(3, 0).Value If yy1 = "YES" Then R15.Checked = True End If

If yy2 = "YES" Then R16.Checked = True End If

If yy3 = "YES" Then R17.Checked = True End If End If

' ACADEMIC PERFOMANCE CHECKED If DCheck.Item(5, 0).Value = "YES" Then ' ACADEMIC PERFORMANCEz` Populate("Select * from GMCN7EnrollmentDatabase.sinfoapacademicrecords where StudentID = '" & sid & "';", a1) ARNoUnitsCreditedOS.Text = a1.Item(1, 0).Value ARNosemsCompletedOS.Text = a1.Item(2, 0).Value ARNoSemsAlreadyCompletedICCM.Text = a1.Item(3, 0).Value ARNoSemsStudiedSofar.Text = a1.Item(4, 0).Value ARNoUnitsEarnedAtICCMtoDate.Text = a1.Item(5, 0).Value ARTotalNoUnitsToDate.Text = a1.Item(6, 0).Value ARNoUnitsWoAGrade.Text = a1.Item(7, 0).Value AROverAllGPAtoDate.Text = a1.Item(8, 0).Value ARGPAlastSem.Text = a1.Item(9, 0).Value ARNoOfUnitsFailedLastSem.Text = a1.Item(10, 0).Value AcademicNote.Text = a1.Item(11, 0).Value

' OUTSIDE CREDITS

Populate("Select * from GMCN7EnrollmentDatabase.sinfoapoutsidecredits where StudentID = '" & sid & "';", a2)

If a2.Item(1, 0).Value = "NO" Then RadioButton12.Checked = True Else OSCreditYES.Checked = True

If a2.Item(2, 0).Value = "NO" Then RadioButton57.Checked = True Else OCOTRReceivedYES.Checked = True End If

If a2.Item(3, 0).Value = "NO" Then RadioButton59.Checked = True Else OCClassCardReceivedYES.Checked = True End If

OCNoUnitsCompleteICCM.Text = a2.Item(4, 0).Value OCTransferCreditCompleted.Text = a2.Item(5, 0).Value OCNoSemCompletedOS.Text = a2.Item(6, 0).Value OCNounitsCreditedOS.Text = a2.Item(7, 0).Value

If a2.Item(8, 0).Value = "FINAL" Then RadioButton60.Checked = True Else OScreditAcceptProvisional.Checked = True End If

End If ' POSSIBLE GRADUATION

Populate("Select * from GMCN7EnrollmentDatabase.sinfoappossiblegraduation1 where StudentID = '" & sid & "';", a3) '1 If a3.Item(1, 0).Value = "YES" Then GraduateYes1.Checked = True End If Date1.Text = a3.Item(2, 0).Value PosUnitsCompleted1.Text = a3.Item(3, 0).Value SemAlreadyCompleted1.Text = a3.Item(4, 0).Value

'2 If a3.Item(5, 0).Value = "YES" Then GraduateYes2.Checked = True End If Date2.Text = a3.Item(6, 0).Value PosUnitsCompleted2.Text = a3.Item(7, 0).Value SemAlreadyCompleted2.Text = a3.Item(8, 0).Value '3 If a3.Item(9, 0).Value = "YES" Then GraduateYes3.Checked = True End If Date3.Text = a3.Item(10, 0).Value PosUnitsCompleted3.Text = a3.Item(11, 0).Value SemAlreadyCompleted3.Text = a3.Item(12, 0).Value '4 If a3.Item(13, 0).Value = "YES" Then GraduateYes4.Checked = True End If Date4.Text = a3.Item(14, 0).Value PosUnitsCompleted4.Text = a3.Item(15, 0).Value SemAlreadyCompleted4.Text = a3.Item(16, 0).Value

' AP SUBJECTS

Populate("Select * from GMCN7EnrollmentDatabase.sinfoapsubjects where StudentID = '" & sid & "';", a4)

If a4.Item(1, 0).Value = "PASSED" Then Comprehension1.Checked = True End If

If a4.Item(2, 0).Value = "PASSED" Then Comprehension2.Checked = True End If

If a4.Item(3, 0).Value = "PASSED" Then Comprehension3.Checked = True End If

If a4.Item(4, 0).Value = "PASSED" Then Comprehension4.Checked = True End If

If a4.Item(5, 0).Value = "PASSED" Then English1.Checked = True End If

If a4.Item(6, 0).Value = "PASSED" Then English2.Checked = True End If

If a4.Item(7, 0).Value = "PASSED" Then English3.Checked = True End If

If a4.Item(8, 0).Value = "PASSED" Then Lit1.Checked = True End If

If a4.Item(9, 0).Value = "PASSED" Then Lit1.Checked = True End If

If a4.Item(10, 0).Value = "PASSED" Then StudentMinistry1.Checked = True End If

If a4.Item(11, 0).Value = "PASSED" Then StudentMinistry2.Checked = True End If

If a4.Item(12, 0).Value = "PASSED" Then StudentMinistry3.Checked = True End If

If a4.Item(13, 0).Value = "PASSED" Then StudentMinistry4.Checked = True End If

If a4.Item(14, 0).Value = "PASSED" Then PracEvangelism1.Checked = True End If

If a4.Item(15, 0).Value = "PASSED" Then PracEvangelism2.Checked = True End If If a4.Item(16, 0).Value = "PASSED" Then PracEvangelism3.Checked = True End If If a4.Item(17, 0).Value = "PASSED" Then PracEvangelism4.Checked = True End If

If D1.Item(20, 0).Value = "FEMALE" Then Label59.Visible = False GroupBox34.Visible = False Else If a4.Item(18, 0).Value = "PASSED" Then Ministry1.Checked = True End If

If a4.Item(19, 0).Value = "PASSED" Then Ministry2.Checked = True End If If a4.Item(20, 0).Value = "PASSED" Then Ministry3.Checked = True End If If a4.Item(21, 0).Value = "PASSED" Then Ministry4.Checked = True End If

End If

If a4.Item(22, 0).Value = "PASSED" Then Greek1.Checked = True End If

If a4.Item(23, 0).Value = "PASSED" Then Greek2.Checked = True End If If a4.Item(24, 0).Value = "PASSED" Then Greek3.Checked = True End If If a4.Item(25, 0).Value = "PASSED" Then Greek4.Checked = True End If

If a4.Item(26, 0).Value = "PASSED" Then PrepKey1.Checked = True End If

If a4.Item(27, 0).Value = "PASSED" Then PrepKey2.Checked = True End If

If a4.Item(28, 0).Value = "PASSED" Then Key1.Checked = True End If

If a4.Item(29, 0).Value = "PASSED" Then Key2.Checked = True End If

If a4.Item(30, 0).Value = "PASSED" Then Key3.Checked = True End If

If a4.Item(31, 0).Value = "PASSED" Then Key4.Checked = True End If

If a4.Item(32, 0).Value = "PASSED" Then Music1.Checked = True End If

If a4.Item(33, 0).Value = "PASSED" Then Music2.Checked = True End If

If a4.Item(34, 0).Value = "PASSED" Then Music3.Checked = True End If

If a4.Item(35, 0).Value = "PASSED" Then Music4.Checked = True End If

If a4.Item(36, 0).Value = "PASSED" Then EdFound1.Checked = True End If

If a4.Item(37, 0).Value = "PASSED" Then EdFound2.Checked = True End If

If a4.Item(38, 0).Value = "PASSED" Then CurriculumD.Checked = True End If If a4.Item(39, 0).Value = "PASSED" Then MandE.Checked = True End If If a4.Item(40, 0).Value = "PASSED" Then LearnDev.Checked = True End If If a4.Item(41, 0).Value = "PASSED" Then StTeach.Checked = True End If

Else AcademicBox.Visible = False Norecord.BringToFront() Norecord.Visible = True End If

'SWR

If DCheck.Item(6, 0).Value = "YES" Then Populate("Select Year_of from gmcn7enrollmentdatabase.sinfoswr where studentId = '" & sid & "';", DataGridView2) For Each dgvRow As DataGridViewRow In DataGridView2.Rows If Not dgvRow.IsNewRow Then SWRYear.Items.Add(dgvRow.Cells(0).Value) End If SWRYear.Text = dgvRow.Cells(0).Value Next Populate("Select Month_Of as 'Month' , Week1, Week2, Week3, Week4 from gmcn7enrollmentdatabase.sinfoswr where studentId = '" & sid & "' and year_Of = '" & SWRYear.Text & "';", tttt) Label124.Hide() SWRBox.Visible = True

Else SWRBox.Visible = False Label124.BringToFront() Label124.Show() End If

' WORK REVIEW

If DCheck.Item(7, 0).Value = "YES" Then

Label120.Hide() WorkBox.Visible = True Populate("Select Date1, Date2, Date3 from GMCN7Enrollmentdatabase.swsworkreview where StudentID = '" & sid & "' order by StudentID desc limit 1;", M2) Populate("Select Review1, Review2, Review3 from GMCN7Enrollmentdatabase.swsworkreview where StudentID = '" & sid & "' order by StudentID desc limit 1;", M3) Populate("Select OverAll_Rating, Rating from GMCN7Enrollmentdatabase.swsworkreview where StudentID = '" & sid & "' Order by Date_Reviewed Desc limit 1;", M4) Populate("Select Date_Reviewed from GMCN7Enrollmentdatabase.swsworkreview where StudentID = '" & sid & "' Order by Date_Reviewed Desc limit 1;", M5) Populate("Select Date_Reviewed as 'Dates Reviewed' from GMCN7Enrollmentdatabase.swsworkreview where StudentID = '" & sid & "' ;", M8)

If M4.Item(1, 0).Value = "Very Poor" Then M7.Visible = False Populate("Select You_Will_Not_Be_Offered_A_SWS_next_sem as 'You Will Not Be Offered SWS next sem' , Work_Scholarship_Is_Cancelled_Immediately as 'Work Scholarship Cancelled' from GMCN7Enrollmentdatabase.swsworkreviewverypoor where StudentID = '" & sid & "' and Date_reviewed = '" & M5.Item(0, 0).Value & "' Order by Date_Reviewed desc limit 1;", M6)

ElseIf M4.Item(1, 0).Value = "Poor" Then M7.Visible = True Populate("Select Second2ratingYouWillNotBeOfferedASWSNextYear as 'Second 2 Rating Will Not Be Offered a SWS Next Year', Final_Warning_or_You_Will_Not_Be_Offered_a_SWS_next_Sem as 'Final Warning or SWS Will Not be Offered Next Sem' from GMCN7Enrollmentdatabase.swsworkreviewpoor where StudentID = '" & sid & "' and Date_reviewed = '" & M5.Item(0, 0).Value & "' Order by Date_Reviewed desc limit 1;", M6) Populate("Select SWS_work_Will_Be_Assessed_At_P45_per_hour_Next_sem as 'SWS at P45 Per Hour Next sem', Max_Number_Of_Hours_You_May_Work_Per_Week_Next_Sem_is_18 as 'Max Hours You May Work Next Sem is 18' from GMCN7Enrollmentdatabase.swsworkreviewpoor where StudentID = '" & sid & "' and Date_reviewed = '" & M5.Item(0, 0).Value & "' Order by Date_Reviewed desc limit 1;", M7) MsgBox(M6.Item(0, 0).Value) ElseIf M4.Item(1, 0).Value = "Satisfactory" Then M7.Visible = False Populate("Select Pls_Improve_Please_Strive_For_Excellence as 'Strive for Excellence', SWS_work_Will_Be_Assessed_At_P50_Per_Hour_Next_Sem as 'Work will be Assesed P50 PerHr Next Sem' from GMCN7Enrollmentdatabase.swsworkreviewsatisfactory where StudentID = '" & sid & "' and Date_reviewed = '" & M5.Item(0, 0).Value & "' Order by Date_Reviewed desc limit 1;", M6) ElseIf M4.Item(1, 0).Value = "Very Satisfactory" Then M7.Visible = False Populate("Select Rating, Work_Will_Be_Assessed_At_P51_Per_Hr_Next_Sem_P52_for_cnstrction from GMCN7Enrollmentdatabase.swsworkreviewVerySatisfactory where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "' Order by Date_Reviewed desc limit 1;", M6) ElseIf M4.Item(1, 0).Value = "Outstanding" Then M7.Visible = False Populate("Select Rating, Excellent_Keep_Up_The_Good_Work, SWS_Work_Will_Be_At_P52_Per_Hr_Next_Sem_P53_for_cnstruction from GMCN7Enrollmentdatabase.swsworkreviewOutstanding where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "' Order by Date_Reviewed desc limit 1;", M6)

End If

Else WorkBox.Visible = False Label120.BringToFront() Label120.Visible = True End If

If SearchMe.Visible = True Then MsgBox(SearchMe.Item(1, SearchMe.CurrentRow.Index).Value & " Information has been successfully gathered! ", MsgBoxStyle.Information) Else MsgBox(SearchMe2.Item(1, SearchMe2.CurrentRow.Index).Value & " Information has been successfully gathered! ", MsgBoxStyle.Information) End If Else Exit Sub End If

StudentInfoPg1.Enabled = True AcademicPerformance.Enabled = True WorkReview.Enabled = True SWR.Enabled = True TabPage2.Enabled = True

Populate("Select Year_Level, Term from GMCN7EnrollmentDatabase.sinfoapacademicrecords where StudentID = '" & sid & "';", APW)

Dim textBoxes1 = StudentInfoPg1.Controls.OfType(Of TextBox)() For Each t In textBoxes1 t.ReadOnly = True

Next t

Dim textBoxes2 = W.Controls.OfType(Of TextBox)() For Each t In textBoxes2 t.ReadOnly = True

Next t

Dim textBoxes3 = W1.Controls.OfType(Of TextBox)() For Each t In textBoxes3 t.ReadOnly = True

Next t

Dim textBoxes4 = W2.Controls.OfType(Of TextBox)() For Each t In textBoxes4 t.ReadOnly = True

Next t

Me.Text = "Student Information of " & FName.Text & " " & MName.Text & " " & LName.Text Me.Refresh()

Dim FLastSem As Integer = 0 If Year.Text = 1 And Term.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) DY1S2.Hide() DY2S1.Hide() DY2S2.Hide() DY3S1.Hide() DY3S2.Hide() DY4S1.Hide() DY4S2.Hide() mm4.Show() mm5.Show() mm6.Show() mm7.Show() mm8.Show() mm9.Show() mm10.Show() ElseIf Year.Text = 1 And Term.Text = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) DY2S1.Hide() DY2S2.Hide() DY3S1.Hide() DY3S2.Hide() DY4S1.Hide() DY4S2.Hide() mm5.Show() mm6.Show() mm7.Show() mm8.Show() mm9.Show() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 1 and term = 1;") ElseIf Year.Text = 2 And Term.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) DY2S2.Hide() DY3S1.Hide() DY3S2.Hide() DY4S1.Hide() DY4S2.Hide() mm6.Show() mm7.Show() mm8.Show() mm9.Show() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 1 and term = 2;")

ElseIf Year.Text = 2 And Term.Text = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY2S2) DY3S1.Hide() DY3S2.Hide() DY4S1.Hide() DY4S2.Hide() mm7.Show() mm8.Show() mm9.Show() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 2 and term = 1;")

ElseIf Year.Text = 3 And Term.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY2S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear where StudentID = '" & StudentNumber.Text & "';", DY3S1) DY3S2.Hide() DY4S1.Hide() DY4S2.Hide() mm8.Show() mm9.Show() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 2 and term = 2;")

ElseIf Year.Text = 3 And Term.Text = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY2S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear where StudentID = '" & StudentNumber.Text & "';", DY3S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY3S1) DY4S1.Hide() DY4S2.Hide() mm9.Show() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 3 and term = 1;")

ElseIf Year.Text = 4 And Term.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY2S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear where StudentID = '" & StudentNumber.Text & "';", DY3S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY3S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks4thyear where StudentID = '" & StudentNumber.Text & "';", DY4S1) DY4S2.Hide() mm10.Show()

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 3 and term = 2;")

ElseIf Year.Text = 4 And Term.Text = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks where StudentID = '" & StudentNumber.Text & "';", DY1S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';", DY1S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear where StudentID = '" & StudentNumber.Text & "';", DY2S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks2ndYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY2S2) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear where StudentID = '" & StudentNumber.Text & "';", DY3S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks3rdYear2ndsem where StudentID = '" & StudentNumber.Text & "';", DY3S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks4thyear where StudentID = '" & StudentNumber.Text & "';", DY4S1) Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from gmcn7enrollmentdatabase.semremarks4thyear2ndSem where StudentID = '" & StudentNumber.Text & "';", DY4S2)

FLastSem = MySelectSpecific("Select Failed from gmcn7enrollmentdatabase.studentRemarks where Year_Level = 4 and term = 1;")

End If SemsStudied.Text = MySelectSpecific("Select SemsStudied from GMCN7EnrollmentDatabase.efstudentinfo where student_ID = '" & StudentNumber.Text & "';")

FailedLastSem.Text = FLastSem

' FAILURES / PASSED / INC Passedtext.Text = Val(MySelectSpecific("Select passed from GMCN7EnrollmentDatabase.efstudentjournal where studentID = '" & StudentNumber.Text & "';")) Failedtext.Text = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.efstudentjournal where studentID = '" & StudentNumber.Text & "';")) Inctext.Text = Val(MySelectSpecific("Select inc from GMCN7EnrollmentDatabase.efstudentjournal where studentID = '" & StudentNumber.Text & "';"))

' Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 1;")

If SubjectsFailed.RowCount < 1 Then SubjectsFailed.Hide()

End If

StudentInfo.SelectedTab = Sinfo TabControl1.SelectedTab = StudentInfoPg1

Dim MyFails As Integer = Val(MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 1;"))

Populate("Select SubjectID, DescriptiveTitle, Units, Remark, Year_Level, Term from gmcn7enrollmentdatabase.studentfailures where StudentID = '" & StudentNumber.Text & "';", SubjectsFailed)

Dim picssss = MySelectSpecific("Select PicturePath from gmcn7enrollmentdatabase.efpictures where StudentID = '" & StudentNumber.Text & "';")

If picssss = "NA" Then PicsKo.Image = Image.FromFile("D:\ICCMStudentPictures\Pics\Guy.png") Else PicsKo.Image = Image.FromFile(picssss)

End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "KEY RESTRICTION" Private Sub eadd_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SponsorsEmail.KeyPress, Eadd2.KeyPress, Eadd.KeyPress Dim allowedChars As String = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@_." If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Cinfo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles EYrGrad.KeyPress, HYrGrad.KeyPress, SponsorsTelephone.KeyPress, SponsorsCellphone.KeyPress, MotContact.KeyPress, GuaContact.KeyPress, FatContact.KeyPress, CInfo2.KeyPress, CInfo.KeyPress Dim allowedChars As String = "1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Birthdate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SponsorsCellphone.KeyPress, SponsorsTelephone.KeyPress, Birthdate.KeyPress Dim allowedChars As String = "1234567890/" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub Religion_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles StudentName.KeyPress, Religion.KeyPress, Gender.KeyPress, Citizenship.KeyPress Dim allowedChars As String = "1234567890abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ " 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub bloodtype_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SS.KeyPress, SearchBox.KeyPress, Bloodtype.KeyPress Dim allowedChars As String = "ABO" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub Private Sub sems_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Sems.KeyPress, Passedtext.KeyPress, FailedLastSem.KeyPress, Year.KeyPress, Failedtext.KeyPress, Inctext.KeyPress, SemsStudied.KeyPress

e.Handled = True

End Sub

Private Sub major_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SWRYear.KeyPress, Term.KeyPress, SemAlreadyCompleted4.KeyPress, SemAlreadyCompleted3.KeyPress, SemAlreadyCompleted2.KeyPress, SemAlreadyCompleted1.KeyPress, RadioButton60.KeyPress, RadioButton59.KeyPress, RadioButton57.KeyPress, RadioButton12.KeyPress, PosUnitsCompleted4.KeyPress, PosUnitsCompleted3.KeyPress, PosUnitsCompleted2.KeyPress, PosUnitsCompleted1.KeyPress, OSCreditYES.KeyPress, OScreditAcceptProvisional.KeyPress, OCTransferCreditCompleted.KeyPress, OCOTRReceivedYES.KeyPress, OCNounitsCreditedOS.KeyPress, OCNoUnitsCompleteICCM.KeyPress, OCNoSemCompletedOS.KeyPress, OCClassCardReceivedYES.KeyPress, Major.KeyPress, GraduateYes4.KeyPress, GraduateYes3.KeyPress, GraduateYes2.KeyPress, GraduateYes1.KeyPress, Date4.KeyPress, Date3.KeyPress, Date2.KeyPress, Date1.KeyPress, ARTotalNoUnitsToDate.KeyPress, AROverAllGPAtoDate.KeyPress, ARNoUnitsWoAGrade.KeyPress, ARNoUnitsEarnedAtICCMtoDate.KeyPress, ARNoUnitsCreditedOS.KeyPress, ARNoSemsStudiedSofar.KeyPress, ARNosemsCompletedOS.KeyPress, ARNoSemsAlreadyCompletedICCM.KeyPress, ARNoOfUnitsFailedLastSem.KeyPress, ARGPAlastSem.KeyPress, AcademicNote.KeyPress

e.Handled = True

End Sub
#End Region

#Region "SEE ACADEMIC REVIEW"

Private Sub APW_CellMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles APW.CellMouseDoubleClick Dim Ext As MsgBoxResult Ext = MsgBox("See Academic Record of Year " & APW.Item(0, APW.CurrentRow.Index).Value & " , Sem " & APW.Item(1, APW.CurrentRow.Index).Value & " ? ", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Dim a, b As Integer

Comprehension1.Checked = False Comprehension2.Checked = False Comprehension3.Checked = False Comprehension4.Checked = False English1.Checked = False English2.Checked = False English3.Checked = False Lit1.Checked = False Lit1.Checked = False StudentMinistry1.Checked = False StudentMinistry2.Checked = False StudentMinistry3.Checked = False StudentMinistry4.Checked = False PracEvangelism1.Checked = False PracEvangelism2.Checked = False PracEvangelism3.Checked = False PracEvangelism4.Checked = False Ministry1.Checked = False Ministry2.Checked = False Ministry3.Checked = False Ministry4.Checked = False Greek1.Checked = False Greek2.Checked = False Greek3.Checked = False Greek4.Checked = False PrepKey1.Checked = False PrepKey2.Checked = False Key1.Checked = False Key2.Checked = False Key3.Checked = False Key4.Checked = False Music1.Checked = False Music2.Checked = False Music3.Checked = False Music4.Checked = False EdFound1.Checked = False EdFound2.Checked = False CurriculumD.Checked = False MandE.Checked = False LearnDev.Checked = False StTeach.Checked = False

a = APW.Item(0, APW.CurrentRow.Index).Value b = APW.Item(1, APW.CurrentRow.Index).Value Populate("Select * from GMCN7EnrollmentDatabase.sinfoapacademicrecords where StudentID = '" & sid & "' and Year_Level = " & a & " and Term = " & b & ";", a1) ARNoUnitsCreditedOS.Text = a1.Item(1, 0).Value ARNosemsCompletedOS.Text = a1.Item(2, 0).Value ARNoSemsAlreadyCompletedICCM.Text = a1.Item(3, 0).Value ARNoSemsStudiedSofar.Text = a1.Item(4, 0).Value ARNoUnitsEarnedAtICCMtoDate.Text = a1.Item(5, 0).Value ARTotalNoUnitsToDate.Text = a1.Item(6, 0).Value ARNoUnitsWoAGrade.Text = a1.Item(7, 0).Value AROverAllGPAtoDate.Text = a1.Item(8, 0).Value ARGPAlastSem.Text = a1.Item(9, 0).Value ARNoOfUnitsFailedLastSem.Text = a1.Item(10, 0).Value AcademicNote.Text = a1.Item(11, 0).Value

' OUTSIDE CREDITS

Populate("Select * from GMCN7EnrollmentDatabase.sinfoapoutsidecredits where StudentID = '" & sid & "' and Year_Level = " & a & " and Term = " & b & ";", a2)

If a2.Item(1, 0).Value = "NO" Then RadioButton12.Checked = True Else OSCreditYES.Checked = True

If a2.Item(2, 0).Value = "NO" Then RadioButton57.Checked = True Else OCOTRReceivedYES.Checked = True End If

If a2.Item(3, 0).Value = "NO" Then RadioButton59.Checked = True Else OCClassCardReceivedYES.Checked = True End If

OCNoUnitsCompleteICCM.Text = a2.Item(4, 0).Value OCTransferCreditCompleted.Text = a2.Item(5, 0).Value OCNoSemCompletedOS.Text = a2.Item(6, 0).Value OCNounitsCreditedOS.Text = a2.Item(7, 0).Value

If a2.Item(8, 0).Value = "FINAL" Then RadioButton60.Checked = True Else OScreditAcceptProvisional.Checked = True End If

End If ' POSSIBLE GRADUATION

Populate("Select * from GMCN7EnrollmentDatabase.sinfoappossiblegraduation1 where StudentID = '" & sid & "' and Year_Level = " & a & " and Term = " & b & ";", a3) '1 If a3.Item(1, 0).Value = "YES" Then GraduateYes1.Checked = True End If Date1.Text = a3.Item(2, 0).Value PosUnitsCompleted1.Text = a3.Item(3, 0).Value SemAlreadyCompleted1.Text = a3.Item(4, 0).Value

'2 If a3.Item(5, 0).Value = "YES" Then GraduateYes2.Checked = True End If Date2.Text = a3.Item(6, 0).Value PosUnitsCompleted2.Text = a3.Item(7, 0).Value SemAlreadyCompleted2.Text = a3.Item(8, 0).Value '3 If a3.Item(9, 0).Value = "YES" Then GraduateYes3.Checked = True End If Date3.Text = a3.Item(10, 0).Value PosUnitsCompleted3.Text = a3.Item(11, 0).Value SemAlreadyCompleted3.Text = a3.Item(12, 0).Value '4 If a3.Item(13, 0).Value = "YES" Then GraduateYes4.Checked = True End If Date4.Text = a3.Item(14, 0).Value PosUnitsCompleted4.Text = a3.Item(15, 0).Value SemAlreadyCompleted4.Text = a3.Item(16, 0).Value

' AP SUBJECTS

Populate("Select * from GMCN7EnrollmentDatabase.sinfoapsubjects where StudentID = '" & sid & "' and Year_Level = " & a & " and Term = " & b & ";", a4)

If a4.Item(1, 0).Value = "PASSED" Then Comprehension1.Checked = True End If

If a4.Item(2, 0).Value = "PASSED" Then Comprehension2.Checked = True End If

If a4.Item(3, 0).Value = "PASSED" Then Comprehension3.Checked = True End If

If a4.Item(4, 0).Value = "PASSED" Then Comprehension4.Checked = True End If

If a4.Item(5, 0).Value = "PASSED" Then English1.Checked = True End If

If a4.Item(6, 0).Value = "PASSED" Then English2.Checked = True End If

If a4.Item(7, 0).Value = "PASSED" Then English3.Checked = True End If

If a4.Item(8, 0).Value = "PASSED" Then Lit1.Checked = True End If

If a4.Item(9, 0).Value = "PASSED" Then Lit1.Checked = True End If

If a4.Item(10, 0).Value = "PASSED" Then StudentMinistry1.Checked = True End If

If a4.Item(11, 0).Value = "PASSED" Then StudentMinistry2.Checked = True End If

If a4.Item(12, 0).Value = "PASSED" Then StudentMinistry3.Checked = True End If

If a4.Item(13, 0).Value = "PASSED" Then StudentMinistry4.Checked = True End If

If a4.Item(14, 0).Value = "PASSED" Then PracEvangelism1.Checked = True End If

If a4.Item(15, 0).Value = "PASSED" Then PracEvangelism2.Checked = True End If If a4.Item(16, 0).Value = "PASSED" Then PracEvangelism3.Checked = True End If If a4.Item(17, 0).Value = "PASSED" Then PracEvangelism4.Checked = True End If

If D1.Item(20, 0).Value = "FEMALE" Then Label59.Visible = False GroupBox34.Visible = False Else If a4.Item(18, 0).Value = "PASSED" Then Ministry1.Checked = True End If

If a4.Item(19, 0).Value = "PASSED" Then Ministry2.Checked = True End If If a4.Item(20, 0).Value = "PASSED" Then Ministry3.Checked = True End If If a4.Item(21, 0).Value = "PASSED" Then Ministry4.Checked = True End If

End If

If a4.Item(22, 0).Value = "PASSED" Then Greek1.Checked = True End If

If a4.Item(23, 0).Value = "PASSED" Then Greek2.Checked = True End If If a4.Item(24, 0).Value = "PASSED" Then Greek3.Checked = True End If If a4.Item(25, 0).Value = "PASSED" Then Greek4.Checked = True End If

If a4.Item(26, 0).Value = "PASSED" Then PrepKey1.Checked = True End If

If a4.Item(27, 0).Value = "PASSED" Then PrepKey2.Checked = True End If

If a4.Item(28, 0).Value = "PASSED" Then Key1.Checked = True End If

If a4.Item(29, 0).Value = "PASSED" Then Key2.Checked = True End If

If a4.Item(30, 0).Value = "PASSED" Then Key3.Checked = True End If

If a4.Item(31, 0).Value = "PASSED" Then Key4.Checked = True End If

If a4.Item(32, 0).Value = "PASSED" Then Music1.Checked = True End If

If a4.Item(33, 0).Value = "PASSED" Then Music2.Checked = True End If

If a4.Item(34, 0).Value = "PASSED" Then Music3.Checked = True End If

If a4.Item(35, 0).Value = "PASSED" Then Music4.Checked = True End If

If a4.Item(36, 0).Value = "PASSED" Then EdFound1.Checked = True End If

If a4.Item(37, 0).Value = "PASSED" Then EdFound2.Checked = True End If

If a4.Item(38, 0).Value = "PASSED" Then CurriculumD.Checked = True End If If a4.Item(39, 0).Value = "PASSED" Then MandE.Checked = True End If If a4.Item(40, 0).Value = "PASSED" Then LearnDev.Checked = True End If If a4.Item(41, 0).Value = "PASSED" Then StTeach.Checked = True End If

End If

End Sub
#End Region

#Region "WORK REVIEW" Private Sub DataGridView1_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles M8.CellDoubleClick Dim asdx As String Dim Ext As MsgBoxResult Ext = MsgBox("Select Date " & M8.Item(0, M8.CurrentRow.Index).Value & " ? ", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Populate("Select Date1, Date2, Date3 from GMCN7Enrollmentdatabase.swsworkreview where Date_reviewed = '" & M8.Item(0, M8.CurrentRow.Index).Value & "' and StudentID = '" & sid & "';", M2) Populate("Select Review1, Review2, Review3 from GMCN7Enrollmentdatabase.swsworkreview where Date_reviewed = '" & M8.Item(0, M8.CurrentRow.Index).Value & "' and StudentID = '" & sid & "';", M3) Populate("Select OverAll_Rating, Rating from GMCN7Enrollmentdatabase.swsworkreview where Date_reviewed = '" & M8.Item(0, M8.CurrentRow.Index).Value & "' and StudentID = '" & sid & "';", M4) Populate("Select Date_Reviewed from GMCN7Enrollmentdatabase.swsworkreview where Date_reviewed = '" & M8.Item(0, M8.CurrentRow.Index).Value & "' and StudentID = '" & sid & "';", M5) asdx = M4.Item(1, 0).Value

If asdx = "Very Poor" Then

M7.Visible = False Populate("Select You_Will_Not_Be_Offered_A_SWS_next_sem as 'You Will Not Be Offered SWS next sem' , Work_Scholarship_Is_Cancelled_Immediately as 'Work Scholarship Cancelled' from GMCN7Enrollmentdatabase.swsworkreviewverypoor where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "' ;", M6) ElseIf asdx = "Poor" Then M7.Visible = True Populate("Select Second2ratingYouWillNotBeOfferedASWSNextYear as 'Second 2 Rating Will Not Be Offered a SWS Next Year', Final_Warning_or_You_Will_Not_Be_Offered_a_SWS_next_Sem as 'Final Warning or SWS Will Not be Offered Next Sem' from GMCN7Enrollmentdatabase.swsworkreviewpoor where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "';", M6) Populate("Select SWS_work_Will_Be_Assessed_At_P45_per_hour_Next_sem as 'SWS at P45 Per Hour Next sem', Max_Number_Of_Hours_You_May_Work_Per_Week_Next_Sem_is_18 as 'Max Hours You May Work Next Sem is 18' from GMCN7Enrollmentdatabase.swsworkreviewpoor where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "';", M7) ElseIf asdx = "Satisfactory" Then M7.Visible = False Populate("Select Pls_Improve_Please_Strive_For_Excellence as 'Strive for Excellence', SWS_work_Will_Be_Assessed_At_P50_Per_Hour_Next_Sem as 'Work will be Assesed P50 PerHr Next Sem' from GMCN7Enrollmentdatabase.swsworkreviewsatisfactory where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "' ;", M6) ElseIf asdx = "Very Satisfactory" Then M7.Visible = False Populate("Select * from GMCN7Enrollmentdatabase.swsworkreviewVerySatisfactory where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "';", M6) ElseIf asdx = "Outstanding" Then M7.Visible = False Populate("Select * from GMCN7Enrollmentdatabase.swsworkreviewOutstanding where Date_reviewed = '" & M5.Item(0, 0).Value & "' and StudentID = '" & sid & "';", M6)

End If End If End Sub
#End Region

#Region " EDIT SUBMIT" 'ADD NOTE

Private Sub SubmitNote_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitNote.Click Try

Dim datenow datenow = Format(Now, "yyyy-MM-dd")

Dim Ext2 As MsgBoxResult Ext2 = MsgBox("SUBMIT NOTE ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext2 = MsgBoxResult.Yes Then ' Populate("Select Notes, Date_Noted from gmcn7enrollmentdatabase.efnotes where StudentID = '" & sid & "';", D5) Dim dt As DataTable = DirectCast(D5.DataSource, DataTable) dt.Rows.Add(NoteBook.Text, datenow) MsgBox("NOTE ADDED", MsgBoxStyle.Information) NoteBook.Visible = False NoteBook.Text = "" D5.Visible = True SubmitNote.Hide() AddNote.Show() Else ' Label167.Show() NoteBook.Visible = False D5.Visible = True NoteBook.Text = "" SubmitNote.Hide() AddNote.Show() Exit Sub End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub AddNote_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddNote.Click Try

Dim Ext As MsgBoxResult Ext = MsgBox("ADD A NOTE ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Label167.Hide() NoteBook.Visible = True D5.Visible = False AddNote.Hide() SubmitNote.Show() Else Label167.Show() Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub ScholarChk_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) If ScholarChk.Checked = True Then GB1.Visible = True GB2.Visible = True GB3.Visible = True Else GB1.Visible = False GB2.Visible = False GB3.Visible = False End If End Sub

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

Dim Ext As MsgBoxResult Ext = MsgBox("Edit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then UploadBtn.Show()

Dim textBoxes1 = StudentInfoPg1.Controls.OfType(Of TextBox)() For Each t In textBoxes1 t.ReadOnly = False

Next t

Dim textBoxes2 = W.Controls.OfType(Of TextBox)() For Each t In textBoxes2 t.ReadOnly = False

Next t

Dim textBoxes3 = W1.Controls.OfType(Of TextBox)() For Each t In textBoxes3 t.ReadOnly = False

Next t

Dim textBoxes4 = W2.Controls.OfType(Of TextBox)() For Each t In textBoxes4 t.ReadOnly = False

Next t

W.Visible = True W1.Visible = True W2.Visible = True D6.Visible = True Label62.Visible = True

Major.ReadOnly = True Term.ReadOnly = True StudentNumber.ReadOnly = True

' FPayment.ReadOnly = True SYear.ReadOnly = True DateEnrolled.ReadOnly = True TUnits.ReadOnly = True

Label131.Hide() Label132.Hide() Label159.Hide() Label167.Hide()

D3.CurrentCell.DataGridView.ReadOnly = False D3.AllowUserToAddRows = True Button1.Hide() SubmitAllBtn.Show() End If

End Sub

Private Sub SubmitAllBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitAllBtn.Click ' STUDENT INFO

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then UploadBtn.Hide() Dim medchk, notchk, wrkchk, sponchk, workscholarchk As String ' checkbox checker

nonQuery("update GMCN7EnrollmentDatabase.EFStudentInfo set Last_Name = '" & LName.Text & "', First_Name = '" & FName.Text & "', Middle_Name = '" & MName.Text & "', Birth_place = '" & BPlace.Text & "', Address = '" & Address.Text & "', Address2 = '" & Address2.Text & "', Contact_info = '" & _ CInfo.Text & "', Contact_Info2 = '" & CInfo2.Text & "', Email_Add = '" & Eadd.Text & "', Email_Add2 = '" & _ Eadd2.Text & "', Civil_Status = '" & Cstatus.Text & "', Birth_date = '" & Birthdate.Text & "', Gender = '" & _ Gender.Text & "', Citizenship = '" & Citizenship.Text & "', Religion = '" & Religion.Text & "', Fathers_Name = '" & FatName.Text & "', Fathers_Occupation = '" & OccFat.Text & "', Fathers_Number = '" & _ FatContact.Text & "', Mothers_Name = '" & MotName.Text & "', Mothers_Occupation = '" & OccMot.Text & "', Mothers_Number = '" & MotContact.Text & "', Guardian_Name = '" & GuaName.Text & "', Guardian_Number = '" & _ GuaContact.Text & "', Guardian_Occupation = '" & OccGua.Text & "', blood_type = '" & Bloodtype.Text & "', Elementary = '" & ESchool.Text & "', Elementary_Date_Graduated = '" & EYrGrad.Text & "', HighSchool = '" & HSchool.Text & "', Highschool_Date_Graduated = '" & HYrGrad.Text & "' where Student_ID = '" & sid & "';")

nonQuery("update GMCN7EnrollmentDatabase.EFWorkExperience set Recent_Work = '" & RecentWOrk.Text & "', Work_Address = '" & WorkAddress.Text & "' where StudentID = '" & sid & "';")

nonQuery("update GMCN7EnrollmentDatabase.EFSponsor set Sponsors_Name = '" & SponsorName.Text & "', Sponsors_Email = '" & SponsorsEmail.Text & "', Sponsors_Address = '" & SponsorAddress.Text & "', Sponsors_TelPhone = '" & SponsorsTelephone.Text & "', Sponsors_Cell = '" & SponsorsCellphone.Text & "' where StudentID = '" & sid & "';")

nonQuery("update GMCN7EnrollmentDatabase.EFmedical set Recent_Illness = '" & RecentIll.Text & "', Allergies = '" & Allergies.Text & "', Handicaps = '" & Handicaps.Text & "', Taking_Medications = '" & TextBox1.Text & "', Pls_Specify = '" & YesSpecify.Text & "' where StudentID = '" & sid & "';")

' REQ Dim y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14 As String

If Rr1.Checked = True Then y1 = "YES" Else y1 = "NO" End If

If Rr2.Checked = True Then y2 = "YES" Else y2 = "NO" End If If rr3.Checked = True Then y3 = "YES" Else y3 = "NO" End If If R4.Checked = True Then y4 = "YES" Else y4 = "NO" End If If R5.Checked = True Then y5 = "YES" Else y5 = "NO" End If If R6.Checked = True Then y6 = "YES" Else y6 = "NO" End If If R7.Checked = True Then y7 = "YES" Else y7 = "NO" End If If R8.Checked = True Then y8 = "YES" Else y8 = "NO" End If If R9.Checked = True Then y9 = "YES" Else y9 = "NO" End If If R10.Checked = True Then y10 = "YES" Else y10 = "NO" End If If R11.Checked = True Then y11 = "YES" Else y11 = "NO" End If If R12.Checked = True Then y12 = "YES" Else y12 = "NO" End If If R13.Checked = True Then y13 = "YES" Else y13 = "NO" End If If R14.Checked = True Then y14 = "YES" Else y14 = "NO" End If

nonQuery("update GMCN7EnrollmentDatabase.EFRequirements set Two_by_TwoID = '" & y1 & "', One_by_OneID = '" & y2 & "', Form137_or_138 = '" & y3 & "', Transcript_Of_Records = '" & y4 & "', Good_Moral_Character = '" & y5 & "', Letter_Of_Referal = '" & y6 & _ "', Letter_Of_Financial = '" & y7 & "', One_Page_Essay = '" & y8 & "', Birth_Certificate = '" & y9 & "', Brgy_Clearance = '" & y10 & "', NBI = '" & y11 & _ "', Police_Clearance = '" & y12 & "', Registration_Fee = '" & y13 & "', Marriage_Certificate = '" & y14 & "' where StudentID = '" & sid & "';")

If ScholarChk.Checked = True Then workscholarchk = "YES"

Dim y15, y16, y17 As String ' SCHOLARS

If R15.Checked = True Then y15 = "YES" Else y15 = "NO" End If

If R16.Checked = True Then y16 = "YES" Else y16 = "NO" End If If R17.Checked = True Then y17 = "YES" Else y17 = "NO" End If

' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efrequirementsworkscholar where StudentID = '" & sid & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader ' CHECK IF THE STUDENT IS ALREADY A WORK SCHOLAR

If rdr.HasRows Then 'MsgBox("SUBJECT ALREADY ADDED", MsgBoxStyle.Information)

' ' rdr = Nothing 'con.Close() 'Exit Sub Else nonQuery("insert into GMCN7EnrollmentDatabase.efrequirementsworkscholar values ('" & sid & "','" & y15 & "','" & y16 & "','" & y17 & "');") con.Close() End If con.Close()

nonQuery("update GMCN7EnrollmentDatabase.efrequirementsworkscholar set Photo_of_House = '" & y15 & "', Telephone_Bill = '" & y16 & "', Electric_Bill = '" & y17 & "' where StudentID = '" & sid & "';") Else workscholarchk = "NO" End If

If Not RecentIll.Text = Nothing Then medchk = "YES" Else medchk = "NO" End If

If Not D5.Text = Nothing Then notchk = "YES" Else notchk = "NO" End If

If Not RecentWOrk.Text = Nothing Then wrkchk = "YES" Else wrkchk = "NO" End If

If Not SponsorName.Text = Nothing Then sponchk = "YES" Else sponchk = "NO" End If

nonQuery("update GMCN7EnrollmentDatabase.efCheckBoxChecker set medChk = '" & medchk & "', notechk = '" & notchk & "', Workchk = '" & wrkchk & "', SponsorChk = '" & sponchk & "', ScholarWorkChk = '" & workscholarchk & "' where StudentID = '" & sid & "';")

nonQuery("delete from gmcn7enrollmentdatabase.efnotes where StudentID = '" & sid & "';")

For Each dgvRow As DataGridViewRow In D5.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.efnotes values('" & sid & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "');")

End If Next

nonQuery("delete from gmcn7enrollmentdatabase.efcollegebackground where StudentID = '" & sid & "';")

For Each dgvRow As DataGridViewRow In D3.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.efcollegebackground values('" & sid & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "','" & dgvRow.Cells(2).Value & "');")

End If Next

nonQuery("update GMCN7EnrollmentDatabase.semremarks set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndsem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndYear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks2ndYear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks3rdYear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks4thyear set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.semremarks4thyear2ndSem set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Last_Name = '" & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.sinfoswr set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.studentfailures set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';") nonQuery("update GMCN7EnrollmentDatabase.swsworkreview set Name = '" & FName.Text & " " & MName.Text & " " & LName.Text & "' where StudentID = '" & sid & "';")

D3.CurrentCell.DataGridView.ReadOnly = True D3.AllowUserToAddRows = False Button1.Show() SubmitAllBtn.Hide()

nonQuery("update GMCN7EnrollmentDatabase.EFPictures set picturePath = 'D:\\ICCMStudentPictures\\Pics" & "\\" & sid & System.IO.Path.GetExtension(FilePath.Text) & "' where StudentID = '" & sid & "';") Copyer(FilePath.Text, ResultFile.Text)

Dim picssss = MySelectSpecific("Select PicturePath from gmcn7enrollmentdatabase.efpictures where StudentID = '" & sid & "';")

PicsKo.Image = Image.FromFile(picssss)

MsgBox("INFORMATION SUCCESSFULLY EDITED", MsgBoxStyle.Information)

End If

Dim textBoxes1 = StudentInfoPg1.Controls.OfType(Of TextBox)() For Each t In textBoxes1 t.ReadOnly = True

Next t

Dim textBoxes2 = W.Controls.OfType(Of TextBox)() For Each t In textBoxes2 t.ReadOnly = True

Next t

Dim textBoxes3 = W1.Controls.OfType(Of TextBox)() For Each t In textBoxes3 t.ReadOnly = True

Next t

Dim textBoxes4 = W2.Controls.OfType(Of TextBox)() For Each t In textBoxes4 t.ReadOnly = True

Next t

End Sub
#End Region

#Region "GRADES"

#Region "ADD A SUBJECT" Private Sub BACKK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BACKForY1S1.Click

BACKForY1S1.Hide() DY1S1.Show() DY1S2.Show() Label122.Show() SubmitY1S1.Show() AddForY1S1.Hide() AddY1S1.Enabled = True End Sub

Private Sub AddBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddY1S1.Click DY1S1.Hide() SubmitY1S1.Hide() Label122.Hide() BACKForY1S1.Show() AddForY1S1.Show()

AddY1S1.Enabled = False Populate("Select SubjectID, Descriptive_Title, Units from GMCN7Enrollmentdatabase.efsubjects where StudentID = '" & StudentNumber.Text & "';", AddForY1S1)

End Sub

Private Sub AddForY1S1_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles AddForY1S1.CellContentDoubleClick Try Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT : " & AddForY1S1.Item(0, AddForY1S1.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim dt As DataTable = DirectCast(DY1S1.DataSource, DataTable) dt.Rows.Add(AddForY1S1.Item(2, AddForY1S1.CurrentRow.Index).Value, AddForY1S1.Item(1, AddForY1S1.CurrentRow.Index).Value, AddForY1S1.Item(0, AddForY1S1.CurrentRow.Index).Value)

End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "SUBMIT GRADE 1st Year" Dim failures As Integer = 0 Dim passed As Integer = 0 Dim inc As Integer = 0 Dim f, p, i As Integer Dim WhatiF As Integer = 0 Private Sub SubmitS1Y1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitY1S1.Click Try Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 1;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY1S1.Rows If Not dgvRow.IsNewRow Then 'Dim IsTicked = dgvRow.Cells(0).Value '(Dy1S1F.Rows(rIndex).Cells(0).Value) 'If IsTicked = 2 Then ' chkbox = "NE" 'ElseIf IsTicked = 1 Then ' chkbox = "PASSED" 'Else ' chkbox = "FAILED" 'End If 'MsgBox(chkbox) ' nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & DMajor.Item(0, 0).Value & "','" & DMajor.Item(1, 0).Value & "', 1 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & chkbox & "', '1');") ' rIndex += 1 Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 1;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub SubmitY1S2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitY1S2.Click Try

If Year.Text = 1 And Term.Text = 1 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else

Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 2;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY1S2.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 1 and Term = 2;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 ,2,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 ,2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 1 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks2ndsem where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "SUBMIT GRADE 2nd YEAR"

Private Sub SubmitY2S1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitY2S1.Click Try

If Year.Text = 1 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndyear where StudentID = '" & StudentNumber.Text & "' and Year_Level = 2 and Term = 1;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY2S1.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 2 and Term = 1;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks2ndyear where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub SubmitY2S2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitY2S2.Click Try If Year.Text = 1 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem where StudentID = '" & StudentNumber.Text & "' and Year_Level = 2 and Term = 2;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY2S2.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 2 and Term = 2;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 2 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks2ndyear2ndsem where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

#End Region

#Region "SUBMIT GRADE 3rd YEAR" Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click Try If Year.Text = 1 Or Year.Text = 2 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks3rdyear where StudentID = '" & StudentNumber.Text & "' and Year_Level = 3 and Term = 1;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY3S1.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 3 and Term = 1;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks3rdyear where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Try If Year.Text = 1 Or Year.Text = 2 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem where StudentID = '" & StudentNumber.Text & "' and Year_Level = 3 and Term = 2;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY3S2.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 3 and Term = 2;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 3 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 1 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks3rdyear2ndSem where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "SUBMIT GRADE 4th YEAR" Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click Try If Year.Text = 1 Or Year.Text = 2 Or Year.Text = 3 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks4thyear where StudentID = '" & StudentNumber.Text & "' and Year_Level = 4 and Term = 1;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY4S1.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 4 and Term = 1;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 1 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks4thyear where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click Try If Year.Text = 1 Or Year.Text = 2 Or Year.Text = 3 Then MsgBox("Student's current year and semester does not allow this action", MsgBoxStyle.Information, "Confirm") 'SubmitY1S2.BackColor = Drawing.Color.Black 'SubmitY1S2.ForeColor = Drawing.Color.WhiteSmoke Exit Sub Else Dim checkk As Integer = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks4thyear2ndSem where StudentID = '" & StudentNumber.Text & "' and Year_Level = 4 and Term = 2;"))

If checkk = Nothing Or WhatiF = 1 Then

For Each dgvRow As DataGridViewRow In DY4S2.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentjournal where StudentID = '" & StudentNumber.Text & "' and Year_Level = 4 and Term = 2;")

If zxc = "1" Or zxc = "3" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'PASSED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value ElseIf zxc = "DROPPED" Then nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'DROPPED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED failures += dgvRow.Cells(1).Value Else nonQuery("insert into GMCN7EnrollmentDatabase.semremarks4thyear2ndSem values('" & StudentNumber.Text & "','" & LName.Text & " , " & FName.Text & " " & MName.Text & "', 4 , 2 ,'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'INC', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED inc += 1 End If

End If Next

f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & StudentNumber.Text & "';"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & StudentNumber.Text & "' and Date_Enrolled = '" & DateEnrolled.Text & "';") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & StudentNumber.Text & "'," & failures & "," & passed & "," & inc & "," & Year.Text & "," & Term.Text & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0 MsgBox("GRADE RECORDED", MsgBoxStyle.Information, "SUCCESS") WhatiF = 0 Else Dim ext As MsgBoxResult ext = MsgBox("Student Already Evaluated this year and semester ! Do you want to edit this record?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then nonQuery("delete from GMCN7EnrollmentDatabase.semremarks4thyear2ndSem where StudentID = '" & StudentNumber.Text & "';") WhatiF = 1 End If End If End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

#End Region

#Region "Navigation Grading"

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click StudentGrades.SelectedTab = FY

End Sub

Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click StudentGrades.SelectedTab = TabPage3 End Sub

Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click StudentGrades.SelectedTab = SY End Sub

Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click StudentGrades.SelectedTab = FY End Sub

Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click StudentGrades.SelectedTab = TY End Sub

Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click StudentGrades.SelectedTab = SY End Sub

Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click StudentGrades.SelectedTab = TabPage10

End Sub

Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click StudentGrades.SelectedTab = TY End Sub
#End Region

#End Region

#Region "UPLOAD PICTURE" Dim uploadchck As Integer = 0 Private Sub UploadBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UploadBtn.Click

Browseforfile(FilePath, PicsKo, "jpeg|*.jpeg| jpg|*.jpg| png|*.png") UploadChck = UploadChck + 1

End Sub

Public Sub getTargetPath(ByVal target As String, ByVal resulttextbox As Label, _ ByVal pinanggalingan As String, ByVal Filename As String) 'pinanggalingan ay yung result file

resulttextbox.Text = target & "\" & Filename & System.IO.Path.GetExtension(pinanggalingan)

End Sub

Public Sub Browseforfile(ByVal resultpath As Label, ByVal pic As PictureBox, ByVal filter As String)

Dim fd As OpenFileDialog = New OpenFileDialog() Dim strFileName As String

fd.Title = "Open File Dialog" fd.InitialDirectory = "C:\" fd.Filter = filter

If fd.ShowDialog() = DialogResult.OK Then strFileName = fd.FileName pic.Image = Image.FromFile(strFileName)

resultpath.Text = strFileName

End If

getTargetPath("D:\ICCMStudentPictures\Pics", ResultFile, FilePath.Text, StudentID.Text)

End Sub

Public Sub Copyer(ByVal sourcepath As String, ByVal resultpath As String) If System.IO.File.Exists(resultpath) Then System.IO.File.Delete(resultpath) End If My.Computer.FileSystem.CopyFile(sourcepath, resultpath)

End Sub

#End Region

' MAIN MENU Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click, Button7.Click, Button17.Click, Button18.Click, Button19.Click, Button20.Click, Button21.Click StudentInfo.SelectedTab = SearchTab End Sub

Private Sub SWRYear_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SWRYear.SelectedIndexChanged Populate("Select Month_Of as 'Month' , Week1, Week2, Week3, Week4 from gmcn7enrollmentdatabase.sinfoswr where studentId = '" & sid & "' and year_Of = '" & SWRYear.Text & "';", tttt) End Sub

End Class

STUDENT OVERVIEW FORM

Imports System.Drawing

Public Class StudentOverview

#Region "SELECT"

Private Sub SearchBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SearchBox.KeyPress, TextBox1.KeyPress e.Handled = True End Sub

Private Sub SearchBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBox.SelectedIndexChanged Try

PicsKo.Image = Image.FromFile("D:\ICCMStudentPictures\Pics\Guy.png")

If SearchBox.Text = "Student_ID" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by Student_ID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Last_Name" Then

Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name ,major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by Last_Name asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "First_Name" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name ,Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by First_Name asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Year_Level" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by Year_Level asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Course" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by Major asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Date_Enrolled" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Date_Enrolled from gmcn7enrollmentdatabase.efstudentinfo order by Date_Enrolled asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Number_Of_Enrollee" Then

GroupBox1.Hide() Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level,School_Year, Number_Of_Enrollee from gmcn7enrollmentdatabase.efstudentinfo order by Number_Of_Enrollee asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "School_Year" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_level, School_Year from gmcn7enrollmentdatabase.efstudentinfo order by School_Year asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Active" Then

GroupBox1.Hide() Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Enrolled' order by Student_ID asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Inactive" Then

GroupBox1.Hide() Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Not Enrolled' order by Student_ID asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Regular_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' order by Student_ID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "New_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' order by Student_ID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Number_of_Units_Passed" Then Populate("Select StudentID, Last_Name, Major, Year_Level, Passed as 'Units Passed' from gmcn7enrollmentdatabase.efstudentjournal order by StudentID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Number_of_Units_Failed" Then Populate("Select StudentID, Last_Name, Major, Year_Level, Failed as 'Units Failed' from gmcn7enrollmentdatabase.efstudentjournal order by StudentID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Total_Units" Then Populate("Select StudentID, Last_Name, Major, Year_Level, TotalUnits as 'Total Units' from gmcn7enrollmentdatabase.efstudentjournal order by StudentID asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Gender" Then Dim lalake As Integer = 0 Dim babae As Integer = 0 GroupBox1.Show() Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Gender from gmcn7enrollmentdatabase.efstudentinfo order by Gender asc;", SearchMe)

TextBox1.Text = SearchMe.RowCount

For Each dgvRow As DataGridViewRow In SearchMe.Rows If Not dgvRow.IsNewRow Then

If dgvRow.Cells(4).Value = "Male" Then lalake += 1 Else babae += 1 End If End If Next x.Text = lalake y.Text = babae

ElseIf SearchBox.Text = "Civil_Status" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Civil_Status from gmcn7enrollmentdatabase.efstudentinfo order by Civil_Status asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Financial_Payment" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Financial_Payment from gmcn7enrollmentdatabase.efstudentinfo order by Financial_Payment asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Sems_Studied" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, SemsStudied as 'Sems Studied' from gmcn7enrollmentdatabase.efstudentinfo order by SemsStudied asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "First_Year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 1 order by Student_Id asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Second_year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 2 order by Student_Id asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Third_year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 3 order by Student_Id asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Fourth_year" Then GroupBox1.Hide() Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 4 order by Student_Id asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Student_Notes" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Notes, Date_Noted from gmcn7enrollmentdatabase.efnotes inner join gmcn7enrollmentdatabase.efstudentInfo on efnotes.studentID = efstudentinfo.student_ID order by student_Id asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Scholar" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level from gmcn7enrollmentdatabase.efcheckboxchecker inner join gmcn7enrollmentdatabase.efstudentInfo on efcheckboxchecker.studentID = efstudentinfo.student_ID where ScholarWorkChk = 'YES' order by student_Id asc;", SearchMe) TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Medical_Status" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level,Recent_Illness, Allergies, Handicaps, Taking_Medications, Pls_Specify from gmcn7enrollmentdatabase.efmedical inner join gmcn7enrollmentdatabase.efstudentInfo on efmedical.studentID = efstudentinfo.student_ID order by Student_ID asc ;", SearchMe) TextBox1.Text = SearchMe.RowCount

ElseIf SearchBox.Text = "Students_With_Sponsor" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Nam,Year_Level, Sponsors_Name,Sponsors_Email as 'Email', Sponsors_address as 'Address', Sponsors_TelPhone as 'Telephone #' ,Sponsors_cell as ' Cell #' from gmcn7enrollmentdatabase.efsponsor inner join gmcn7enrollmentdatabase.efstudentInfo on efsponsor.studentID = efstudentinfo.student_ID order by student_Id asc;", SearchMe) ElseIf SearchBox.Text = "Sunday_Worship_Report" Then GroupBox1.Hide() Populate("Select StudentID, Name, Year_Level, Month_Of as 'Month', Year_Of, Week1,Week2,Week3,Week4 from gmcn7enrollmentdatabase.sinfoswr order by Studentid asc;", SearchMe) ElseIf SearchBox.Text = "Work_Review" Then GroupBox1.Hide() Populate("Select StudentID, Name, Year_Level ,Review1, Review2, Review3, Date_Reviewed, OverAll_rating, Rating from gmcn7enrollmentdatabase.swsworkreview order by Studentid asc;", SearchMe) ElseIf SearchBox.Text = "Candidates_For_Graduation" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 4 and term = 2 order by Student_Id asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Graduated_Students" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'YES' order by Student_Id asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount ElseIf SearchBox.Text = "Birthdays" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Birth_Date as 'Birthday' from gmcn7enrollmentdatabase.efstudentinfo order by Birth_Date asc;", SearchMe)

GroupBox1.Hide() TextBox1.Text = SearchMe.RowCount

End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub StudentName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S.TextChanged Try If S.Text = Nothing Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Student_ID" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where Student_ID like '%" & S.Text & "%' or Last_Name like '%" & S.Text & "%' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Last_Name" Then

Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name ,major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Last_Name asc;", SearchMe) ElseIf SearchBox.Text = "First_Name" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name ,Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where First_Name like '%" & S.Text & "%' order by First_Name asc;", SearchMe) ElseIf SearchBox.Text = "Year_Level" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Year_Level asc;", SearchMe) ElseIf SearchBox.Text = "Course" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Major asc;", SearchMe) ElseIf SearchBox.Text = "Date_Enrolled" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Date_Enrolled from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Date_Enrolled asc;", SearchMe) ElseIf SearchBox.Text = "Number_Of_Enrollee" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level,School_Year, Number_Of_Enrollee from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Number_Of_Enrollee asc;", SearchMe) ElseIf SearchBox.Text = "School_Year" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_level, School_Year from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by School_Year asc;", SearchMe) ElseIf SearchBox.Text = "Active" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Enrolled' and Last_Name like '%" & S.Text & "%' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Inactive" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isEnrolled = 'Not Enrolled' and Last_Name like '%" & S.Text & "%' order by Student_ID asc;", SearchMe) ElseIf SearchBox.Text = "Regular_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' and Last_Name like '%" & S.Text & "%' rder by Student_ID asc;", SearchMe)

ElseIf SearchBox.Text = "New_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' and Last_Name like '%" & S.Text & "%' order by Student_ID asc;", SearchMe)

ElseIf SearchBox.Text = "Number_of_Units_Passed" Then Populate("Select StudentID, Last_Name, Major, Year_Level, Passed as 'Units Passed' from gmcn7enrollmentdatabase.efstudentjournal where Last_Name like '%" & S.Text & "%' order by StudentID asc;", SearchMe)

ElseIf SearchBox.Text = "Number_of_Units_Failed" Then Populate("Select StudentID, Last_Name, Major, Year_Level, Failed as 'Units Failed' from gmcn7enrollmentdatabase.efstudentjournal where Last_Name like '%" & S.Text & "%' order by StudentID asc;", SearchMe)

ElseIf SearchBox.Text = "Total_Units" Then Populate("Select StudentID, Last_Name, Major, Year_Level, TotalUnits from gmcn7enrollmentdatabase.efstudentjournal where Last_Name like '%" & S.Text & "%' order by StudentID asc;", SearchMe)

ElseIf SearchBox.Text = "Gender" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Gender from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Gender asc;", SearchMe)

ElseIf SearchBox.Text = "Civil_Status" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Civil_Status from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Civil_Status asc;", SearchMe)

ElseIf SearchBox.Text = "Financial_Payment" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, Financial_Payment from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by Financial_Payment asc;", SearchMe) ElseIf SearchBox.Text = "Sems_Studied" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level, SemsStudied as 'Sems Studied' from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & S.Text & "%' order by SemsStudied asc;", SearchMe)

ElseIf SearchBox.Text = "First_Year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 1 where Last_Name like '%" & S.Text & "%' order by Student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Second_year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 2 where Last_Name like '%" & S.Text & "%' order by Student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Third_year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 3 where Last_Name like '%" & S.Text & "%' order by Student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Fourth_year" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 4 where Last_Name like '%" & S.Text & "%' order by Student_Id asc;", SearchMe) ElseIf SearchBox.Text = "Student_Notes" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Notes, Date_Noted from gmcn7enrollmentdatabase.efnotes inner join gmcn7enrollmentdatabase.efstudentInfo on efnotes.studentID = efstudentinfo.student_ID where last_Name like '%" & S.Text & "%';", SearchMe)

ElseIf SearchBox.Text = "Students_With_Sponsor" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Nam,Year_Level, Sponsors_Name,Sponsors_Email as 'Email', Sponsors_address as 'Address', Sponsors_TelPhone as 'Telephone #' ,Sponsors_cell as ' Cell #' from gmcn7enrollmentdatabase.efsponsor inner join gmcn7enrollmentdatabase.efstudentInfo on efsponsor.studentID = efstudentinfo.student_ID where last_Name like '%" & S.Text & "%' order by student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Scholar" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Major,Year_Level from gmcn7enrollmentdatabase.efcheckboxchecker inner join gmcn7enrollmentdatabase.efstudentInfo on efcheckboxchecker.studentID = efstudentinfo.student_ID where ScholarWorkChk = 'YES' and last_Name like '" & S.Text & "' order by student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Medical_Status" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level,Recent_Illness, Allergies, Handicaps, Taking_Medications, Pls_Specify from gmcn7enrollmentdatabase.efmedical inner join gmcn7enrollmentdatabase.efstudentInfo on efmedical.studentID = efstudentinfo.student_ID where last_Name like '%" & S.Text & "%' order by student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Sunday_Worship_Report" Then

Populate("Select StudentID, Name, Year_Level, Month_Of as 'Month', Year_Of, Week1,Week2,Week3,Week4 from gmcn7enrollmentdatabase.sinfoswr where last_Name like '" & S.Text & "' or first_Name like '" & S.Text & "' order by Studentid asc;", SearchMe) ElseIf SearchBox.Text = "Work_Review" Then

Populate("Select Student_ID, Name, Review1, Review2, Review3, Date_Reviewed, OverAll_rating, Rating from gmcn7enrollmentdatabase.swsworkreview inner join gmcn7enrollmentdatabase.efstudentInfo on swsworkreview.StudentID = efStudentinfo.Student_Id where (last_Name like '%" & S.Text & "%' or first_Name like '%" & S.Text & "%') order by Rating asc;", SearchMe) ElseIf SearchBox.Text = "Candidates_For_Graduation" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Year_Level = 4 and term = 2 and (last_Name '%" & S.Text & "%' or first_Name like '%" & S.Text & "%') order by Student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Graduated_Students" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'YES' and (Last_Name like '%" & S.Text & "%' or first_Name like '%" & S.Text & "%') order by Student_Id asc;", SearchMe)

ElseIf SearchBox.Text = "Birthdays" Then Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Birth_Date as 'Birthday' from gmcn7enrollmentdatabase.efstudentinfo where (last_Name like '%" & S.Text & "%' or first_name like '%" & S.Text & "%') order by Birth_Date asc;", SearchMe)

End If

Catch ex As Exception Exit Sub End Try End Sub

#End Region

Private Sub Probation_and_Grads_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID, concat (First_Name, ' ' , Middle_Name , ' ', Last_Name) as Name, Major, Year_Level from GMCN7EnrollmentDatabase.efstudentinfo order by Student_ID asc;", SearchMe) TextBox1.Text = SearchMe.RowCount End Sub

Private Sub D_CellMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles SearchMe.CellMouseDoubleClick Try

Dim Ext As MsgBoxResult Ext = MsgBox("View this Student's Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

SF.SearchBox.Text = "First_Name" SF.StudentName.Text = SearchMe.Item(1, SearchMe.CurrentRow.Index).Value

adopt(SF, Magulang) Me.Close()

End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close() Magulang.GroupBox1.BringToFront() End Sub

Private Sub SearchMe_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles SearchMe.CellContentClick Try Dim picssss = MySelectSpecific("Select PicturePath from gmcn7enrollmentdatabase.efpictures where StudentID = '" & SearchMe.Item(0, SearchMe.CurrentRow.Index).Value & "';")

If picssss = "NA" Then PicsKo.Image = Image.FromFile("D:\ICCMStudentPictures\Pics\Guy.png") Else PicsKo.Image = Image.FromFile(picssss)

End If Catch ex As Exception Exit Sub End Try End Sub

Private Sub SearchMe_CellMouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles SearchMe.CellMouseClick Try Dim picssss = MySelectSpecific("Select PicturePath from gmcn7enrollmentdatabase.efpictures where StudentID = '" & SearchMe.Item(0, SearchMe.CurrentRow.Index).Value & "';")

If picssss = "NA" Then PicsKo.Image = Image.FromFile("D:\ICCMStudentPictures\Pics\Guy.png") Else PicsKo.Image = Image.FromFile(picssss)

End If Catch ex As Exception Exit Sub End Try

End Sub
End Class

ACADEMIC PERFORMANCE FORM

Imports System.Drawing

Public Class Academic_Performance

Dim com1, com2, com3, com4 As Integer Dim OC, CCardReceived, OSCreditedAccept, OTRReceived As String ' Outsidecredits

Private Sub Academic_Performance_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed ' Magulang.GroupBox1.Visible = False Magulang.WrkF.Text = Magulang.WrkF.Text - 1 End Sub

Private Sub Academic_Performance_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID, concat (Last_Name, ', ' ,First_name, ' ', Middle_Name) as Name, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo ;", DGV)

Dim datenow datenow = Format(Now, "yyyy-MM-dd") DateNowpo.Text = datenow

G1.Enabled = False G2.Enabled = False G3.Enabled = False G4.Enabled = False G5.Enabled = False G6.Enabled = False

PossibleGrad.Enabled = False OCGrpB.Enabled = False GroupBox20.Enabled = False GroupBox16.Enabled = False GroupBox18.Enabled = False GroupBox19.Enabled = False GroupBox21.Enabled = False GroupBox22.Enabled = False GroupBox17.Enabled = False GroupBox23.Enabled = False GroupBox24.Enabled = False GroupBox25.Enabled = False GroupBox29.Enabled = False GroupBox27.Enabled = False GroupBox28.Enabled = False GroupBox6.Enabled = False AcademicNote.Enabled = False

Me.BringToFront()

End Sub

#Region "DGV's"

Private Sub SearchStudent_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchStudent.TextChanged If SearchStudent.Text = Nothing Then Populate("Select Student_ID, concat (Last_Name, ', ' ,First_name, ' ', Middle_Name) as Name, Year_Level from GMCN7EnrollmentDatabase.EFstudentinfo order by student_Id asc ;", DGV)

Else

Populate("Select Student_ID, concat (Last_Name, ', ' ,First_name, ' ', Middle_Name) as Name, year_level from GMCN7EnrollmentDatabase.EFstudentinfo where Last_Name like '" & SearchStudent.Text & "%' order by Student_ID;", DGV)

End If End Sub

Private Sub DGV_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV.CellDoubleClick

Dim Ext As MsgBoxResult Ext = MsgBox("Select Student " & DGV.Item(1, DGV.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

StudentID.Text = DGV.Item(0, DGV.CurrentRow.Index).Value Populate("Select Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo where Student_ID = '" & StudentID.Text & "';", DG) DGV.Visible = False Label50.Visible = False SearchStudent.Visible = False Label57.Visible = True StudentID.Visible = True Me.Text = "Academic Performance Review of " & DGV.Item(1, 0).Value Me.Refresh() SearchStudent.Text = "c" End If End Sub
#End Region

#Region "KEY RESTRICTION"

Private Sub DateNowpo_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles DateNowpo.KeyPress, RichTextBox1.KeyPress, RichTextBox2.KeyPress, StudentID.KeyPress e.Handled = True

End Sub

Private Sub OCNoUnitsCompleteICCM_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles OCNoUnitsCompleteICCM.KeyPress, OCTransferCreditCompleted.KeyPress, OCNoSemCompletedOS.KeyPress, OCNounitsCreditedOS.KeyPress, PosUnitsCompleted1.KeyPress, PosUnitsCompleted2.KeyPress, PosUnitsCompleted3.KeyPress, PosUnitsCompleted4.KeyPress, SemAlreadyCompleted1.KeyPress, SemAlreadyCompleted2.KeyPress, SemAlreadyCompleted3.KeyPress, SemAlreadyCompleted4.KeyPress Dim allowedChars As String = "1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub Private Sub AROverAllGPAtoDate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim allowedChars As String = "1234567890." 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub
#End Region

#Region "CONSTRAINTS"

Private Sub StudentID_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentID.TextChanged If Not StudentID.Text = Nothing Then SearchStudent.Enabled = False

PossibleGrad.Enabled = True AcaRecICCM.Enabled = True OCGrpB.Enabled = True GroupBox20.Enabled = True GroupBox16.Enabled = True GroupBox18.Enabled = True GroupBox19.Enabled = True GroupBox21.Enabled = True GroupBox22.Enabled = True GroupBox17.Enabled = True GroupBox23.Enabled = True GroupBox24.Enabled = True GroupBox25.Enabled = True GroupBox29.Enabled = True GroupBox27.Enabled = True GroupBox28.Enabled = True GroupBox6.Enabled = True AcademicNote.Enabled = True End If

End Sub

Private Sub GraduateYes1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduateYes1.CheckedChanged

If GraduateYes1.Checked = True Then

GraduateYes2.Enabled = False GraduateYes3.Enabled = False GraduateYes4.Enabled = False Else GraduateYes2.Enabled = True GraduateYes3.Enabled = True GraduateYes4.Enabled = True End If

End Sub

Private Sub GraduateYes2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduateYes2.CheckedChanged If GraduateYes2.Checked = True Then

GraduateYes1.Enabled = False GraduateYes3.Enabled = False GraduateYes4.Enabled = False Else GraduateYes1.Enabled = True GraduateYes3.Enabled = True GraduateYes4.Enabled = True End If

End Sub

Private Sub GraduateYes3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduateYes3.CheckedChanged

If GraduateYes3.Checked = True Then

GraduateYes2.Enabled = False GraduateYes1.Enabled = False GraduateYes4.Enabled = False Else GraduateYes2.Enabled = True GraduateYes1.Enabled = True GraduateYes4.Enabled = True End If End Sub

Private Sub GraduateYes4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GraduateYes4.CheckedChanged If GraduateYes4.Checked = True Then

GraduateYes1.Enabled = False GraduateYes2.Enabled = False GraduateYes3.Enabled = False Else GraduateYes1.Enabled = True GraduateYes2.Enabled = True GraduateYes3.Enabled = True End If End Sub

' OS CREDIT

Private Sub OSCreditYES_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OSCreditYES.CheckedChanged If OSCreditYES.Checked = True Then G1.Enabled = True G2.Enabled = True G3.Enabled = True G4.Enabled = True G5.Enabled = True G6.Enabled = True OCNoUnitsCompleteICCM.Text = "0" OCNoSemCompletedOS.Text = "0" OCTransferCreditCompleted.Text = "0" OCNounitsCreditedOS.Text = "0" Else G1.Enabled = False G2.Enabled = False G3.Enabled = False G4.Enabled = False G5.Enabled = False G6.Enabled = False OCNoUnitsCompleteICCM.Text = "" OCNoSemCompletedOS.Text = "" OCTransferCreditCompleted.Text = "" OCNounitsCreditedOS.Text = "" End If End Sub
#End Region

#Region "SUBMIT"

Private Sub SubmitAcademicPerformance_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitAcademicPerformance.Click, Button4.Click Try Dim x As New Academic_Performance SearchStudent.Text = " " If StudentID.Text = Nothing Then MsgBox("SELECT STUDENT TO EVALUATE", MsgBoxStyle.Information) Exit Sub End If

Dim textBoxes = AcaRecICCM.Controls.OfType(Of TextBox)() For Each t In textBoxes If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at Academic Records ", MsgBoxStyle.Information) Exit Sub Exit For End If Next t

Dim textBoxes2 = PossibleGrad.Controls.OfType(Of TextBox)() For Each t In textBoxes2 If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at Possible Graduation ", MsgBoxStyle.Information) Exit Sub Exit For End If Next t

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim sid As String ' StudentID sid = StudentID.Text

' OUTSIDE CREDITS

Dim Grad1, Grad2, grad3, grad4 As String

If GraduateYes1.Checked = True Then Grad1 = "YES"

Else Grad1 = "NO" End If

If GraduateYes2.Checked = True Then Grad2 = "YES" Else Grad2 = "NO" End If

If GraduateYes3.Checked = True Then grad3 = "YES" Else grad3 = "NO" End If

If GraduateYes4.Checked = True Then grad4 = "YES" Else grad4 = "NO" End If

If OSCreditYES.Checked = True Then OC = "YES" Dim textBoxes1 = OCGrpB.Controls.OfType(Of TextBox)() For Each t In textBoxes1 If String.IsNullOrEmpty(t.Text) Then MsgBox(" MISSING FIELD(S) at OUTSIDE CREDITS ", MsgBoxStyle.Information) Exit Sub Exit For End If Next t If OCOTRReceivedYES.Checked = True Then OTRReceived = "YES" Else OTRReceived = "NO" End If

If OCClassCardReceivedYES.Checked = True Then CCardReceived = "YES" Else CCardReceived = "NO" End If

If OScreditAcceptProvisional.Checked = True Then OSCreditedAccept = "PROVISIONAL" Else OSCreditedAccept = "FINAL" End If

nonQuery("insert into GMCN7EnrollmentDatabase.sinfoapoutsidecredits values ('" & sid & "','" & OC & "','" & OTRReceived & "','" & CCardReceived & _ "'," & OCNoUnitsCompleteICCM.Text & "," & OCTransferCreditCompleted.Text & "," & OCNoSemCompletedOS.Text & "," & OCNounitsCreditedOS.Text & ",'" & OSCreditedAccept & "'," & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");")

End If OC = "NO"

nonQuery("insert into GMCN7EnrollmentDatabase.sinfoapoutsidecredits values ('" & sid & "','" & OC & "','NO', 'NO',0 , 0 , 0 , 0 ,'N/A'," & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");")

' ACADEMIC RECORDS If AcademicNote.Text = Nothing Then nonQuery("insert into GMCN7EnrollmentDatabase.sinfoapacademicrecords values ('" & sid & "'," & ARNoUnitsCreditedOS.Text & "," & ARNosemsCompletedOS.Text & "," & ARNoSemsAlreadyCompletedICCM.Text & _ "," & ARNoSemsStudiedSofar.Text & "," & ARNoUnitsEarnedAtICCMtoDate.Text & "," & ARTotalNoUnitsToDate.Text & "," & ARNoUnitsWoAGrade.Text & "," & AROverAllGPAtoDate.Text & "," & ARGPAlastSem.Text & "," & ARNoOfUnitsFailedLastSem.Text & ",' N/A '," & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");") Else nonQuery("insert into GMCN7EnrollmentDatabase.sinfoapacademicrecords values ('" & sid & "'," & ARNoUnitsCreditedOS.Text & "," & ARNosemsCompletedOS.Text & "," & ARNoSemsAlreadyCompletedICCM.Text & _ "," & ARNoSemsStudiedSofar.Text & "," & ARNoUnitsEarnedAtICCMtoDate.Text & "," & ARTotalNoUnitsToDate.Text & "," & ARNoUnitsWoAGrade.Text & "," & AROverAllGPAtoDate.Text & "," & ARGPAlastSem.Text & "," & ARNoOfUnitsFailedLastSem.Text & ",'" & AcademicNote.Text & "'," & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");") End If

' POSSIBLE GRADUATION nonQuery("Insert into GMCN7EnrollmentDatabase.sinfoappossiblegraduation1 values ('" & sid & "','" & Grad1 & "','" & Date1.Text & "'," & PosUnitsCompleted1.Text & "," & SemAlreadyCompleted1.Text & ",'" _ & Grad2 & "','" & Date2.Text & "'," & PosUnitsCompleted2.Text & "," & SemAlreadyCompleted2.Text & ",'" _ & grad3 & "','" & Date3.Text & "'," & PosUnitsCompleted3.Text & "," & SemAlreadyCompleted3.Text & ",'" _ & grad4 & "','" & Date4.Text & "'," & PosUnitsCompleted4.Text & "," & SemAlreadyCompleted4.Text & "," _ & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");")

' MINOR SUBJECTS

Dim com1, com2, com3, com4, eng1, eng2, eng3, lt1, lt2 As String Dim min1, min2, min3, min4, evan1, evan2, evan3, evan4, Gmin1, Gmin2, Gmin3, Gmin4 As String

If Comprehension1.Checked = True Then com1 = "PASSED"

Else com1 = "NO" End If

If Comprehension2.Checked = True Then com2 = "PASSED"

Else com2 = "NO" End If

If Comprehension3.Checked = True Then com3 = "PASSED"

Else com3 = "NO" End If If Comprehension4.Checked = True Then com4 = "PASSED"

Else com4 = "NO" End If

If English1.Checked = True Then eng1 = "PASSED"

Else eng1 = "NO" End If

If English2.Checked = True Then eng2 = "PASSED"

Else eng2 = "NO" End If

If English3.Checked = True Then eng3 = "PASSED"

Else eng3 = "NO" End If

If Lit1.Checked = True Then lt1 = "PASSED"

Else lt1 = "NO" End If

If Lit2.Checked = True Then lt2 = "PASSED"

Else lt2 = "NO" End If

If StudentMinistry1.Checked = True Then min1 = "PASSED"

Else min1 = "NO" End If

If StudentMinistry2.Checked = True Then min2 = "PASSED"

Else min2 = "NO" End If

If StudentMinistry3.Checked = True Then min3 = "PASSED"

Else min3 = "NO" End If

If StudentMinistry4.Checked = True Then min4 = "PASSED"

Else min4 = "NO" End If

If PracEvangelism1.Checked = True Then evan1 = "PASSED"

Else evan1 = "NO" End If

If PracEvangelism2.Checked = True Then evan2 = "PASSED"

Else evan2 = "NO" End If

If PracEvangelism3.Checked = True Then evan3 = "PASSED"

Else evan3 = "NO" End If

If PracEvangelism4.Checked = True Then evan4 = "PASSED"

Else evan4 = "NO" End If

If Ministry1.Checked = True Then Gmin1 = "PASSED"

Else Gmin1 = "NO" End If

If Ministry2.Checked = True Then Gmin2 = "PASSED"

Else Gmin2 = "NO" End If

If Ministry3.Checked = True Then Gmin3 = "PASSED"

Else Gmin3 = "NO" End If

If Ministry4.Checked = True Then Gmin4 = "PASSED" Else Gmin4 = "NO" End If

' MAJOR

Dim g1, g2, g3, g4, pk1, pk2, k1, k2, k3, k4, m1, m2, m3, m4 As String

If Greek1.Checked = True Then g1 = "PASSED" Else g1 = "NO" End If

If Greek2.Checked = True Then g2 = "PASSED" Else g2 = "NO" End If

If Greek3.Checked = True Then g3 = "PASSED" Else g3 = "NO" End If

If Greek4.Checked = True Then g4 = "PASSED" Else g4 = "NO" End If

If PrepKey1.Checked = True Then pk1 = "PASSED" Else pk1 = "NO" End If

If PrepKey2.Checked = True Then pk2 = "PASSED" Else pk2 = "NO" End If

If Key1.Checked = True Then k1 = "PASSED" Else k1 = "NO" End If

If Key2.Checked = True Then k2 = "PASSED" Else k2 = "NO" End If If Key3.Checked = True Then k3 = "PASSED" Else k3 = "NO" End If

If Key4.Checked = True Then k4 = "PASSED" Else k4 = "NO" End If

If Music1.Checked = True Then m1 = "PASSED" Else m1 = "NO" End If

If Music2.Checked = True Then m2 = "PASSED" Else m2 = "NO" End If

If Music3.Checked = True Then m3 = "PASSED" Else m3 = "NO" End If

If Music4.Checked = True Then m4 = "PASSED" Else m4 = "NO" End If

Dim methods, Ed1, Ed2, CD, MnE, LDev, STeach As String

If Metho.Checked = True Then methods = "PASSED" Else methods = "NO" End If

If EdFound1.Checked = True Then Ed1 = "PASSED" Else Ed1 = "NO" End If

If EdFound2.Checked = True Then Ed2 = "PASSED" Else Ed2 = "NO" End If

If CurriculumD.Checked = True Then CD = "PASSED" Else CD = "NO" End If

If MandE.Checked = True Then MnE = "PASSED" Else MnE = "NO" End If

If LearnDev.Checked = True Then LDev = "PASSED" Else LDev = "NO" End If

If StTeach.Checked = True Then STeach = "Passed" Else STeach = "NO" End If

nonQuery("Insert into GMCN7EnrollmentDatabase.sinfoapsubjects values('" & sid & "','" & com1 & "','" & com2 & "','" & com3 & "','" & com4 & "','" & eng1 & "','" & eng2 & "','" & eng3 & "','" & lt1 & "','" & lt2 & _ "','" & min1 & "','" & min2 & "','" & min3 & "','" & min4 & "','" & evan1 & "','" & evan2 & "','" & evan3 & "','" & evan4 & "','" & Gmin1 & "','" & Gmin2 & "','" & Gmin3 & "','" & Gmin4 & _ "','" & g1 & "','" & g2 & "','" & g3 & "','" & g4 & "','" & pk1 & "','" & pk2 & "','" & k1 & "','" & k2 & "','" & k3 & "','" & k4 & "','" & m1 & "','" & m2 & "','" & m3 & "','" & m4 & _ "','" & methods & "','" & Ed1 & "','" & Ed2 & "','" & CD & "','" & MnE & "','" & LDev & "','" & STeach & "'," & DG.Item(0, 0).Value & "," & DG.Item(1, 0).Value & ");")

nonQuery("Update GMCN7EnrollmentDatabase.efcheckboxchecker set AcaPerChk = 'YES' where Studentid = '" & sid & "';")

MsgBox("INFORMATION SUCCESSFULLY SUBMITTED", MsgBoxStyle.Information) SearchStudent.Text = "" DGV.Visible = True Label50.Visible = True SearchStudent.Visible = True Label57.Visible = False StudentID.Visible = False SearchStudent.Enabled = True End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

#End Region

Private Sub PrintBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintBtn.Click, Button3.Click Me.PrintForm1.PrintAction = Printing.PrintAction.PrintToFile

Me.PrintBtn.Hide() Try Me.PrintForm1.Print()

Catch ex As Exception MsgBox("No printer detected" & ex.ToString)

End Try Me.PrintBtn.Show() End Sub

Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click, Button1.Click Me.Close() Magulang.GroupBox1.BringToFront() Magulang.Acaf.Text = Magulang.Acaf.Text - 1 End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim Ext As MsgBoxResult Ext = MsgBox("Evaluate another student?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Close() Dim x As New Academic_Performance

adopt(x, Magulang) End If

End Sub

End Class

WORK REVIEW FORM

Imports System.Drawing

Public Class Work_Review

Dim VP, P, S, VS, O As String

Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click Me.Close() Magulang.GroupBox1.Visible = True Magulang.WrkF.Text = Magulang.WrkF.Text - 1 End Sub

Private Sub Work_Review_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed ' Magulang.GroupBox1.Visible = False Magulang.WrkF.Text = Magulang.WrkF.Text - 1 End Sub

Private Sub Work_Review_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim datenow datenow = Format(Now, "yyyy-MM-dd") DateNowpo.Text = datenow

GroupBox1.Enabled = False GroupBox5.Enabled = False OverallRating.Enabled = False Populate("Select Student_ID,concat (Last_Name, ' , ' , First_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo order by Student_ID asc ;", DGV) Me.BringToFront() End Sub

#Region "RESTRICTIONS / VERIFICATIONS"

Private Sub OverallRating_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles OverallRating.KeyPress Dim allowedChars As String = "1234567890." If (OverallRating.Text.IndexOf(".") >= 0 And e.KeyChar = ".") Then e.Handled = True End If

If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub SName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SName.TextChanged If SName.Text = Nothing Then Populate("Select Student_ID,concat (Last_Name, ' , ' , First_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo order by Student_ID asc ;", DGV)

Else Populate("Select Student_ID,concat( Last_Name, ' , ' ,First_Name) as Name, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo where Last_Name like '" & SName.Text & "%' order by Student_ID asc ;", DGV)

End If End Sub

Private Sub DGV_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV.CellDoubleClick

Dim Ext As MsgBoxResult Ext = MsgBox("Select Student " & DGV.Item(1, DGV.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Button1.Hide() ' Dim value As Object = DGV.Rows(e.RowIndex).Cells(e.ColumnIndex).Value StudentID.Text = DGV.Item(0, DGV.CurrentRow.Index).Value

GroupBox1.Enabled = True GroupBox5.Enabled = True OverallRating.Enabled = True Me.Text = "Work Review of " & DGV.Item(1, 0).Value Me.Refresh() DGV.Visible = False Label4.Visible = False SName.Visible = False Label5.Visible = True StudentID.Visible = True End If 'PicsKo.Image = End Sub

Private Sub StudentID_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentID.TextChanged If Not StudentID.Text = Nothing Then SName.Enabled = False End If End Sub

Private Sub ComboBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress, C1.KeyPress, C2.KeyPress, C3.KeyPress, StudentID.KeyPress, DateNowpo.KeyPress, DateTimePicker1.KeyPress e.Handled = True

End Sub

#End Region

#Region "CONSTRAINTS"

Private Sub V1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles V1.CheckedChanged If V1.Checked = True Then G2.Enabled = False V2Check1.Checked = False V2Check2.Checked = False V2Check3.Checked = False V2Check4.Checked = False

G3.Enabled = False V3Check1.Checked = False V3Check2.Checked = False

G4.Enabled = False V4Check1.Checked = False

G5.Enabled = False V5Check1.Checked = False V5Check2.Checked = False Else G2.Enabled = True G3.Enabled = True G4.Enabled = True G5.Enabled = True End If End Sub

Private Sub V2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles V2.CheckedChanged If V2.Checked = True Then G1.Enabled = False V1Check1.Checked = False V1Check2.Checked = False

G3.Enabled = False V3Check1.Checked = False V3Check2.Checked = False

G4.Enabled = False V4Check1.Checked = False

G5.Enabled = False V5Check1.Checked = False V5Check2.Checked = False Else G1.Enabled = True G3.Enabled = True G4.Enabled = True G5.Enabled = True End If End Sub

Private Sub V3_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles V3.CheckedChanged If V3.Checked = True Then G1.Enabled = False V1Check1.Checked = False V1Check2.Checked = False

G2.Enabled = False V2Check1.Checked = False V2Check2.Checked = False V2Check3.Checked = False V2Check4.Checked = False

G4.Enabled = False V4Check1.Checked = False

G5.Enabled = False V5Check1.Checked = False V5Check2.Checked = False Else G1.Enabled = True G2.Enabled = True G4.Enabled = True G5.Enabled = True End If End Sub

Private Sub V4_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles V4.CheckedChanged If V4.Checked = True Then G1.Enabled = False V1Check1.Checked = False V1Check2.Checked = False

G2.Enabled = False V2Check1.Checked = False V2Check2.Checked = False V2Check3.Checked = False V2Check4.Checked = False

G3.Enabled = False V3Check1.Checked = False V3Check2.Checked = False

G5.Enabled = False V5Check1.Checked = False V5Check2.Checked = False Else G1.Enabled = True G2.Enabled = True G3.Enabled = True G5.Enabled = True End If End Sub

Private Sub V5_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles V5.CheckedChanged If V5.Checked = True Then

G1.Enabled = False V1Check1.Checked = False V1Check2.Checked = False

G2.Enabled = False V2Check1.Checked = False V2Check2.Checked = False V2Check3.Checked = False V2Check4.Checked = False

G3.Enabled = False V3Check1.Checked = False V3Check2.Checked = False

G4.Enabled = False V4Check1.Checked = False Else G1.Enabled = True G2.Enabled = True G3.Enabled = True G4.Enabled = True End If End Sub

#End Region

#Region "SUBMIT"

Private Sub SubmitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitBtn.Click Try

If StudentID.Text = Nothing Then MsgBox("SPECIFY WHICH STUDENT TO EVALUATE", MsgBoxStyle.Information) Exit Sub End If

If OverallRating.Text = Nothing Then MsgBox("COMPLETE NEEDED FIELDS", MsgBoxStyle.Information) Exit Sub End If

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim sid As String sid = StudentID.Text

Dim VP1, VP2, P1, P2, P3, P4, S1, S2, VS1, O1, O2 As String

If V1Check1.Checked = True Then VP1 = "YES"

Else VP1 = "NO" End If

If V1Check2.Checked = True Then VP2 = "YES" Else VP2 = "NO" End If

If V2Check1.Checked = True Then P1 = "YES" Else P1 = "NO" End If

If V2Check2.Checked = True Then P2 = "YES" Else P2 = "NO" End If

If V2Check3.Checked = True Then P3 = "YES" Else P3 = "NO" End If

If V2Check4.Checked = True Then P4 = "YES" Else P4 = "NO" End If

If V3Check1.Checked - True Then S1 = "YES" Else S1 = "NO" End If

If V3Check2.Checked = True Then S2 = "YES" Else S2 = "NO" End If

If V4Check1.Checked = True Then VS1 = "YES" Else VS1 = "NO" End If

If V5Check1.Checked = True Then O1 = "YES" Else O1 = "NO" End If

If V5Check2.Checked = True Then O2 = "YES" Else O2 = "NO" End If

If V1.Checked = True Then Dim d1 As String d1 = "YES" VP = "Very Poor" nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreviewverypoor values ('" & sid & "','" & VP & "','" & VP1 & "','" & VP2 & "','" & DateNowpo.Text & "');")

nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreview values ('" & sid & "','" & DGV.Item(1, DGV.CurrentRow.Index).Value & "','March " & _ DateTimePicker1.Text & "'," & C1.Text & ",'October " & TextBox1.Text & "'," & C2.Text & ",'March " & TextBox2.Text & "'," & C3.Text & ",'" & DateNowpo.Text & "'," & OverallRating.Text & ",'" & VP & "'," & DGV.Item(2, 0).Value & "," & DGV.Item(3, 0).Value & ");")

End If

If V2.Checked = True Then Dim d2 As String d2 = "YES" P = "Poor" nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreviewpoor values ('" & sid & "','" & P & "','" & P1 & "','" & P2 & "','" & P3 & "','" & P4 & "','" & DateNowpo.Text & "');")

nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreview values ('" & sid & "','" & DGV.Item(1, DGV.CurrentRow.Index).Value & "','March " & _ DateTimePicker1.Text & "'," & C1.Text & ",'October " & TextBox1.Text & "'," & C2.Text & ",'March " & TextBox2.Text & "'," & C3.Text & ",'" & DateNowpo.Text & "'," & OverallRating.Text & ",'" & P & "'," & DGV.Item(2, 0).Value & "," & DGV.Item(3, 0).Value & ");")

End If

If V3.Checked = True Then Dim d3 As String d3 = "YES" S = "Satisfactory" nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreviewsatisfactory values ('" & sid & "','" & S & "','" & S1 & "','" & S2 & "','" & DateNowpo.Text & "');")

nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreview values ('" & sid & "','" & DGV.Item(1, 0).Value & "','March " & _ DateTimePicker1.Text & "'," & C1.Text & ",'October " & TextBox1.Text & "'," & C2.Text & ",'March " & TextBox2.Text & "'," & C3.Text & ",'" & DateNowpo.Text & "'," & OverallRating.Text & ",'" & S & "'," & DGV.Item(2, 0).Value & "," & DGV.Item(3, 0).Value & ");")

End If If V4.Checked = True Then Dim d4 As String d4 = "YES" VS = "Very Satisfactory" nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreviewverysatisfactory values ('" & sid & "','" & VS & "','" & VS1 & "','" & DateNowpo.Text & "');")

nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreview values ('" & sid & "','" & _ DGV.Item(1, 0).Value & "','" & _ Label2.Text + " " + DateTimePicker1.Text & "'," & C1.Text & ",'" & _ Label3.Text + " " + TextBox1.Text & "'," & C2.Text & ",'" & _ Label6.Text + " " + TextBox2.Text & "'," & C3.Text & ",'" & _ DateNowpo.Text & "'," & _ OverallRating.Text & ",'" & _ VS & "'," & _ DGV.Item(2, 0).Value & "," & DGV.Item(3, 0).Value & ");")

End If If V5.Checked = True Then Dim d5 As String d5 = "YES" O = "Outstanding" nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreviewoutstanding values ('" & sid & "','" & O & "','" & O1 & "','" & O2 & "','" & DateNowpo.Text & "');")

nonQuery("insert into GMCN7EnrollmentDatabase.swsworkreview values ('" & sid & "','" & DGV.Item(1, DGV.CurrentRow.Index).Value & "','March " & _ DateTimePicker1.Text & "'," & C1.Text & ",'October " & TextBox1.Text & "'," & C2.Text & ",'March " & TextBox2.Text & "'," & C3.Text & ",'" & DateNowpo.Text & "'," & OverallRating.Text & ",'" & O & "'," & DGV.Item(2, 0).Value & "," & DGV.Item(3, 0).Value & ");")

End If

nonQuery("Update GMCN7EnrollmentDatabase.efcheckboxchecker set WRevChk = 'YES' where Studentid = '" & sid & "';")

MsgBox("INFORMATION SUCCESSFULLY SUBMITTED!", MsgBoxStyle.Information) Button1.Show() DGV.Visible = True Label4.Visible = True SName.Visible = True Label5.Visible = False StudentID.Visible = False

End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

Private Sub PrintBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintBtn.Click Me.PrintForm1.PrintAction = Printing.PrintAction.PrintToFile

Me.PrintBtn.Hide() Try Me.PrintForm1.Print()

Catch ex As Exception MsgBox("No printer detected" & ex.ToString)

End Try Me.PrintBtn.Show() End Sub

Private Sub DateTimePicker1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DateTimePicker1.SelectedIndexChanged Dim a1 As Integer a1 = CDbl(DateTimePicker1.Text)

TextBox1.Text = a1 TextBox2.Text = a1 + 1

End Sub

Private Sub DateTimePicker1_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DateTimePicker1.SelectedValueChanged Try Dim y As Integer y = Format(Now, "yyyy")

If DateTimePicker1.Text > y Then DateTimePicker1.Text = Format(Now, "yyyy") Exit Sub End If

Catch ex As Exception Exit Sub End Try End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x As New Work_Review Me.Close adopt(x, Magulang) End Sub

End Class

SUNDAY WORSHIP REPORT FORM

Imports System.Drawing

Public Class SWR Dim year

Private Sub SWR_Disposed(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Disposed ' Magulang.GroupBox1.Visible = False Me.Close() Magulang.SWRF.Text = Magulang.SWRF.Text - 1 End Sub Private Sub SWR_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID, concat(First_Name , ' ' , Middle_Name , ' ', Last_Name)as Name , Major, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo inner join gmcn7enrollmentdatabase.efcheckboxchecker on efstudentinfo.Student_ID = efcheckboxchecker.studentID where ScholarWorkChk = 'YES' order by Student_ID asc;", DGV)

Dim datenow datenow = Format(Now, "MM") If datenow = 1 Then Month.Text = "January" ElseIf datenow = 2 Then Month.Text = "February" ElseIf datenow = 3 Then Month.Text = "March" ElseIf datenow = 4 Then Month.Text = "April" ElseIf datenow = 5 Then Month.Text = "May" ElseIf datenow = 6 Then Month.Text = "June" ElseIf datenow = 7 Then Month.Text = "July" ElseIf datenow = 8 Then Month.Text = "August" ElseIf datenow = 9 Then Month.Text = "September" ElseIf datenow = 10 Then Month.Text = "October" ElseIf datenow = 11 Then Month.Text = "November" ElseIf datenow = 12 Then Month.Text = "December" End If

GroupBox1.Enabled = False year = Format(Now, "yyyy")

Me.BringToFront()

End Sub

#Region "SELECT "

Private Sub SName_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SName.TextChanged If SName.Text = Nothing Then Populate("Select Student_ID, concat(First_Name , ' ' , Middle_Name , ' ', Last_Name)as Name , Major, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo inner join gmcn7enrollmentdatabase.efcheckboxchecker on efstudentinfo.Student_ID = efcheckboxchecker.studentID where ScholarWorkChk = 'YES' order by Student_ID asc;", DGV)

Else

Populate("Select Student_ID, concat(First_Name , ' ' , Middle_Name , ' ', Last_Name)as Name , Major, Year_Level, Term from GMCN7EnrollmentDatabase.EFstudentinfo inner join gmcn7enrollmentdatabase.efcheckboxchecker on efstudentinfo.Student_ID = efcheckboxchecker.studentID where ScholarWorkChk = 'YES' and (last_name like '%" & SName.Text & "%' or first_name like '%" & SName.Text & "%') order by Student_ID asc;", DGV)

End If End Sub

Private Sub DGV_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGV.CellDoubleClick ' Dim check As String Dim Ext As MsgBoxResult Ext = MsgBox("Select Student " & DGV.Item(1, DGV.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim value As Object = DGV.Rows(e.RowIndex).Cells(e.ColumnIndex).Value

StudentID.Text = DGV.Item(0, DGV.CurrentRow.Index).Value

GroupBox1.Enabled = True

Me.Text = "SWR of " & DGV.Item(1, 0).Value Me.Refresh() DGV.Visible = False SName.Visible = False Label4.Visible = False Label5.Visible = True StudentID.Visible = True End If 'PicsKo.Image = End Sub

Private Sub StudentID_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentID.TextChanged If Not StudentID.Text = Nothing Then SName.Enabled = False End If End Sub
#End Region

#Region "RESTRICTIONS" Private Sub month_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Month.KeyPress, StudentID.KeyPress e.Handled = True

End Sub

#End Region

#Region "SUBMIT"

Private Sub SubmitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SubmitBtn.Click Try

Dim x As New SWR

Dim Ext As MsgBoxResult Ext = MsgBox("Submit Information?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim wk1, wk2, wk3, wk4 As String

If WEEK1.Checked = True Then wk1 = "YES" Else wk1 = "NO" End If

If WEEK2.Checked = True Then wk2 = "YES" Else wk2 = "NO" End If

If WEEK3.Checked = True Then wk3 = "YES" Else wk3 = "NO" End If

If WEEK4.Checked = True Then wk4 = "YES" Else wk4 = "NO" End If

Dim sss, a, c, d As String sss = StudentID.Text

a = MySelectSpecific("Select concat(First_Name , ' ' , Middle_Name , ' ' , Last_Name) as Name from GMCN7Enrollmentdatabase.efstudentinfo where student_ID = '" & sss & "';") c = MySelectSpecific("Select Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where student_ID = '" & sss & "';") d = MySelectSpecific("Select term from GMCN7Enrollmentdatabase.efstudentinfo where student_ID = '" & sss & "';")

nonQuery("insert into GMCN7EnrollmentDatabase.sinfoswr values ('" & sss & "','" & a & "','" & Month.Text & _ "','" & year & "'," & c & "," & d & ",'" & wk1 & "','" & wk2 & "','" & wk3 & "','" & wk4 & "');")

nonQuery("Update GMCN7EnrollmentDatabase.efcheckboxchecker set SWRChk = 'YES' where Studentid = '" & StudentID.Text & "';")

MsgBox("INFORMATION SUCCESSFULLY SUBMITTED", MsgBoxStyle.Information)

DGV.Visible = True SName.Visible = True Label4.Visible = True Label5.Visible = False StudentID.Visible = False End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

Private Sub ExitBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ExitBtn.Click Me.Close() Magulang.GroupBox1.BringToFront() Magulang.SWRF.Text = Magulang.SWRF.Text - 1 End Sub

Private Sub PrintBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles PrintBtn.Click Me.PrintForm1.PrintAction = Printing.PrintAction.PrintToFile

Me.PrintBtn.Hide() Try Me.PrintForm1.Print()

Catch ex As Exception MsgBox("No printer detected" & ex.ToString)

End Try Me.PrintBtn.Show() End Sub

End Class

EDIT SUBJECTS FORM

Public Class SubjectsChange

#Region "RESTRICT" Private Sub Addsubj_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Addsubj.KeyPress, T1.KeyPress Dim allowedChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890#^" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub addprof_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles AddProf.KeyPress, AddTitle.KeyPress, T4.KeyPress Dim allowedChars As String = "1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz(/:;+-&., " 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub addunits_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles AddUnits.KeyPress, T2.KeyPress Dim allowedChars As String = "0123" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub t5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress, T5.KeyPress Dim allowedChars As String = "1234" 'dag dag mo nalang si (.) kung needed sila for decimal)0 If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub
#End Region
#Region "TERM"

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click If Term.Text = Nothing Then Exit Sub ElseIf Term.Text = D.Item(0, 0).Value Then Exit Sub Else Dim Ext As MsgBoxResult Ext = MsgBox("UPDATE TERM?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim Ext2 As MsgBoxResult Ext2 = MsgBox("Doing so will completely change the semestral unit for this sem, are you sure?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext2 = MsgBoxResult.Yes Then nonQuery("Update GMCN7EnrollmentDatabase.useraccounts set Term = " & Term.Text & ";") MsgBox("Semester Updated", MsgBoxStyle.Information) Term.Visible = False Button3.Visible = False Populate("Select Term from GMCN7EnrollmentDatabase.useraccounts ;", D) nonQuery("Update GMCN7EnrollmentDatabase.efstudentinfo set isEnrolled = 'NOT ENROLLED';") nonQuery("Update GMCN7EnrollmentDatabase.useraccounts set EnrolleeNum = 0 ;")

Else Term.Visible = False Button3.Visible = False End If

End If End If End Sub

Private Sub term_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Dim allowedChars As String = "12" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If End Sub

Private Sub CloseBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CloseBtn.Click

CloseBtn.Hide() ShowBtn.Show() Label2.Hide() Button3.Hide() Term.Hide() End Sub

Private Sub Showbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ShowBtn.Click

CloseBtn.Show() ShowBtn.Hide() Label2.Show() Button3.Show() Term.Show() End Sub
#End Region
#Region "UPDATE"

Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click Try

If Addsubj.Text = Nothing Or AddTitle.Text = Nothing Or AddUnits.Text = Nothing Or TextBox2.Text = Nothing Then MsgBox("MISSING FIELD", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim Ext As MsgBoxResult Ext = MsgBox("UPDATE SUBJECT?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Year_Level asc;", DGVAll) nonQuery("update GMCN7EnrollmentDatabase.iccmsubjects set SubjectID = '" & Addsubj.Text & "', DescriptiveTitle = '" & AddTitle.Text & "', SUnits = " & AddUnits.Text & ", Professor_Name = '" & AddProf.Text & "', Course_Department = '" & SubjDept.Text & "', Year_Level = " & TextBox2.Text & " where SubjectID = '" & DGVAll.Item(0, DGVAll.CurrentRow.Index).Value & "';") MsgBox("SUBJECT SUCCESSFULLY UPDATED", MsgBoxStyle.Information) DGVAll.Enabled = True SB.Enabled = True TextBox1.Enabled = True ADD.Enabled = True Updates.Enabled = True Button2.Enabled = True ShowBtn.Enabled = True GroupBox1.Hide()

Addsubj.Text = "" TextBox2.Text = "" AddUnits.Text = "" AddProf.Text = "" AddTitle.Text = "" Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Year_Level asc;", DGVAll)

End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click

DGVAll.Show() SB.Enabled = True TextBox1.Enabled = True ADD.Enabled = True Updates.Enabled = True Button2.Enabled = True ShowBtn.Enabled = True GroupBox1.Hide() Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Year_Level asc;", DGVAll)

End Sub

'UPDATE Private Sub Update_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Updates.Click Try

Dim Ext As MsgBoxResult Ext = MsgBox("UPDATE SELECTED SUBJECT?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

GroupBox1.Show() DGVAll.Enabled = False SB.Enabled = False TextBox1.Enabled = False ADD.Enabled = False Updates.Enabled = False Button2.Enabled = False ShowBtn.Enabled = False

Addsubj.Text = DGVAll.Item(0, DGVAll.CurrentRow.Index).Value ' SUBJECTID AddTitle.Text = DGVAll.Item(1, DGVAll.CurrentRow.Index).Value ' DESCRIPTIVE TITLE AddUnits.Text = DGVAll.Item(2, DGVAll.CurrentRow.Index).Value ' UNITS AddProf.Text = DGVAll.Item(3, DGVAll.CurrentRow.Index).Value ' PROF_NAME TextBox2.Text = DGVAll.Item(5, DGVAll.CurrentRow.Index).Value ' YEAR LEVEL SubjDept.Text = DGVAll.Item(4, DGVAll.CurrentRow.Index).Value ' DEPT

TextBox1.Text = ""

End If

Catch ex As Exception Exit Sub End Try End Sub
#End Region

#Region "ADD"

'ADD Private Sub ADD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ADD.Click Try

Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

GroupBox1.Hide() DGVAll.Hide() SB.Enabled = False TextBox1.Enabled = False ADD.Enabled = False Updates.Enabled = False Button2.Enabled = False ShowBtn.Enabled = False AddGroup.Show()

TextBox1.Text = ""

End If

Catch ex As Exception Exit Sub End Try

End Sub

Private Sub AddBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddBtn.Click

If T1.Text = Nothing Or T2.Text = Nothing Or T4.Text = Nothing Or T5.Text = Nothing Then MsgBox("MISSING FIELD", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then MsgBox("SUBJECT ADDED", MsgBoxStyle.Information) nonQuery("insert into GMCN7EnrollmentDatabase.iccmsubjects values('" & T1.Text & "','" & T4.Text & "'," & T2.Text & ",'" & T3.Text & "','" & T6.Text & "'," & T5.Text & ");")

DGVAll.Show() SB.Enabled = True TextBox1.Enabled = True ADD.Enabled = True Updates.Enabled = True Button2.Enabled = True ShowBtn.Enabled = True GroupBox1.Hide() AddGroup.Hide() T1.Text = "" T2.Text = "" T3.Text = "" T4.Text = "" T5.Text = "" T6.Text = ""

Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Year_Level asc;", DGVAll)

End If

End Sub

Private Sub AddCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddCancel.Click DGVAll.Show() SB.Enabled = True TextBox1.Enabled = True ADD.Enabled = True Updates.Enabled = True Button2.Enabled = True ShowBtn.Enabled = True GroupBox1.Hide() AddGroup.Hide() Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Year_Level asc;", DGVAll)

End Sub

#End Region

' DELETE Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Try

Dim Ext As MsgBoxResult Ext = MsgBox("DELETE THIS SUBJECT?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("delete from GMCN7EnrollmentDatabase.iccmsubjects where SubjectID = '" & DGVAll.Item(0, DGVAll.CurrentRow.Index).Value & "';") DGVAll.Rows.RemoveAt(DGVAll.CurrentRow.Index)

MsgBox("SUBJECT DELETED", MsgBoxStyle.Information)

End If TextBox1.Text = "" Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name from GMCN7EnrollmentDatabase.iccmsubjects;", DGVAll) Catch ex As Exception

Exit Sub End Try End Sub Private Sub SubjectsUpdate_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Me.KeyPress Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name from GMCN7EnrollmentDatabase.iccmsubjects;", DGVAll) End Sub

Private Sub SubjectsUpdate_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select SubjectID, DescriptiveTitle, SUnits , Professor_Name, Course_Department, year_level as 'Year Level' from GMCN7EnrollmentDatabase.iccmsubjects order by Sunits asc;", DGVAll) Populate("Select Term from GMCN7EnrollmentDatabase.useraccounts ;", D)

End Sub

'X Private Sub Back_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Back.Click Dim Ext As MsgBoxResult Ext = MsgBox("Really Exit?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Magulang.LimiterNew.Text = Magulang.LimiterNew.Text - 1

Me.Close()

End If End Sub

'SEARCH Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

If TextBox1.Text = Nothing Then Populate("Select SubjectID, DescriptiveTitle, SUnits as Units , Professor_Name, Course_Department, Year_Level from GMCN7EnrollmentDatabase.iccmsubjects order by SUnits asc;", DGVAll) ElseIf SB.Text = "Professor_Name" Then Populate("Select SubjectID, DescriptiveTitle as Descriptive_Title, SUnits as Units , Professor_Name, Course_Department, Year_Level from GMCN7EnrollmentDatabase.iccmsubjects where Professor_Name like '%" & TextBox1.Text & "%';", DGVAll) ElseIf SB.Text = "Descriptive_Title" Then Populate("Select SubjectID, DescriptiveTitle as Descriptive_Title, SUnits as Units, Professor_Name, Course_Department, Year_Level from GMCN7EnrollmentDatabase.iccmsubjects where DescriptiveTitle like '%" & TextBox1.Text & "%';", DGVAll) ElseIf SB.Text = "SUnits" Then Populate("Select SubjectID, DescriptiveTitle as Descriptive_Title, SUnits as Units, Professor_Name, Course_Department, Year_Level from GMCN7EnrollmentDatabase.iccmsubjects where Sunits = " & TextBox1.Text & ";", DGVAll) ElseIf SB.Text = "Subject_ID" Then Populate("Select SubjectID, DescriptiveTitle as Descriptive_Title, SUnits as Units, Professor_Name, Course_Department, Year_Level from GMCN7EnrollmentDatabase.iccmsubjects where SubjectID like '%" & TextBox1.Text & "%';", DGVAll)

End If End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Button3.Visible = True Term.Visible = True End Sub

Private Sub SB_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SB.KeyPress, Term.KeyPress e.Handled = True End Sub

End Class

ADD SUBJECTS FORM

Public Class SubjectsStudent Dim totalvalue As Integer = 0
#Region "LOAD AND SEARCH"

Private Sub StudentSubjects_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID, concat (Last_name , ' , ' , First_Name , ' ' , Middle_Name) as 'Students Name', Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where HasGrades = 'No';", D) End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If TextBox1.Text = Nothing Then Populate("Select Student_ID, concat (Last_name , ' , ' , First_Name , ' ' , Middle_Name) as 'Students Name',Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where HasGrades = 'NO';", D) Else Populate("Select Student_ID, concat (Last_name , ' , ' , First_Name , ' ' , Middle_Name) as 'Students Name',Major, Year_Level from gmcn7enrollmentdatabase.efstudentinfo where HasGrades = 'NO' and (Last_Name like '%" & TextBox1.Text & "%' or First_Name like '%" & TextBox1.Text & "%' or Middle_Name like '%" & TextBox1.Text & "%') ;", D) End If End Sub
#End Region

#Region "BUTTONS"

Private Sub MySubject_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles D.CellDoubleClick Dim ext As MsgBoxResult ext = MsgBox("Select " & D.Item(1, D.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Students Subjects") If ext = MsgBoxResult.Yes Then

Label2.Visible = True Label3.Visible = True RwCount.Visible = True totalunits.Visible = True D.Hide() MySubject.Show() Populate("Select SubjectID, Descriptive_title, Units from gmcn7enrollmentdatabase.efsubjects where studentid = '" & D.Item(0, 0).Value & "';", MySubject) btnadd.Show() BtnDel.Show() BtnSearch.Show() BtnSave.Show() TextBox1.Hide() TextBox2.Show() S.Text = "Your Subjects" Me.Text = "Subjects of " & D.Item(1, D.CurrentRow.Index).Value Me.Refresh() For Each dgvRow As DataGridViewRow In MySubject.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFDupsubjects values(0 ,'" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");") totalvalue += CInt(dgvRow.Cells(2).Value) '2 means the number of the column

End If Next RwCount.Text = MySubject.RowCount totalunits.Text = totalvalue

End If End Sub

Private Sub BtnSearch_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSearch.Click Dim ext As MsgBoxResult ext = MsgBox("Search New Student ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Students Subjects") If ext = MsgBoxResult.Yes Then Me.Text = "Student Subjects" Me.Refresh()

btnadd.Hide() BtnDel.Hide() BtnSearch.Hide() BtnSave.Hide() MySubject.Hide()

D.Show() S.Text = "Search Student" TextBox1.Visible = True TextBox2.Visible = False Label2.Visible = False totalunits.Visible = False Label3.Visible = False RwCount.Visible = False totalvalue = 0 End If End Sub

Private Sub AddSpecific_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddSpecific.Click Label4.Show() Label5.Show() Label6.Show() TextBox3.Show() TextBox4.Show() TextBox5.Show() AddSpecificSubj.Show() End Sub

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click Populate("Select SubjectID, Descriptivetitle, SUnits as 'Units' from gmcn7enrollmentdatabase.iccmsubjects;", AllSubjects) AllSubjects.Show() AllSubjects.BringToFront() S.Text = "Edit Subjects" TextBox1.Visible = False TextBox2.Visible = True btnadd.Hide() BtnDel.Hide() BtnSearch.Hide() BtnSave.Hide() LeftB.Show()

AddSpecific.Show() End Sub

Private Sub LeftB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeftB.Click MySubject.Show() AllSubjects.Hide() BtnSave.Show() BtnSearch.Show() btnadd.Show() BtnDel.Show() LeftB.Hide()

Label4.Hide() Label5.Hide() Label6.Hide() TextBox3.Hide() TextBox4.Hide() TextBox5.Hide() AddSpecific.Hide() AddSpecificSubj.Hide() End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox2.TextChanged If TextBox2.Text = Nothing Then Populate("Select SubjectID, Descriptivetitle, SUnits as 'Units' from gmcn7enrollmentdatabase.iccmsubjects;", AllSubjects) Else Populate("Select SubjectID, Descriptivetitle, SUnits as 'Units' from gmcn7enrollmentdatabase.iccmsubjects where DescriptiveTitle like '%" & TextBox2.Text & "%' or SubjectID like '%" & TextBox2.Text & "%';", AllSubjects) End If End Sub
#End Region

#Region "ADD / DELETE/ SAVE" Private Sub AddSpecificSubj_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AddSpecificSubj.Click If TextBox3.Text = Nothing Or TextBox4.Text = Nothing Or TextBox5.Text = Nothing Then MsgBox("Missing Fields", MsgBoxStyle.Information, "Confirm") Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") ' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & TextBox3.Text & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("SUBJECT ALREADY ADDED", MsgBoxStyle.Information, "Students Subjects") ' totalvalue = totalvalue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value ' rdr = Nothing con.Close() Exit Sub End If con.Close()

Dim Ext As MsgBoxResult Ext = MsgBox("Add subject ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then totalvalue = totalvalue + TextBox5.Text Dim dt As DataTable = DirectCast(MySubject.DataSource, DataTable) dt.Rows.Add(TextBox3.Text, TextBox4.Text, TextBox5.Text) totalunits.Text = totalvalue

Label4.Hide() Label5.Hide() Label6.Hide() TextBox3.Hide() TextBox4.Hide() TextBox5.Hide() TextBox3.Text = "" TextBox4.Text = "" TextBox5.Text = ""

RwCount.Text = MySubject.RowCount End If

End Sub

Private Sub AllSubjects_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles AllSubjects.CellContentDoubleClick Try totalvalue = totalvalue + AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value

If totalvalue > 34 Then MsgBox("YOU ARE FULLY LOADED, CANNOT ENROLL ANY MORE SUBJECTS", MsgBoxStyle.Exclamation) totalvalue = totalvalue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value AllSubjects.Hide() MySubject.Show() btnadd.Show() BtnDel.Show() BtnSearch.Show() BtnSave.Show() S.Text = "Your Subjects" Exit Sub End If

Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") ' Dim con As New MySql.Data.MySqlClient.MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Dim cmd As New MySql.Data.MySqlClient.MySqlCommand("Select * from GMCN7EnrollmentDatabase.efdupsubjects where SubjectID = '" & (AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value) & "';", con) con.Open()

Dim rdr As MySql.Data.MySqlClient.MySqlDataReader = cmd.ExecuteReader

If rdr.HasRows Then MsgBox("SUBJECT ALREADY ADDED", MsgBoxStyle.Information, "Students Subjects") totalvalue = totalvalue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value ' rdr = Nothing con.Close() Exit Sub End If con.Close() Dim Ext As MsgBoxResult Ext = MsgBox("ADD SUBJECT : " & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

Dim dt As DataTable = DirectCast(MySubject.DataSource, DataTable) dt.Rows.Add(AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value, AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value) totalunits.Text = totalvalue

nonQuery("insert into GMCN7EnrollmentDatabase.EFDupsubjects values(0 ,'" & AllSubjects.Item(0, AllSubjects.CurrentRow.Index).Value & "','" & AllSubjects.Item(1, AllSubjects.CurrentRow.Index).Value & "'," & AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value & ");")

RwCount.Text = MySubject.RowCount Else totalvalue = totalvalue - AllSubjects.Item(2, AllSubjects.CurrentRow.Index).Value

End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

Private Sub BtnDel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDel.Click Try Dim Ext As MsgBoxResult Ext = MsgBox("REMOVE SUBJECT : " & MySubject.Item(0, MySubject.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

If MySubject.RowCount < 2 Then MsgBox("YOU SHOULD HAVE AT LEAST 1 SUBJECT ENROLLED", MsgBoxStyle.Information, "Students Subjects") Exit Sub End If

totalvalue = totalvalue - MySubject.Item(2, MySubject.CurrentRow.Index).Value totalunits.Text = totalvalue

nonQuery("delete from GMCN7EnrollmentDatabase.EFDupsubjects where subjectID = '" & MySubject.Item(0, MySubject.CurrentRow.Index).Value & "';") MySubject.Rows.RemoveAt(MySubject.CurrentRow.Index) RwCount.Text = MySubject.RowCount End If Catch ex As Exception Exit Sub End Try End Sub

Private Sub BtnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnSave.Click Dim Ext As MsgBoxResult Ext = MsgBox("Update subjects of " & D.Item(1, D.CurrentRow.Index).Value & " ?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("delete from GMCN7EnrollmentDatabase.EFsubjects where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';")

For Each dgvRow As DataGridViewRow In MySubject.Rows If Not dgvRow.IsNewRow Then nonQuery("insert into GMCN7EnrollmentDatabase.EFsubjects values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ");") ' totalValue += CInt(dgvRow.Cells(2).Value) '0 means the number of the column End If Next MsgBox("SUBJECTS UPDATED", MsgBoxStyle.Information) Me.Text = "Student Subjects" Me.Refresh()

btnadd.Hide() BtnDel.Hide() BtnSearch.Hide() BtnSave.Hide() MySubject.Hide()

D.Show() S.Text = "Search Student" TextBox1.Visible = True TextBox2.Visible = False Label2.Visible = False totalunits.Visible = False totalvalue = 0 End If End Sub

#End Region

Private Sub totaluntis_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles totalunits.KeyPress, RwCount.KeyPress e.Handled = True End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Ext As MsgBoxResult Ext = MsgBox("Exit?", MsgBoxStyle.Exclamation + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Close() End If

End Sub

Private Sub TextBox5_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox5.KeyPress

Dim allowedChars As String = "0123" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If

End Sub

Private Sub TextBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox3.KeyPress

Dim allowedChars As String = "ABCDEFGHIJKLMNOPQRSTUVWXYZ#^1234567890" 'dag dag mo nalang si (.) kung needed sila for decimal) If allowedChars.IndexOf(e.KeyChar) = -1 AndAlso Not e.KeyChar = ChrW(8) Then ' Invalid Character e.Handled = True End If

End Sub

End Class

VIEW GRADE FORM

Public Class GradeView

Private Sub GradeView_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where hasGrades = 'NO' ;", DStudent)

End Sub

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged If RadioButton1.Checked = True Then Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where HasGrades = 'YES' ;", DStudent) Else Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where HasGrades = 'NO' ;", DStudent)

End If End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

If RadioButton1.Checked = True Then

Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where Last_Name like '%" & TextBox1.Text & "%' or FIrst_Name like '%" & TextBox1.Text & "%' and HasGrades = 'YES' order by year_level asc ;", DStudent) Else Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where Last_Name like '%" & TextBox1.Text & "%' or FIrst_Name like '%" & TextBox1.Text & "%' and HasGrades = 'NO' order by year_level asc;", DStudent)

End If

End Sub

Private Sub DAllGrades_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DStudent.CellDoubleClick Dim Ext As MsgBoxResult Ext = MsgBox("View Grade of " & DStudent.Item(1, DStudent.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Dim ViewYear As Integer = Val(MySelectSpecific("Select Year_Level from GMCN7Enrollmentdatabase.efStudentInfo where Student_id = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';")) Dim ViewTerm As Integer = Val(MySelectSpecific("Select Term from GMCN7Enrollmentdatabase.efStudentInfo where Student_id = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';")) TextBox1.Hide() Label2.Hide() Me.Text = "Viewing Grade of " & DStudent.Item(1, DStudent.CurrentRow.Index).Value & " ( " & ViewYear & " , " & ViewTerm & " )" Me.Refresh()

Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "' and year_level = " & ViewYear & " and term = " & ViewTerm & " order by remark asc;", DAllGrades) YearBox.Text = ViewYear SemBox.Text = ViewTerm RadioButton1.Hide() RadioButton2.Hide() DStudent.Hide() DAllGrades.Visible = True DAllGrades.Show() GroupBox2.Visible = True GroupBox2.Show() LeftB.Show()

End If End Sub

Private Sub SemBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SemBox.KeyPress, YearBox.KeyPress e.Handled = True End Sub

Private Sub YearBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YearBox.SelectedIndexChanged, SemBox.SelectedIndexChanged Try

If YearBox.Text = 0 Then Exit Sub ElseIf YearBox.Text = 1 Then If SemBox.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "' ;", DAllGrades) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndSem where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades)

End If

If DAllGrades.RowCount < 1 Then Label8.Show() Label8.Visible = True DAllGrades.Hide() Else Label8.Visible = False Label8.Hide() DAllGrades.Show() End If ElseIf YearBox.Text = 2 Then If SemBox.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndYear where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndYear2ndSem where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) End If

If DAllGrades.RowCount < 1 Then Label8.Show() Label8.Visible = True DAllGrades.Hide() Else Label8.Visible = False Label8.Hide() DAllGrades.Show() End If

ElseIf YearBox.Text = 3 Then If SemBox.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks3rdYear where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks3rdyear2ndSem where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) End If

If DAllGrades.RowCount < 1 Then Label8.Show() Label8.Visible = True DAllGrades.Hide() Else Label8.Visible = False Label8.Hide() DAllGrades.Show() End If

ElseIf YearBox.Text = 4 Then If SemBox.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks4thYear where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks4thYear2ndSem where StudentID = '" & DStudent.Item(0, DStudent.CurrentRow.Index).Value & "';", DAllGrades) End If

If DAllGrades.RowCount < 1 Then Label8.Show() Label8.Visible = True DAllGrades.Hide() Else Label8.Visible = False Label8.Hide() DAllGrades.Show() End If

End If Catch ex As Exception Exit Sub MsgBox(ex.ToString) End Try End Sub

Private Sub LeftB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeftB.Click Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo ;", DStudent)

TextBox1.Show() Label2.Show() RadioButton1.Show() RadioButton2.Show() GroupBox2.Hide() LeftB.Hide() Label8.Hide() YearBox.Text = 0 DAllGrades.Hide() DStudent.Show() 'PENDING

If RadioButton1.Checked = True Then Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where HasGrades = 'YES' ;", DStudent) Else Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as Name, Major, Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where HasGrades = 'NO' ;", DStudent)

End If

End Sub

Private Sub RightB_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RightB.Click DAllGrades.Show() DStudent.Hide() RightB.Hide() TextBox1.Hide() Label2.Hide() RadioButton1.Hide() RadioButton2.Hide() LeftB.Show() GroupBox2.Show() End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim ext As MsgBoxResult ext = MsgBox("Really Exit ? ", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then Me.Close() End If End Sub

End Class

INPUT GRADE FORM

Public Class GradesAndRemarks Dim Sid As String Private Sub GradesAndRemarks_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as 'Name', Major, Year_Level, HasGrades from GMCN7Enrollmentdatabase.efstudentinfo order by year_level asc;", D) Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where hasGrades = 'Yes' order by year_level asc ", DUpdateG)

End Sub

#Region "TAB CONTROL" Private Sub TabControl1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles TabControl1.SelectedIndexChanged

If TabControl1.SelectedTab Is GradeTab Then Me.Text = "Input a grade to a student" Me.Refresh() End If

If TabControl1.SelectedTab Is UpdateGrade Then Me.Text = "Select a student from the selection to update grade" Me.Refresh() End If End Sub
#End Region

#Region "Grading Tab" '1

Private Sub SearchTxt_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchTxt.TextChanged If SearchTxt.Text = Nothing Then Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as 'Name', Year_Level, Major, HasGrades from GMCN7Enrollmentdatabase.efstudentinfo order by Year_Level asc;", D) ' Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as 'Name', Major, efsubjectsjournal.Remark, efsubjectsjournal.Grade from GMCN7Enrollmentdatabase.efstudentinfo left join GMCN7Enrollmentdatabase.efsubjectsjournal on efstudentinfo.Student_ID = efsubjectsjournal.StudentID ;", D)

Else Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as 'Name', Year_Level, Major, HasGrades from GMCN7Enrollmentdatabase.efstudentinfo where (Last_Name like '%" & SearchTxt.Text & "%' or First_Name like '%" & SearchTxt.Text & "%') order by Year_Level asc;", D) ' Populate("Select Student_ID, concat(Last_Name, ' , ' , First_Name , ' ' , Middle_Name) as 'Name', Major from GMCN7Enrollmentdatabase.efstudentinfo inner join GMCN7Enrollmentdatabase.efsubjectsjournal on efstudentinfo.student_ID = efsubjectsjournal.studentID ;", D)

End If End Sub

#Region "DG "

Dim checkk As Integer Dim whatiF As Integer = 0 Private Sub D_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles D.CellDoubleClick

Dim Ext As MsgBoxResult Ext = MsgBox("Select " & D.Item(1, D.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then years = Val(MySelectSpecific("Select year_Level from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';")) terms = Val(MySelectSpecific("Select term from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';"))

If years = 1 And terms = 1 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 1 and Term = 1;")) ElseIf years = 1 And terms = 2 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndsem where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 1 and Term = 2;")) ElseIf years = 2 And terms = 1 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndYear where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 2 and Term = 1;")) ElseIf years = 2 And terms = 2 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks2ndYear2ndSem where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 2 and Term = 2;")) ElseIf years = 3 And terms = 1 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks3rdYear where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 3 and Term = 1;")) ElseIf years = 3 And terms = 2 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks3rdYear2ndSem where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 3 and Term = 2;")) ElseIf years = 4 And terms = 1 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks4thYear where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 4 and Term = 1;")) ElseIf years = 4 And terms = 2 Then checkk = Val(MySelectSpecific("Select CheckK from GMCN7EnrollmentDatabase.semremarks4thYear2ndSem where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = 4 and Term = 2;")) End If

If checkk = 0 Or whatiF = 1 Then

Populate("Select Units, Descriptive_Title,SubjectID from GMCN7Enrollmentdatabase.efsubjects where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';", d2) Label1.Text = "Students Grades and Remarks" Me.Text = "Grades and Remarks of " & D.Item(1, D.CurrentRow.Index).Value & " ( " & years & " , " & terms & " )" Me.Refresh() D.Hide() d2.Show() d2.Visible = True btnadd.Show() LeftBtn.Show() Else

MsgBox("Student Already Evaluated this semester !", MsgBoxStyle.Information, "Confirm")

End If End If End Sub

#End Region

Dim failures As Integer = 0 Dim passed As Integer = 0 Dim inc As Integer = 0 Dim f, p, i As Integer Dim years, terms As Integer

#Region "Button Add"

Private Sub btnadd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnadd.Click Dim Ext As MsgBoxResult Ext = MsgBox("Submit Grade Record ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

For Each dgvRow As DataGridViewRow In d2.Rows If Not dgvRow.IsNewRow Then Dim zxc As String = dgvRow.Cells(0).Value Dim y As String = MySelectSpecific("Select Date_Enrolled from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") years = Val(MySelectSpecific("Select year_Level from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';")) terms = Val(MySelectSpecific("Select term from GMCN7EnrollmentDatabase.efstudentinfo where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';"))

'YEAR 1 If years = 1 Then

If terms = 1 Then If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semremarks set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semremarks set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');") ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semremarks set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');") Else nonQuery("update GMCN7EnrollmentDatabase.semremarks set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If Else If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndsem set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');") Else

nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndsem set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If End If '2nd Year ElseIf years = 2 Then

If terms = 1 Then If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');") ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');") Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If Else If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear2ndsem set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks2ndYear2ndsem set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If End If ElseIf years = 3 Then

If terms = 1 Then If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If Else If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear2ndsem set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks3rdYear2ndsem set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If End If ElseIf years = 4 Then If terms = 1 Then If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'FAILED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If Else If zxc = "1" Or zxc = "3.00" Or zxc = "1.25" Or zxc = "1.50" Or zxc = "1.75" Or zxc = "2.00" Or zxc = "2.25" Or zxc = "2.50" Or zxc = "2.75" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'PASSED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") passed += dgvRow.Cells(1).Value ElseIf zxc = "5" Then 'nonQuery("insert into GMCN7EnrollmentDatabase.semRemarks values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "'," & years & "," & terms & ",'" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ",'" & dgvRow.Cells(0).Value & "', 'FAILED', 1,'" & y & "');") 'DROP , UNOFFICIALLY DROP, INC,PASSED, FAILED nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear2ndsem set grade = '" & dgvRow.Cells(0).Value & "', Remark = 'FAILED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

ElseIf zxc = "DROPPED" Then nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear2ndsem set grade = '5.00', Remark = 'DROPPED', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") failures += dgvRow.Cells(1).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & D.Item(0, D.CurrentRow.Index).Value & "','" & D.Item(1, D.CurrentRow.Index).Value & "','" & dgvRow.Cells(3).Value & "','" & dgvRow.Cells(2).Value & "'," & dgvRow.Cells(1).Value & ", 'DROPPED' ,'" & years & "','" & terms & "');")

Else nonQuery("update GMCN7EnrollmentDatabase.semRemarks4thYear2ndsem set grade = '0', Remark = 'INCOMPLETE', CheckK = 1 where SubjectID = '" & dgvRow.Cells(3).Value & "' and StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") inc += 1 End If End If End If End If Next f = Val(MySelectSpecific("Select Failed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' order by Year_level DESC limit 1;")) p = Val(MySelectSpecific("Select Passed from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' order by term DESC limit 1;")) i = Val(MySelectSpecific("Select Inc from GMCN7EnrollmentDatabase.studentremarks where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' order by Year_level DESC limit 1;"))

nonQuery("update GMCN7EnrollmentDatabase.efstudentjournal set Failed = " & f + failures & ", Passed = " & p + passed & ", Inc = " & i + inc & " where StudentID = '" & D.Item(0, D.CurrentRow.Index).Value & "' and Year_Level = " & years & " and term = " & terms & ";") nonQuery("insert into GMCN7EnrollmentDatabase.studentremarks values ('" & D.Item(0, D.CurrentRow.Index).Value & "'," & failures & "," & passed & "," & inc & "," & years & "," & terms & ");") failures = 0 passed = 0 inc = 0 f = 0 p = 0 i = 0

MsgBox("GRADE RECORDED!", MsgBoxStyle.Information, "SUCCESS") nonQuery("update GMCN7EnrollmentDatabase.efStudentInfo set hasGrades = 'YES' where Student_ID = '" & D.Item(0, D.CurrentRow.Index).Value & "';") ' Populate("Select descriptive_title, subjectid, Year_Level, Grade, Remark from GMCN7Enrollmentdatabase.efgradeandremarks;", D3) Me.Text = "Grades and Remarks of " & D.Item(1, D.CurrentRow.Index).Value Me.Refresh() btnadd.Hide() SearchBtn.Show() End If End Sub
#End Region

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click, Button1.Click Dim Ext As MsgBoxResult Ext = MsgBox("Exit ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Close() Magulang.GroupBox1.BringToFront() End If End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBtn.Click Dim Ext As MsgBoxResult Ext = MsgBox("Evaluate another student ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then d2.Hide() D.Show() SearchTxt.Show() Label4.Show() SearchBtn.Hide() btnadd.Show() Me.Text = "Students Grades " Me.Refresh() Label4.Text = "Search :" LeftBtn.Hide() btnadd.Hide() End If End Sub

Private Sub LeftBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LeftBtn.Click

If d2.Visible = True Then LeftBtn.Hide() D.Show() d2.Hide() D3.Hide() SearchTxt.Show() Label4.Show() btnadd.Hide() Me.Text = "Search Students" Me.Refresh() SearchBtn.Hide() ElseIf D3.Visible = True Then D.Hide() d2.Show() D3.Hide() Me.Text = "Students Grades" Me.Refresh() ElseIf Label5.Visible = True Then LeftBtn.Hide() D.Show() d2.Hide() D3.Hide() SearchTxt.Show() Label4.Show() btnadd.Hide() Label5.Hide() End If

Label4.Text = "Search:"

End Sub

#End Region ' END OF TAB 1

#Region "Update Grade" '3

#Region "Select"

Private Sub ComboBox3_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ComboBox3.SelectedIndexChanged If ComboBox3.Text = Nothing Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo ", DUpdateG) ElseIf ComboBox3.Text = "Student_ID" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo order by Student_ID asc;", DUpdateG) ElseIf ComboBox3.Text = "Last_Name" Then

Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by Last_Name asc;", DUpdateG) ElseIf ComboBox3.Text = "First_Name" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by First_Name asc;", DUpdateG) ElseIf ComboBox3.Text = "Year_Level" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by Year_Level asc;", DUpdateG) ElseIf ComboBox3.Text = "Course" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by Major asc;", DUpdateG) ElseIf ComboBox3.Text = "Date_Enrolled" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo order by Date_Enrolled asc;", DUpdateG) ElseIf ComboBox3.Text = "Number_Of_Enrollee" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Number_Of_Enrollee, Major from gmcn7enrollmentdatabase.efstudentinfo order by Number_Of_Enrollee asc;", DUpdateG)

ElseIf ComboBox3.Text = "Regular_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' order by Student_ID asc;", DUpdateG)

ElseIf ComboBox3.Text = "New_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' order by Student_ID asc;", DUpdateG)

End If End Sub

Private Sub TextBox2_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateText.TextChanged If UpdateText.Text = Nothing Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo ", DUpdateG) ElseIf ComboBox3.Text = Nothing Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo ", DUpdateG) ElseIf ComboBox3.Text = "Student_ID" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level,Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Student_ID asc;", DUpdateG) ElseIf ComboBox3.Text = "Last_Name" Then

Populate("Select Student_ID, concat (Last_Name , ' , ' , First_Name , ' ' , Middle_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Last_Name asc;", DUpdateG) ElseIf ComboBox3.Text = "First_Name" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where First_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by First_Name asc;", DUpdateG) ElseIf ComboBox3.Text = "Year_Level" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Year_Level asc;", DUpdateG) ElseIf ComboBox3.Text = "Course" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Major asc;", DUpdateG) ElseIf ComboBox3.Text = "Date_Enrolled" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Date_Enrolled asc;", DUpdateG) ElseIf ComboBox3.Text = "Number_Of_Enrollee" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level, Number_Of_Enrollee, Major from gmcn7enrollmentdatabase.efstudentinfo where Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Number_Of_Enrollee asc;", DUpdateG)

ElseIf ComboBox3.Text = "Regular_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'Regular Student' and Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Student_ID asc;", DUpdateG)

ElseIf ComboBox3.Text = "New_Students" Then

Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo where isNewOrRegular = 'New Student' and Last_Name like '%" & UpdateText.Text & "%' or First_Name like '%" & UpdateText.Text & "%' order by Student_ID asc;", DUpdateG)

End If End Sub

Private Sub YG_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles YG.SelectedIndexChanged, SG.SelectedIndexChanged Try

If YG.Text = 1 Then If SG.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "' ;", DUpdateGrade) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndSem where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

End If

If DUpdateGrade.RowCount < 1 Then Label16.Show() Label16.Visible = True DUpdateGrade.Hide() GroupBox1.Hide() Else Label16.Visible = False Label16.Hide() DUpdateGrade.Show() GroupBox1.Show() End If ElseIf YG.Text = 2 Then If SG.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndYear where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks2ndYear2ndSem where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) End If

If DUpdateGrade.RowCount < 1 Then Label16.Show() Label16.Visible = True DUpdateGrade.Hide() GroupBox1.Hide() Else Label16.Visible = False Label16.Hide() DUpdateGrade.Show() GroupBox1.Show() End If

ElseIf YG.Text = 3 Then If SG.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks3rdYear where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks3rdyear2ndSem where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) End If

If DUpdateGrade.RowCount < 1 Then Label16.Show() Label16.Visible = True DUpdateGrade.Hide() GroupBox1.Hide() Else Label16.Visible = False Label16.Hide() DUpdateGrade.Show() GroupBox1.Show() End If

ElseIf YG.Text = 4 Then If SG.Text = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks4thYear where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) Else Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7Enrollmentdatabase.semremarks4thYear2ndSem where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) End If

If DUpdateGrade.RowCount < 1 Then Label16.Show() Label16.Visible = True DUpdateGrade.Hide() GroupBox1.Hide() Else Label16.Visible = False Label16.Hide() DUpdateGrade.Show() GroupBox1.Show() End If

End If Catch ex As Exception Exit Sub End Try End Sub

#End Region

Private Sub UpdateLeft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateLeft.Click Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Year_Level, Major from gmcn7enrollmentdatabase.efstudentinfo", DUpdateG)

Label10.Show() Label13.Show() UpdateText.Show() ComboBox3.Show() DUpdateG.Show() DUpdateGrade.Hide() GroupBox1.Hide() GroupBox3.Hide() UpdateLeft.Hide() Label16.Hide() UpdateGradeBtn.Hide() ComboBox3.Text = "Last_Name" Me.Text = "Select a student from the selection to update grade" Me.Refresh()

End Sub

#Region "DG"

Private Sub DUpdateG_CellMouseDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellMouseEventArgs) Handles DUpdateG.CellMouseDoubleClick Dim Ext As MsgBoxResult Ext = MsgBox("Select " & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

DUpdateG.Hide() DUpdateGrade.Show() GroupBox3.Show() Label10.Hide() UpdateText.Hide() Label13.Hide() ComboBox3.Hide() GroupBox1.Show() UpdateGradeBtn.Show()

Dim WhatYear As Integer = Val(MySelectSpecific("Select Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';")) Dim WhatSem As Integer = Val(MySelectSpecific("Select Term from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';"))

If WhatYear = 1 And WhatSem = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 1 And WhatSem = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 2 And WhatSem = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndyear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 2 And WhatSem = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndYear2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 3 And WhatSem = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks3rdYear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 3 And WhatSem = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks3rdYear2ndSem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 4 And WhatSem = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks4thYear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

ElseIf WhatYear = 4 And WhatSem = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks4thYear2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade) ' Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

End If YG.Text = WhatYear SG.Text = WhatSem Me.Text = "Updating Student Grade of " & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & " , ( " & WhatYear & " , " & WhatSem & " )"

Me.Refresh() WhatSem = 0 WhatYear = 0

UpdateLeft.Show() End If End Sub

Private Sub DUpdateGrade_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DUpdateGrade.CellDoubleClick Try BoxGrade.Text = DUpdateGrade.Item(3, DUpdateGrade.CurrentRow.Index).Value SubjIDtext.Text = DUpdateGrade.Item(0, DUpdateGrade.CurrentRow.Index).Value BoxGrade.Focus() Catch ex As Exception

End Try End Sub

#End Region

Private Sub BoxGrade_SelectedValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles BoxGrade.SelectedValueChanged Try

If BoxGrade.Text = "NA" Then DUpdateGrade.Item(3, DUpdateGrade.CurrentRow.Index).Value = 0 DUpdateGrade.Item(4, DUpdateGrade.CurrentRow.Index).Value = "INCOMPLETE" ElseIf BoxGrade.Text = "DROPPED" Then DUpdateGrade.Item(3, DUpdateGrade.CurrentRow.Index).Value = "5.00" DUpdateGrade.Item(4, DUpdateGrade.CurrentRow.Index).Value = "DROPPED" ElseIf BoxGrade.Text = 1.0 Or BoxGrade.Text = 1.25 Or BoxGrade.Text = 1.5 Or BoxGrade.Text = 1.75 Or BoxGrade.Text = 2.0 Or BoxGrade.Text = 2.25 Or BoxGrade.Text = 2.5 Or BoxGrade.Text = 2.75 Or BoxGrade.Text = 3.0 Then DUpdateGrade.Item(4, DUpdateGrade.CurrentRow.Index).Value = "PASSED" DUpdateGrade.Item(3, DUpdateGrade.CurrentRow.Index).Value = BoxGrade.Text ElseIf BoxGrade.Text = 5.0 Then DUpdateGrade.Item(4, DUpdateGrade.CurrentRow.Index).Value = "FAILED" DUpdateGrade.Item(3, DUpdateGrade.CurrentRow.Index).Value = "5.00" End If

Catch ex As Exception MsgBox(ex.ToString) End Try End Sub

#End Region

#Region "UPDATE GRADE BUTTON"

Private Sub UpdateGradeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateGradeBtn.Click Try

Dim WhatYear As Integer = Val(MySelectSpecific("Select Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';")) Dim WhatSem As Integer = Val(MySelectSpecific("Select Term from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';"))

Dim Ext As MsgBoxResult Ext = MsgBox("Update Grade of " & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & " ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("delete from GMCN7Enrollmentdatabase.StudentFailures where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "' and Year_Level = " & WhatYear & " and Term = " & WhatSem & ";")

Dim TFail, TPassed, TInc As Integer For Each dgvRow As DataGridViewRow In DUpdateGrade.Rows If Not dgvRow.IsNewRow Then

If YG.Text = 1 And SG.Text = 1 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');") ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 1 And SG.Text = 2 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks2ndSem set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 2 And SG.Text = 1 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks2ndYear set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 2 And SG.Text = 2 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks2ndYear2ndSem set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 3 And SG.Text = 1 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks3rdYear set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

TFail += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 3 And SG.Text = 2 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks3rdYear2ndSem set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 4 And SG.Text = 1 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks4thYear set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If ElseIf YG.Text = 4 And SG.Text = 2 Then

nonQuery("update GMCN7Enrollmentdatabase.semremarks4thyear2ndSem set Grade = " & dgvRow.Cells(3).Value & ", Remark = '" & dgvRow.Cells(4).Value & "' where SubjectID = '" & dgvRow.Cells(0).Value & "' and StudentId = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';") If dgvRow.Cells(3).Value = "1.00" Or dgvRow.Cells(3).Value = "3.00" Or dgvRow.Cells(3).Value = "1.25" Or dgvRow.Cells(3).Value = "1.50" Or dgvRow.Cells(3).Value = "1.75" Or dgvRow.Cells(3).Value = "2.00" Or dgvRow.Cells(3).Value = "2.25" Or dgvRow.Cells(3).Value = "2.50" Or dgvRow.Cells(3).Value = "2.75" Then TPassed += dgvRow.Cells(2).Value ElseIf dgvRow.Cells(3).Value = "5.00" Then TFail += dgvRow.Cells(2).Value nonQuery("Insert into GMCN7EnrollmentDatabase.StudentFailures values('" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "','" & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & "','" & dgvRow.Cells(0).Value & "','" & dgvRow.Cells(1).Value & "'," & dgvRow.Cells(2).Value & ", 'FAILED' ,'" & WhatYear & "','" & WhatSem & "');")

ElseIf dgvRow.Cells(4).Value = "INCOMPLETE" Then TInc += 1 End If

End If End If Next nonQuery("Update GMCN7Enrollmentdatabase.StudentRemarks set Failed = " & TFail & ", Passed = " & TPassed & ", Inc = " & TInc & " where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "' and Year_Level = " & WhatYear & " and term = " & WhatSem & ";")

Populate("select failed, passed, inc from GMCN7EnrollmentDatabase.studentremarks where Studentid = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DDupSubj)

Dim TTfail, TTpassed, TTinc As Integer

For Each dgvRow As DataGridViewRow In DDupSubj.Rows If Not dgvRow.IsNewRow Then TTfail += dgvRow.Cells(0).Value TTpassed += dgvRow.Cells(1).Value TTinc += dgvRow.Cells(2).Value

End If Next nonQuery("Update GMCN7Enrollmentdatabase.efstudentjournal set Failed = " & TTfail & ", Passed = " & TTpassed & ", Inc = " & TTinc & " where StudentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "' and Year_Level = " & WhatYear & " and term = " & WhatSem & ";") TFail = 0 TPassed = 0 TInc = 0 TTfail = 0 TTpassed = 0 TTinc = 0

Dim WhatYear2 As Integer = Val(MySelectSpecific("Select Year_Level from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';")) Dim WhatSem2 As Integer = Val(MySelectSpecific("Select Term from GMCN7Enrollmentdatabase.efstudentinfo where Student_ID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';"))

If WhatYear2 = 1 And WhatSem2 = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 1 And WhatSem2 = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 2 And WhatSem2 = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndyear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 2 And WhatSem2 = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks2ndYear2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 3 And WhatSem2 = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks3rdYear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 3 And WhatSem2 = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks3rdYear2ndSem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 4 And WhatSem2 = 1 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks4thYear where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

ElseIf WhatYear2 = 4 And WhatSem2 = 2 Then Populate("Select SubjectID, DescriptiveTitle, Units, Grade, Remark from GMCN7EnrollmentDatabase.semremarks4thYear2ndsem where studentID = '" & DUpdateG.Item(0, DUpdateG.CurrentRow.Index).Value & "';", DUpdateGrade)

End If

Me.Text = "Grades updated for " & DUpdateG.Item(1, DUpdateG.CurrentRow.Index).Value & " , ( " & WhatYear2 & " , " & WhatSem2 & " )" Me.Refresh()

MsgBox("GRADES UPDATED", MsgBoxStyle.Information, "Confirm")

End If Catch ex As Exception MsgBox(ex.ToString) End Try End Sub
#End Region

#Region "RESTRICTIONS" Private Sub ComboBox3_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles ComboBox3.KeyPress, YG.KeyPress, SG.KeyPress, SubjIDtext.KeyPress, BoxGrade.KeyPress

e.Handled = True

End Sub

#End Region

End Class

TEACHERS INFORMATION FORM

Public Class zTeacherInfo

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click Dim ext As MsgBoxResult ext = MsgBox("Exit? ", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If ext = MsgBoxResult.Yes Then Me.Close() Magulang.GroupBox1.BringToFront() End If

End Sub

Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged If TextBox1.Text = Nothing Then Populate("Select DescriptiveTitle from gmcn7enrollmentdatabase.iccmsubjects ;", D2) Else

Populate("Select Professor_Name as 'Professors' from gmcn7enrollmentdatabase.iccmsubjects where Professor_Name like '%" & TextBox1.Text & "%' order by Professor_Name desc limit 1;", D) Populate("Select DescriptiveTitle from gmcn7enrollmentdatabase.iccmsubjects where Professor_Name like '%" & TextBox1.Text & "%';", D2)

If D2.RowCount < 1 Then TextBox2.Text = "" Else TextBox2.Text = D2.RowCount End If

End If End Sub

Private Sub zTeacherInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Professor_Name as 'Professors' from gmcn7enrollmentdatabase.iccmsubjects ;", D) Populate("Select DescriptiveTitle from gmcn7enrollmentdatabase.iccmsubjects;", D2)

End Sub

Private Sub major_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox2.KeyPress e.Handled = True End Sub
End Class

PROBATIONS AND GRADUATION FORM

Public Class ProbationsAndGraduates

Private Sub ProbationsAndGraduates_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'NO' and Year_Level = 4 and Term = 2 order by Student_ID asc;", SearchMe) End Sub

Private Sub SearchBox_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles SearchBox.KeyPress e.Handled = True End Sub

Private Sub SearchBox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles SearchBox.SelectedIndexChanged If SearchBox.Text = "Graduates" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'NO' and Year_Level = 4 and Term = 2 order by Student_ID asc;", SearchMe) Else Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Major,Year_Level from gmcn7enrollmentdatabase.efcheckboxchecker inner join gmcn7enrollmentdatabase.efstudentInfo on efcheckboxchecker.studentID = efstudentinfo.student_ID where ScholarWorkChk = 'YES' order by student_Id asc;", SearchMe) ' Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Year_Level,Recent_Illness, Allergies, Handicaps, Taking_Medications, Pls_Specify from gmcn7enrollmentdatabase.efmedical inner join gmcn7enrollmentdatabase.efstudentInfo on efmedical.studentID = efstudentinfo.student_ID order by Student_ID asc ;", SearchMe)

End If End Sub

Private Sub S_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles S.TextChanged If S.Text = Nothing Then Exit Sub ElseIf SearchBox.Text = "Graduates" Then Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'NO' and Year_Level = 4 and Term = 2 and (last_Name like '" & S.Text & "' or first_name like '" & S.Text & "') order by Student_ID asc;", SearchMe) Else Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Major,Year_Level from gmcn7enrollmentdatabase.efcheckboxchecker inner join gmcn7enrollmentdatabase.efstudentInfo on efcheckboxchecker.studentID = efstudentinfo.student_ID where ScholarWorkChk = 'YES' and (last_Name like '" & S.Text & "' or first_name like '" & S.Text & "') order by student_Id asc;", SearchMe)

End If End Sub

Private Sub SearchMe_CellDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles SearchMe.CellDoubleClick Try

If SearchBox.Text = "Graduates" Then

Dim Ext As MsgBoxResult Ext = MsgBox("Change " & SearchMe.Item(1, SearchMe.CurrentRow.Index).Value & " status to GRADUATED ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then nonQuery("Update GMCN7EnrollmentDatabase.efstudentinfo set Graduated = 'YES' where Student_Id = '" & SearchMe.Item(0, SearchMe.CurrentRow.Index).Value & "' ;") ' nonQuery("update GMCN7EnrollmentDatabase.EFWorkExperience set Recent_Work = '" & Workxp.Text & "', Work_Address = '" & WorkAdd.Text & "' where StudentID = '" & SID & "';") MsgBox("Student Updated", MsgBoxStyle.Information, "Confirm")

Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'NO' and Year_Level = 4 and Term = 2 order by Student_ID asc;", SearchMe) Exit Sub Else

End If Else

Dim Ext As MsgBoxResult Ext = MsgBox("Remove " & SearchMe.Item(1, SearchMe.CurrentRow.Index).Value & " Work Scholarship ? ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then

nonQuery("Update GMCN7EnrollmentDatabase.efcheckboxchecker set ScholarWorkChk = 'NO' where StudentId = '" & SearchMe.Item(0, SearchMe.CurrentRow.Index).Value & "' ;") MsgBox("Work Scholarship Updated", MsgBoxStyle.Information, "Confirm")

' Populate("Select Student_ID , concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name, Major from gmcn7enrollmentdatabase.efstudentinfo where Graduated = 'NO' and Year_Level = 4 and Term = 2 order by Student_ID asc;", SearchMe) Populate("Select Student_ID, concat (First_Name , ' ' , Middle_Name , ' ', Last_Name) as Name,Major,Year_Level from gmcn7enrollmentdatabase.efcheckboxchecker inner join gmcn7enrollmentdatabase.efstudentInfo on efcheckboxchecker.studentID = efstudentinfo.student_ID where ScholarWorkChk = 'YES' order by student_Id asc;", SearchMe)

Exit Sub End If End If Catch ex As Exception

End Try End Sub

Private Sub jimmyexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles jimmyexit.Click Dim Ext As MsgBoxResult Ext = MsgBox("Exit ?", MsgBoxStyle.Information + MsgBoxStyle.YesNo, "Confirm") If Ext = MsgBoxResult.Yes Then Me.Close() Magulang.GroupBox1.BringToFront() End If End Sub
End Class

MODULE CONNECTION

Imports MySql.Data.MySqlClient
Module Module1 ' Dim Mycon As New MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= '';") Dim Mycon As New MySqlConnection("Server = localhost; port= 3306; uid= 'root' ; password= 'p@ssw0rd';")

Public Sub Populate(ByVal Utos As String, ByVal Gridd As DataGridView) 'Declare OLE Command Dim ACcommand As New MySqlCommand(Utos, Mycon) 'Declare a Adapter Dim Adapter As New MySqlDataAdapter 'declare a Datatable Dim Lamesa As New DataTable

Try ' Open Connection First; Mycon.Open() 'Initiate Adapter Adapter.SelectCommand = ACcommand 'Fill a datatable with adapter Adapter.Fill(Lamesa) 'Set Datagridview datasource to datatable Gridd.DataSource = Lamesa 'Close The Connection Mycon.Close()

Catch ex As Exception 'At least close the connection Mycon.Close() 'know the error MsgBox(ex.ToString)

End Try

'For commands na hindi select

End Sub Public Sub nonQuery(ByVal utos As String) Dim sqlutos As New MySqlCommand(utos, Mycon) Try Mycon.Open() sqlutos.ExecuteNonQuery() Mycon.Close() Catch ex As Exception Mycon.Close() MsgBox(ex.ToString) End Try End Sub Public Sub chatpopv(ByVal utos As String, ByVal lst As ListBox) Dim sqlutos As New MySqlCommand(utos, MyCon) Dim reader As MySqlDataReader Try lst.Items.Clear() 'tanggalin ang laman ng listbox MyCon.Open() reader = sqlutos.ExecuteReader While reader.Read lst.Items.Add(reader(0) & ":" & reader(1) & "SENT ON::" & reader(2)) 'mag add si listbox End While reader.Close() MyCon.Close() Catch ex As Exception MyCon.Close() MsgBox(ex.ToString) End Try End Sub Function MySelectSpecific(ByVal utos As String) Dim sqlutos As New MySqlCommand(utos, MyCon) Dim reader As MySqlDataReader Dim resulta As String = Nothing Try MyCon.Open() reader = sqlutos.ExecuteReader While reader.Read resulta = reader(0) End While reader.Close() MyCon.Close() Return resulta Catch ex As Exception MyCon.Close() MsgBox(ex.ToString) Return Nothing End Try End Function Public Sub MyNonQuery(ByVal utos As String) Dim SQLutos As New MySqlCommand(utos, MyCon) Try MyCon.Open() SQLutos.ExecuteNonQuery() MyCon.Close() Catch ex As Exception MyCon.Close() MsgBox(ex.ToString) End Try End Sub

#Region "Form Management" Public Sub adopt(ByVal anak As Form, ByVal magulang As Form)

anak.MdiParent = magulang anak.WindowState = FormWindowState.Maximized ' anak.BackgroundImage = System.Drawing.Image.FromFile("C:\Users\Admin\Desktop\BackgroundColor.png") anak.Show()

End Sub Public Sub GlobalKeyRestriction(ByVal e As System.Windows.Forms.KeyPressEventArgs) If e.KeyChar = "a" Then e.Handled = True

End If End Sub

#End Region
End Module

TEST CASE

INTERNATIONAL CHRISTIAN COLLEGE OF MANILA

ENROLLMENT AND STUDENT MANAGEMENT SYSTEM

Description: Logging in to the system.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Click the ‘OK’ Button |The system will check the right username and | | |
| | |password, and if the username and password | | |
| | |matched the system requirements, it will | | |
| | |proceed to the main menu. | | |
|2 |Click the ‘Exit’ Button|The system will ask the user if he/she really| | |
| | |wants to end the program. Choosing yes will | | |
| | |close the program | | |
|3 |Double clicking ‘Forgot|The system will direct you to the Forgot | | |
| |Password’ |Password form. | | |

Description: Changing user password

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking‘OK’ Button at|The system will check the user and will ask | | |
| |Enter Username |for the users PINCODE. | | |
|2 |Clicking the ‘OK’ |The system will verify the PINCODE if it is | | |
| |Button at Ask Pincode |matched, it will show the change password | | |
| | |text boxes, mismatch / wrong combination | | |
| | |will result to an error. | | |
|3 |Clicking the ‘OK’ |The system will verify the NEW PASSWORD if | | |
| |Button at Enter New |it is matched and will ask you if the | | |
| |Password |password is exact and correct, upon choosing| | |
| | |yes, the system will close the current form | | |
| | |and will direct you to the log – in form. | | |
| | |Mismatch / wrong combination of password | | |
| | |will result to an error. | | |

Description: At the main menu form and clicking the tabs.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Who Are |The system will show the ‘Who are we’ tab | | |
| |We?’ Tab | | | |
|2 |Clicking the ‘Mission’ |The system will show the ‘Mission’ tab | | |
| |Tab | | | |
|3 |Clicking the ‘Goals’ |The system will show the ‘Goals’ tab | | |
| |Tab | | | |
|4 |Clicking the |The system will show the ‘Philosophy’ tab | | |
| |‘Philosophy’ Tab | | | |
|5 |Clicking the |The system will show the ‘Philosophy’ tab | | |
| |‘Reminders’ Tab | | | |

Description: At the main menu reminder tab and setting an appointment / reminders.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Set An |The system will show a calendar. | | |
| |Appointment’ Button | | | |
|2 |Clicking a ‘date day’ |A message box asking if you want to set an | | |
| |on the calendar |appointment for that day will pop up, upon | | |
| | |choosing yes, a textbox field will show and | | |
| | |will allow you to type your appointment for a| | |
| | |specific date. | | |
|3 |Clicking the ‘save’ |The system will ask the user if they want to | | |
| |button |save that appointment, upon choosing yes, the| | |
| | |date will be saved to the database. | | |
|4 |Clicking the ‘clear’ |The system will clear the textbox field upon | | |
| |button |clicking yes. | | |
|5 |Clicking the ‘Back’ |The system will close the textbox and show | | |
| |button |the calendar at the reminder tab. | | |

Description: Entering the main menu with an appointment.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Entry on the main menu |A message box will show asking if the user | | |
| | |wants to see his/her today’s appointment, | | |
| | |choosing yes will direct the user to the | | |
| | |reminder tab showing his/her appointments, | | |
| | |choosing no will just close the message box. | | |

Description: Navigating at the menu strip Main menu.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Main |The system will direct the user to the main | | |
| |Menu’ button |menu. | | |
|2 |Clicking the ‘Minimize |The system will minimize all the current | | |
| |All Forms’ button |forms. | | |
|3 |Clicking the ‘Close All|The system will ask the user if he/she wants | | |
| |forms’ button |to close all forms, choosing yes will close | | |
| | |all the current opened forms | | |
|4 |Clicking the ‘Lock’ |The system will put the program the system at | | |
| |button |lock with a password textbox. | | |
|5 |Clicking the ‘Log-Out’ |The program will ask the user if he/she wants | | |
| |button |to Log – out, choosing yes will close the main| | |
| | |menu form and show the log – in form. | | |

Description: Navigating at the menu strip enrollment.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘New |The main menu form will close and the system | | |
| |Student’ button |will direct the user to the New Student Form.| | |
|2 |Clicking the ‘Regular |The main menu form will close and the system | | |
| |Student’ button |will direct the user to the Regular Student | | |
| | |Form. | | |
|3 |Clicking the |The main menu form will close and the system | | |
| |‘Enrollment Procedures’|will direct the user to the Enrollment | | |
| |button |Procedures Form. | | |

Description Navigating at the menu strip student management.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Student |The main menu form will close and the system | | |
| |Information’ button |will direct the user to the Student | | |
| | |Information form. | | |
|2 |Clicking the ‘Overview |The main menu form will close and the system | | |
| |of Students’ button |will direct the user to the Overview of | | |
| | |students form. | | |
|3 |Clicking the ‘Academic |The main menu form will close and the system | | |
| |Performance’ button |will direct the user to the Academic | | |
| | |Performance form. | | |
|4 |Clicking the ‘Work |The main menu form will close and the system | | |
| |Review’ button |will direct the user to the Work Review form. | | |
|5 |Clicking the Sunday |The main menu form will close and the system | | |
| |Worship Report’ button |will direct the user to the Sunday Worship | | |
| | |Report form. | | |
|6 |Clicking the ‘Library |The main menu form will close and the system | | |
| |Hours’ button |will direct the user to the Library Hours | | |
| | |form. | | |

Description: Navigating at the main menu strip Grades and subjects.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 | |The system will display a message box asking | | |
| | |the password of the user, invalid input of | | |
| | |password 4x will close the procedure. Upon | | |
| |Clicking the ‘Edit |success, the main menu form will close and the| | |
| |Subjects’ button |system will direct the user to the Edit | | |
| | |Subjects form. | | |
|2 |Clicking the |The main menu form will close and the system | | |
| |‘Add/Remove Subjects’ |will direct the user to the Add/Remove | | |
| |button |subjects form. | | |
|3 |Clicking the ‘View |The main menu form will close and the system | | |
| |Grade Subjects’ button |will direct the user to the View Grade | | |
| | |subjects form | | |
|4 |Clicking the ‘Input |The main menu form will close and the system | | |
| |Grade Subjects’ button |will direct the user to the Input Grade | | |
| | |subjects form | | |

Description: Navigating at the menu strip Teachers Information. .

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Teachers |The main menu form will close and the system | | |
| |Information’ button |will direct the user to the Teachers | | |
| | |Information form. | | |

Description: Navigating at the menu strip Graduates and Scholarship Strip.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Graduates |The main menu form will close and the system | | |
| |and Work Scholarships’ |will direct the user to the Graduates And Work | | |
| |button |Scholarships form. | | |

Description: Enrolling new students at the Enrollment strip.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Clicking the ‘Next |The system will move the tab selected to the | | |
| |Page’ Button |next tab; missing inputs on required field(s) | | |
| | |will display an error message box and put the | | |
| | |next page action on halt. | | |
|3 |Clicking the ‘Back |The system will move the tab selected to the | | |
| |Page’ Button |previous tab / page. | | |
|4 |Checking the ‘Checkbox’|The system will set the unrequired fields to | | |
| |button |required fields and the user must fill the | | |
| | |following fields, checking the checkbox and | | |
| | |continuing to the next page will display an | | |
| | |error message box and put the next page action| | |
| | |on halt. | | |
|5 |Clicking the ‘Add |The system will ask the user if the inputs are| | |
| |Another’ Button |correct, choosing yes will clear the fields | | |
| | |and store the previous inputs to the database.| | |
|6 |Clicking the ‘Subjects’|A message box will pop out and ask if the | | |
| |Button |course and year level is correct, satisfying | | |
| | |both fields will display the students’ | | |
| | |subjects and his/her options to take, clicking| | |
| | |the subjects button with one of the two | | |
| | |required missing will result to an error. | | |
|7 |Clicking the ‘ADD’ |The system will ask the user if he/she wants | | |
| |button |to add the current selected subject, choosing | | |
| | |yes will add the subjects to the students’ | | |
| | |current subjects, adding a subject of the same| | |
| | |subjectID will result to an error. Adding more| | |
| | |than 34 u | | |
| | |nits will result in an error. | | |
|8 |Clicking the ‘Remove’ |The system will ask the user if he/she wants | | |
| |button |to remove the current selected subject at the | | |
| | |‘My subjects’ grid, choosing yes will remove | | |
| | |the subject, removing all subjects will | | |
| | |display in an error. | | |
|9 |Double clicking |The system will ask the user if he/she wants | | |
| |subjects on ‘My |to edit the current selected subject, choosing| | |
| |Subjects’ grid |yes will disable the grids, add and remove | | |
| | |buttons, and a small form will appear together| | |
| | |with the information of the current subject | | |
| | |that is going to be updated, clicking add with| | |
| | |one of the fields missing will result in an | | |
| | |error, upon success, the previous record of | | |
| | |the subject will be replaced by the current | | |
| | |entered subject and the grids, add and remove | | |
| | |buttons will be enabled. | | |
|10 |Clicking the ‘Next |The system will result in a message box error | | |
| |Page’ on Subject |stating that the user has not yet selected a | | |
| |Information button |course for the student. | | |
|11 |Checking the ‘Student |The system will show the requirements for the | | |
| |Work Scholar’ checkbox |student work scholar, upon unchecking, the | | |
| | |system will hide the student work | | |
| | |scholarship requirements. | | |
|12 |Clicking the ‘Submit’ |The system will ask the user if the | | |
| |button |information entered are correct, choosing yes | | |
| | |will store the information to the database and| | |
| | |will enable the ‘Enrollment Procedures’ | | |
| | |button, choosing yes with some of the required| | |
| | |fields missing will result in an error. | | |
|13 |Clicking the ‘Go to |The system will ask the user if he/she wants | | |
| |Enrollment Procedures’ |to go to the enrollment procedures, choosing | | |
| |button |yes will close the enrollment form and direct | | |
| | |the user to the Enrollment Procedures form. | | |
| | | | | |

Description: Enrolling regular students at the Enrollment strip.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form and| | |
| | |direct the user to the main menu. | | |
|2 |Clicking the ‘Next Page’|The system will move the tab selected to the | | |
| |Button |next tab; missing inputs on required field(s) | | |
| | |will display an error message box and put the | | |
| | |next page action on halt. | | |
|3 |Clicking the ‘Back Page’|The system will move the tab selected to the | | |
| |Button |previous tab / page. | | |
|4 |Typing at the Search |The system will find a match that is like that | | |
| |textbox |of the name of the student according to the | | |
| | |entered fields by the user; only those who are | | |
| | |not enrolled yet are seen at the Enrollment | | |
| | |grid. | | |
|5 |Double clicking students|The system will ask if that is the student that| | |
| |row at the ‘Students |the user wants to enroll, choosing yes will | | |
| |grid’ |close the grid and show the students previous | | |
| | |records. | | |
|6 |Clicking Other Tabs |The system will produce an error box and will | | |
| |while the user has not |direct the user to the student selection tab. | | |
| |yet selected a student | | | |
| |to enroll. | | | |
|7 |Clicking the ‘ADD Note’ |The system will ask if the user wants to add a | | |
| |button |note, choosing yes will display a textbox for | | |
| | |input and upon selected submit note, the | | |
| | |information is stored in a database. | | |
|6 |Clicking the ‘Subjects’ |A message box will pop out and ask if the | | |
| |Button |course and year level is correct, satisfying | | |
| | |both fields will display the students’ subjects| | |
| | |and his/her options to take, clicking the | | |
| | |subjects button with one of the two required | | |
| | |missing will result to an error. | | |
|7 |Clicking the ‘ADD’ |The system will ask the user if he/she wants to| | |
| |button |add the current selected subject, choosing yes | | |
| | |will add the subjects to the students’ current | | |
| | |subjects, adding a subject of the same | | |
| | |subjectID will result to an error. Adding more | | |
| | |than 34 units will result in an error. | | |
|8 |Clicking the ‘Remove’ |The system will ask the user if he/she wants to| | |
| |button |remove the current selected subject at the ‘My | | |
| | |subjects’ grid, choosing yes will remove the | | |
| | |subject, removing all subjects will display in | | |
| | |an error. | | |
|9 |Double clicking subjects|The system will ask the user if he/she wants to| | |
| |on ‘My Subjects’ grid |edit the current selected subject, choosing yes| | |
| | |will disable the grids, add and remove buttons,| | |
| | |and a small form will appear together with the | | |
| | |information of the current subject that is | | |
| | |going to be updated, clicking add with one of | | |
| | |the fields missing will result in an error, | | |
| | |upon success, the previous record of the | | |
| | |subject will be replaced by the current entered| | |
| | |subject and the grids, add and remove buttons | | |
| | |will be enabled. | | |
|10 |Clicking the ‘Next Page’|The system will result in a message box error | | |
| |on Subject Information |stating that the user has not yet selected a | | |
| |button |course for the student. | | |
|11 |Checking the ‘Student |The system will show the requirements for the | | |
| |Work Scholar’ checkbox |student work scholar, upon unchecking, the | | |
| | |system will hide the student work scholarship | | |
| | |requirements. | | |
|12 |Clicking the ‘Submit’ |The system will ask the user if the information| | |
| |button |entered are correct, choosing yes will store | | |
| | |the information to the database and will enable| | |
| | |the ‘Enrollment Procedures’ button, choosing | | |
| | |yes with some of the required fields missing | | |
| | |will result in an error. | | |
|13 |Clicking the ‘Go to |The system will ask the user if he/she wants to| | |
| |Enrollment Procedures’ |go to the enrollment procedures, choosing yes | | |
| |button |will close the enrollment form and direct the | | |
| | |user to the Enrollment Procedures form. | | |

Description: Finalizing student enrollment thru Enrollment Procedures at the Enrollment form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Double clicking the |The system will ask if the user wants to | | |
| |Student information in |select the current selected student, choosing | | |
| |the grid. |yes will enable the enrollment procedures. | | |
| | |Only students who are not enrolled are | | |
| | |selected from the grid | | |
|3 |Clicking the ‘Submit’ |Clicking ‘submit’ with one of the required | | |
| |button |checkbox fields uncheck will result in an | | |
| | |error. Upon success, the system will label the| | |
| | |student as ‘enrolled’ and will close the page.| | |

Description: Viewing students’ information at the Student Management Student Information form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the ‘text |The system will categorize the searching of | | |
| |category’. |student. | | |
|4 |Double clicking the |The system will ask the user if he/she wants | | |
| |students’ current |to view that student information. Choosing yes| | |
| |information. |will enable all the tabs and forms in the | | |
| | |student information and will display the | | |
| | |gathered information of the student. | | |
|5 |Clicking other tabs |The system will redirect the user to the | | |
| |with no selected |search page and a message box error will | | |
| |student. |appear. | | |

Description: Editing student information at the Student Management Student Information form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Main |The system will direct the user to the search | | |
| |Menu’ Button |page form. | | |
|2 |Clicking the ‘Edit’ |The system will enable all the text fields and| | |
| |Button |forms at the student information page and a | | |
| | |submit button will be visible at requirements | | |
| | |page. | | |
|3 |Clicking the ‘Submit’ |The system will ask the user if the | | |
| |button |information is correct, choosing yes will | | |
| | |update the previous information of the | | |
| | |student. | | |
|4 |Clicking the |The system will ask the user if he/she wants | | |
| |‘Add Note’ Button |to add a note, choosing yes will show a | | |
| | |textbox field that the user will be able to | | |
| | |enter a note. | | |
|5 |Clicking the ‘Submit |The system will ask the user if he/she wants | | |
| |Note’ |to submit the note that is entered, choosing | | |
| | |yes will add the entered text to the students | | |
| | |note. | | |

Description: Adding academic performance review for the student at the Student Management Academic Performance form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Double Clicking the |The system will show a message box asking if | | |
| |‘students’ information’|the user wants to evaluate the selected | | |
| |row |student, choosing yes will enable all the | | |
| | |fields. | | |
|3 |Clicking the ‘Submit’ |The system will ask if the user wants to | | |
| |Button |submit the information entered, choosing yes | | |
| | |with some of the required fields missing will | | |
| | |result in an error, upon success the system | | |
| | |will record the Academic performance review | | |
| | |for the student. | | |

Description: Adding Work review for the student at the Student Management Work Review form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Double Clicking |The system will show a message box asking if | | |
| |‘student information’ |the user wants to evaluate the selected | | |
| | |student, choosing yes will enable all the | | |
| | |fields. | | |
|3 |Clicking the ‘Submit’ |The system will ask if the user wants to | | |
| |Button |submit the information entered, choosing yes | | |
| | |will record the Work review for the student. | | |
| | |Clicking submit with one of the required | | |
| | |fields missing will display a message box | | |
| | |error. | | |

Description: Adding Sunday Week Report for the student at the Student Management Sunday Worship Report form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Double Clicking |The system will show a message box asking if | | |
| |‘student information’ |the user wants to evaluate the selected | | |
| | |student, choosing yes will enable all the | | |
| | |fields. | | |
|3 |Clicking the ‘Submit’ |The system will ask if the user wants to | | |
| |Button |submit the information entered, choosing yes | | |
| | |will record the Sunday Worship Report for the | | |
| | |student. | | |

Description: Navigating at the Grade and Subjects Edit Subjects form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the ‘text |The system will categorize the searching of | | |
| |category’. |student. | | |
|4 |Clicking the ‘Update’ |The system will ask the user if he/she wants | | |
| |Button |to update the selected subject. Choosing yes | | |
| | |will show the update subject form and will | | |
| | |disable all the other buttons. | | |
|5 |Clicking the ‘OK’ |The system will display a message box that | | |
| |Button at the Update |will ask the user if he/she wants to update | | |
| |subject form. |the selected subject, clicking OK with missing| | |
| | |fields will result in a message box error. | | |
| | |Upon success, the selected subject will be | | |
| | |updated by the new entered information and the| | |
| | |update subject form will be closed. | | |
|6 |Clicking the ‘Cancel’ |The system will close the update subject form | | |
| |Button at the Update |and the subjects grid will be showed, and the | | |
| |subject form. |buttons will be enabled. | | |
|7 |Clicking the ‘Add’ |The system will ask the user if he/she wants | | |
| |Button |to add a new subject. Choosing yes will show | | |
| | |the Add subject form and will disable all the | | |
| | |other buttons. | | |
|8 |Clicking the ‘OK’ |The system will display a message box that | | |
| |Button at the Add |will ask the user if he/she wants to Add the | | |
| |subject form. |entered information, clicking OK | | |
| | |with missing fields will result in a message | | |
| | |box error. Upon success, the entered | | |
| | |information will be added to the ICCM subjects| | |
| | |and the Add subject form will be closed. | | |
|9 |Clicking the ‘Delete’ |The system will ask the user if he/she wants | | |
| |Button |to delete the selected subject, choosing yes | | |
| | |will delete the selected subject. | | |
|10 |Clicking the ‘Show’ |The system will show the Update term button | | |
| |Button |and text. | | |
|11 |Clicking the ‘Close’ |The system will close the Update term button | | |
| |Button |and text. | | |
|12 |Clicking the ‘Update |The system will ask the user if he/she wants | | |
| |term’ Button |to update the current term, choosing yes will | | |
| | |ask the user if he/she is really sure of the | | |
| | |choice, Upon Choosing yes, the system will | | |
| | |change the term to the next semester and the | | |
| | |number of enrollee will be changed to zero. | | |

Description: Adding / removing of subjects at the Grades and Subjects Add / Remove Subjects form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the text in |The system will look for the students’ | | |
| |the search field. |information similar to the entered text. | | |
|3 |Double Clicking |The system will show a message box asking if | | |
| |‘student information’ |the user wants to choose the selected student,| | |
| | |choosing yes will show the students’ current | | |
| | |enrolled subjects. | | |
|4 |Clicking the ‘Add’ |The system will hide the students’ subjects | | |
| |Button |and will show the lists of subjects. | | |
|5 |Double clicking the |The system will ask the user if he/she wants | | |
| |selected subject |to add the selected subject, choosing yes will| | |
| | |add the selected subject, if the subject is | | |
| | |already added, an error message box will | | |
| | |appear saying that the subject is already | | |
| | |added. If the unit being added is more than | | |
| | |34, an error message box will appear. | | |
|6 |Clicking the ‘Add |The system will display a subjectID , | | |
| |specific’ Button |Descriptive Title and a Units text field and | | |
| | |an Add button. | | |
|7 |Clicking the ‘Add’ |The system will add the entered subjects to | | |
| |Button at the Add |the students current subject, clicking Add | | |
| |specific |with one of the fields missing will result in | | |
| | |an error message box. | | |
|8 |Clicking the ‘Back’ |The system will return to the students’ | | |
| |Button |previous page. | | |
|9 |Clicking the ‘Remove’ |The system will ask the user if he/she wants | | |
| |Button |to remove the | | |
| | |selected subject, choosing yes will remove the| | |
| | |selected subject. | | |
|10 |Clicking the ‘Search |The system will ask if the user wants to | | |
| |Again’ Button. |evaluate another student, choosing yes will | | |
| | |show the student list | | |
|11 |Clicking the ‘Save’ |The system will ask if the user wants to save | | |
| |Button. |the changes of the subjects, choosing yes will| | |
| | |save the changes made. | | |

Description: Viewing of subjects at the Grades and Subjects View Grade form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the radio |The system will sort the student information | | |
| |buttons |depending on the radio button selection. | | |
|4 |Double Clicking |The system will show a message box asking if | | |
| |‘student information’ |the user wants to view the selected student, | | |
| | |choosing yes will enable all the fields. | | |
|5 |Clicking the ‘Back’ |The system will return to the list of | | |
| |Button |students. | | |
|6 |Changing the ‘Year |The system will show the students grades based| | |
| |Level’ and ‘Sem’ Combo |on the year level and sem, choosing the year | | |
| |Box |level without grade yet will show a message. | | |

Description: Adding of subjects at the Input Grade Grading Tab.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|4 |Double Clicking |The system will show a message box asking if | | |
| |‘student information’ |the user wants to select the selected student,| | |
| | |choosing yes will direct the user to the | | |
| | |students’ grade. | | |
|5 |Clicking the ‘Back’ |The system will return to the list of | | |
| |Button |students. | | |
|6 |Clicking the ‘Save’ |The system will ask if the user wants to Add | | |
| |Button |the entered grades, Choosing yes will record | | |
| | |the grades. | | |
|7 |Clicking the ‘Search |The system will ask if the user wants to | | |
| |Again’ Button |evaluate another student, Choosing yes will | | |
| | |return the user to the student list. | | |

Description: Updating of subjects at the Update students grade tab.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the ‘text |The system will categorize the searching of | | |
| |category’. |student. | | |
|4 |Clicking the ‘Back’ |The system will return to the list of | | |
| |Button. |students. | | |
|5 |Double Clicking the |The system will show a message box asking if | | |
| |‘student information’ |the user wants to select the selected student,| | |
| | |choosing yes will direct the user to the | | |
| | |students’ grade. | | |
|6 |Changing the ‘Year |The system will show the students grades based| | |
| |Level’ and ‘Sem’ Combo |on the year level and sem, choosing the year | | |
| |Box. |level without grade yet will show a message. | | |
|7 |Double clicking the |The system will get the selected subjects’ | | |
| |student grades. |SubjectID to the Setting Grade for subject and| | |
| | |Grade to the Grade box. | | |
|8 |Changing grades at the |The system will show a collection of grades | | |
| |grade field. |from the grade field, upon choosing, the | | |
| | |selected subject grade will be updated. | | |
|9 |Clicking the ‘Update’ |The system will ask if the user wants to | | |
| |Button |update the grades, Choosing yes will update | | |
| | |the students’ grade. | | |

Description: Navigating at the Teachers information form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the professors’ | | |
| |search box. |information similar to the entered text. | | |

Description: Navigating at the Graduates and Scholarships form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the professors’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the ‘text |The system will categorize the searching of | | |
| |category’. |student. | | |
|4 |Selecting the |The system will show the list of Candidates | | |
| |‘Graduates’ Category |for graduation. | | |
|5 |Double clicking the |The system will ask the user if he/she wants | | |
| |student information. |to update that student to a Graduate student. | | |
|6 |Selecting the ‘Work |The system will show the list of Work Scholar | | |
| |Scholar’ Category |students | | |
|7 |Double clicking the |The system will ask the user if he/she wants | | |
| |student information. |to remove the work scholarship of that | | |
| | |student. | | |

INTERNATIONAL CHRISTIAN COLLEGE OF MANILA ENROLLMENT SYSTEM

Description: Logging in to the system.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Click the ‘OK’ Button |The system will check the right username and | | |
| | |password, and if the username and password | | |
| | |matched the system requirements, it will | | |
| | |proceed to the main menu. | | |
|2 |Click the ‘Exit’ Button|The system will ask the user if he/she really | | |
| | |wants to end the program. Choosing yes will | | |
| | |close the program | | |
|3 |Double clicking ‘Forgot|The system will direct you to the Forgot | | |
| |Password’ |Password form. | | |

Description: Changing user password

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking‘OK’ Button at |The system will check the user and will ask | | |
| |Enter Username |for the users PINCODE. | | |
|2 |Clicking the ‘OK’ |The system will verify the PINCODE if it is | | |
| |Button at Ask Pincode |matched, it will show the change password | | |
| | |text boxes, mismatch / wrong combination will| | |
| | |result to an error. | | |
|3 |Clicking the ‘OK’ |The system will verify the NEW PASSWORD if it| | |
| |Button at Enter New |is matched and will ask you if the password | | |
| |Password |is exact and correct, upon choosing yes, the | | |
| | |system will close the current form and will | | |
| | |direct you to the log – in form. Mismatch / | | |
| | |wrong combination of password will result to | | |
| | |an error. | | |

Description: At the main menu form and clicking the tabs.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Who Are |The system will show the ‘Who are we’ tab | | |
| |We?’ Tab | | | |
|2 |Clicking the ‘Mission’ |The system will show the ‘Mission’ tab | | |
| |Tab | | | |
|3 |Clicking the ‘Goals’ |The system will show the ‘Goals’ tab | | |
| |Tab | | | |
|4 |Clicking the |The system will show the ‘Philosophy’ tab | | |
| |‘Philosophy’ Tab | | | |
|5 |Clicking the |The system will show the ‘Philosophy’ tab | | |
| |‘Reminders’ Tab | | | |

Description: At the main menu reminder tab and setting an appointment / reminders.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Set An |The system will show a calendar. | | |
| |Appointment’ Button | | | |
|2 |Clicking a ‘date day’ |A message box asking if you want to set an | | |
| |on the calendar |appointment for that day will pop up, upon | | |
| | |choosing yes, a textbox field will show and | | |
| | |will allow you to type your appointment for a | | |
| | |specific date. | | |
|3 |Clicking the ‘save’ |The system will ask the user if they want to | | |
| |button |save that appointment, upon choosing yes, the | | |
| | |date will be saved to the database. | | |
|4 |Clicking the ‘clear’ |The system will clear the textbox field upon | | |
| |button |clicking yes. | | |
|5 |Clicking the ‘Back’ |The system will close the textbox and show the| | |
| |button |calendar at the reminder tab. | | |

Description: Entering the main menu with an appointment.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Entry on the main menu |A message box will show asking if the user | | |
| | |wants to see his/her today’s appointment, | | |
| | |choosing yes will direct the user to the | | |
| | |reminder tab showing his/her appointments, | | |
| | |choosing no will just close the message box. | | |

Description: Navigating at the menu strip Main menu.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Main Menu’|The system will direct the user to the main | | |
| |button |menu. | | |
|2 |Clicking the ‘Minimize |The system will minimize all the current forms.| | |
| |All Forms’ button | | | |
|3 |Clicking the ‘Close All |The system will ask the user if he/she wants to| | |
| |forms’ button |close all forms, choosing yes will close all | | |
| | |the current opened forms | | |
|4 |Clicking the ‘Lock’ |The system will put the program the system at | | |
| |button |lock with a password textbox. | | |
|5 |Clicking the ‘Log-Out’ |The program will ask the user if he/she wants | | |
| |button |to Log – out, choosing yes will close the main | | |
| | |menu form and show the log – in form. | | |

Description: Viewing students’ information at the Student Management Student Information form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form | | |
| | |and direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the students’ | | |
| |search box. |information similar to the entered text. | | |
|3 |Changing the ‘text |The system will categorize the searching of | | |
| |category’. |student. | | |
|4 |Double clicking the |The system will ask the user if he/she wants | | |
| |students’ current |to view that student information. Choosing yes| | |
| |information. |will enable all the tabs and forms in the | | |
| | |student information and will display the | | |
| | |gathered information of the student. | | |
|5 |Clicking other tabs |The system will redirect the user to the | | |
| |with no selected |search page and a message box error will | | |
| |student. |appear. | | |

Description: Navigating at the Teachers information form.

Execution Date: _____________ Executed by: ____________________

|Step 1 |Action |Expected System Response |Pass / Fail |comment |
|1 |Clicking the ‘Exit’ |The system will display a message box asking | | |
| |Button |the user if he/she wants to close the form, | | |
| | |choosing yes will close the enrollment form and| | |
| | |direct the user to the main menu. | | |
|2 |Changing the texts in |The system will look for the professors’ | | |
| |search box. |information similar to the entered text. | | |

Similar Documents