Sie sind auf Seite 1von 159

LAUNCHBOX: A LOCAL SOCIAL NETWORKING APPLICATION FOR STI COLLEGE MUOZ-EDSA

A Project Proposal Presented to the Faculty of STI College Muoz-EDSA

In Partial Fulfillment Of the Requirements for the Degree of Bachelor of Science in Information Technology

by:

Biglang-awa, Greggy Jhune A. Corpuz, Bethany D. Delcoro, Maryjoy Dizon, Jenina F.

Mr. Mcrey Marcelo Thesis Adviser

October 2012

Chapter I Introduction

According to Mashable, Social Networking is a platform or a website that focuses on facilitating the building of social relationship among people, who for example, share the same interest, activities, backgrounds, or real-life connection. A social network service is consists of a representation of each user (often a profile), his/her social links, and a variety of additional services. Most social network services are web-based and provide means for users to interact over the Internet such as e-mail and instant messaging. In a broader sense, social network usually means as an individual-centered service whereas community services are group-centered. [KOLN, 2009]

A recent Pew Internet study found out that 65% of young adults (50% of all adults) use social networking. Thats more than double what a similar Pew study reported in 2008 (29%); in 2005 just 8% of young adults used social media. Only email (61%) and search engines (59%) are used more now than social networks on a typical day. In general, the commonly users of social networks, though social networking is rapidly becoming more common throughout the wider population. It is still most popular among the young; students are especially overrepresented. [TERRY, 2008]

The most common reason why people nowadays are keen to use social networking is that it is the easiest way to stay in touch with old friends, friends who don't live close to you or even with roommates to be informed on recent happenings with people in your network.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application For STI College Muoz-EDSA

1.1 Statement of the problem The proponents came up with the following problems through research and observation. 1.1.1 General Problem How to develop a system that will assist the students to express their notions to their teacher or to give a suggestion/comment to the personnel of the school through private conversations. Currently, STI College Muoz-EDSA uses the manual commento box where the students drop their thoughts/comments. The associate problem with this is that some comments are not able to reach the concerned teacher. In addition, there is also a difficulty for the students to contact their instructors due to unavailability of time. 1.1.2 Specific Problems How to create a module that will hold all the

comments/suggestions given by the students. Some of the students want to give comments or suggestions to the school personnel or; however, they are timid to voice out their notions. Every week, a proctor is assigned to collect the paper that had been dropped in the comment box and will encode the comments before passing them to the school administrator.

____________________________________________________________________________ Launchbox: A Local Social Networking Application 1-2 For STI College Muoz-EDSA

The comments/suggestions given by the students will be submitted to the teachers through the administrator in order for the teacher to give their feedback. Since messages are only selected, there is a possibility that a message from a sender will not be read by the respective instructor, staff or personnel. How to create a module that will serve as a way to share information regarding events, programs, and announcement among students and teachers. Some of the students are not aware about the campus activities that result to not participating in these activities even though they have the resources. Although there is a bulletin board, students have a hard time searching for announcements, programs, or events because the announcements are posted in different parts which make them cluttered. Sometimes they are also posted on top of another announcement which makes it difficult to browse through. The campus has at least four bulletin boards; however, some announcements are not posted on the other bulletin boards around the campus thats why some students are uninformed regarding the school activities.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-3 For STI College Muoz-EDSA

How to create a module that will have an alumni profile management including the employment rate. Students do not have any idea where these alumni could be and what particular career they have at present.

How to create a module that will set private groups for the teachers and clubs as well as consultation of the students to the school personnel. Most of the time, the president of school clubs and faculty in a school campus has a hard time announcing events or sudden meeting. They tend to go and look for their respective club members and some of them are irregular students. Normally, irregular students have a different schedule that makes them hard to be found. When it comes to consultation, if students want to clarify something or to ask about certain things, some of them do not have a way to contact their professors in order to discuss their issues. Students tend to look around the campus in order to find the person they intend to talk to. If they fail to find the teacher, they will look for him/her again. This event happens frequently.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-4 For STI College Muoz-EDSA

1.2 Current State of Technology Nowadays, many communities are using website response as a tool of communication and a method of sharing information. This kind of communication system was so called Online Social Networking and websites are commonly used, such as MySpace and Facebook. Facebook is the well-known communication site to socialize, share common interest and alternative lifestyles. They simply broadcast themselves to the online world and enable people to create their own. This included reading the profile page of other members and even contacting them. The proponents develop a local social networking called Launchbox with the purpose of having a private interaction or conversation inside a community. It reflects the relation between the individual and the community which the proponents developed for STI College Muoz-EDSA. The communication of the said institution occurs in different ways. First, the students cant easily comment towards a teacher because of being timid so they keep their comments to themselves. The school uses a manual comment box where students write their comment/suggestion in a piece of paper then drop it in a box. Every week, a proctor is assigned to collect the messages. The proctor will encode the comments before passing to the school administrator. However, not all the comment/suggestions will be encoded because only the important comments/suggestions will be submitted. The

comments/suggestions given by the students will be relayed to the teachers through the administrator in order for the teacher to give his/her feedback.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-5 For STI College Muoz-EDSA

If there is any confidential issue, the administrator will conduct an investigation. If a teacher is proven guilty, he/she will undergo legal process. If not, the administrator will speak to the sender regarding the issue. Second are the consultation and the discussion about a subject matter. If the students did not comprehend a topic discussed, they have a difficulty connecting to their teachers. It is either students do not have a number of his teacher or they are oblivious regarding the schedule of an instructor. Students tend to navigate around the campus in order to find what students are looking for. Hence, consultation is important too as to clarify something. It is harder for a student to communicate if the instructor has a hectic schedule. The third one is the connection between groups and the consultation for teachers. Currently, STI College Muoz-EDSA has about six (6) clubs. Since there is no certain system that connects the whole group, there is difficulty in exchanging information among the group. Regarding the consultation, every instructor of the school has consultation hours. However, there is some incident wherein an instructor is not present at school. This leads difficulty in the part of the student to ask for consultation especially on important matters. The fourth is the information about the alumni of school. Freshmen students are not aware of the current status about the alumni. Most of them do not have any idea where these alumni could be. If they are aware about this, it will be a motivation for the students to study harder and to know what kind of career they will have in the future.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-6 For STI College Muoz-EDSA

Lastly are the announcement and events management. The school uses bulletin boards to announce events or programs. This brings difficulty to students because it is time consuming. Furthermore, some announcements are not posted on the other bulletin boards around the campus that results to the unawareness of the students about school activities. With prior issues cited, the proposed system is quiet similar to the other site of communication; however, it has features that other social networking sites not have. This is focusing in aiding the students and teachers regarding educational purposes. This proposed system is quiet similar to the other site of communication; however it has a features that other social networking does not have such as the scope of the system. This proposed system will help the students and teachers prior to educational purposes.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-7 For STI College Muoz-EDSA

1.3 Objectives 1.3.1 General Objective Generally, this study aims to develop a local social network that will assist the students of STI College Muoz- EDSA to have a private conversation with their teachers for then to express their comments/suggestions. 1.3.2. Specific Objectives To create module that will hold all the comments/suggestions given by the student. An electronic comment box, will assure that the message will be sent anonymously and it will reach the recipient. However, it will be recorded in the database as to who the sender is and when the message was sent. The student will be notified if his/her comment has been approved or has been read by the teacher. Furthermore, if a message contains foul words, the admin will decide if he/she will forward the message to the teacher. To create a module that will allow sharing of information regarding announcements, programs, and events of the school. With the use of the system, the students not need to go to bulletin boards in order to keep themselves informed. The system will allow students to be updated about the recent happenings within the school.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-8 For STI College Muoz-EDSA

Furthermore, the students or the school personnel not need to flip up the paper on the bulletin boards in order to view the entire announcements. All they have to do is to click the section where they can find the announcements. In this way, students will be informed about the recent happenings within the school.

To create a module that will be able to build private groups and will allow consultation between teachers and student. In the proposed system, the administrator is only allowed to create groups. However, he has the authority to permit a teacher or a president of a club to post on a group. Through this academic network, it will also be easier for the students to contact their teachers because it will not be time consuming and wont require much effort. With just a click, the message will be sent and it will surely received by the receiver. If there is an important matter to be discussed within a club or group, the members may be connected and they can discuss the subject matter. In consultation, the student and the teacher will be allowed to have a conversation about school-related matters or about the course the teacher teaches.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-9 For STI College Muoz-EDSA

To create a module that will have an alumni profile management including the employment rate. The proposed system will show information about the alumni of the school which includes the career they have and where they work. This will encourage students to study further, ensuring them that they will have a job after they graduate.

1.4 Scope and Limitation Launchbox, is an electronic response system and a tool used to communicate to individuals within a certain community. It is used through an intranet connection which can only be access within the community. This will only be used for educational purposes regarding any subject matter and other related concept within the school premises. Scope The proposed system is only focus on the education system within the school community and an electronic response. It also focuses on management of event and other school related activities unlike Facebook, MySpace, and other social networking sites. Launchbox is centered on academic development through building a communication among the students and teachers.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-10 For STI College Muoz-EDSA

Splash Screen- The proposed system starts with a splash screen. It includes the name of the system as well as the name of the school. After the splash screen the log-in will prompt.

Log-in Module- This module will identify the one who will use the system. In log-in, the system has three (3) access levels- administrator, faculty, and student. The log-in prompt will require the username and password for all users of the proposed system. This module has no limit when it comes to incorrect password or username. Furthermore, the administrator can access all module of the system, and is allowed to modify its contents.

Administrators Module- It is where the administrator add, edit and update both students and teachers information that will be used in the system. This can be accessed by the administrator alone.

File Maintenance- It is one of the most important modules in the proposed system. It is the periodic updating of master files and it is where the system is maintained. The following are the contents of file maintenance: User Module- It contains information about the user. Only the administrator can access this module that allows adding and editing information about the teachers, students, groups, and other school personnel.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-11 For STI College Muoz-EDSA

Group Module It allows adding or editing groups in case of changing group name and group description that is accessed by the admin. A teacher or student is also allowed to add a member in a group if permitted by the administrator.

Message Module- this holds the messages that have been sent and received. It also allows users to create messages.

Comment Module this holds all the comment that have been commented by the students.

Utilities Module- It is a software program that adds functionality to the proposed system and helps it perform better. Utilities module is designed to help analyze, configure, optimize and maintain the system. The following are the contents of utilities module: Archiving- It is a process of moving the documents from one location in a computer memory to another location in a compact format. This helps in utilizing the active memory and storing the currently active documents in the system. Help- It contains about the systems information and steps in using the system. It is a guide for users as they use the propose system.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-12 For STI College Muoz-EDSA

Limitations Though this system focuses on academic aspect, it will not feature resource sharing The system does not allow games and creating new profile since the admin will automatically create the profile of each member. Only the admin may approve the creation of separate groups if the teachers request it. The admin will also give an authority to the teachers or advisers to post in the groups that had been created. Furthermore, the administrator has the access to the whole system such as adding members, who are the students and teachers. Students are not forced to respond in a survey or give a comment against their will.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 1-13 For STI College Muoz-EDSA

CHAPTER II THEORETRICAL FRAMEWORK 2. 1 Introduction In this chapter, the proponents will discuss all about the application and theories used by the proponents in designing the structural concept of the system. Each application and theory is elucidated by the proponents in order to emphasize the significance of it. These theories helped the proponents enhance and improve the Launchbox: A Local Social Networking Application that the proponents developed. 2.2 Database Theory This encapsulates a broad range of topics related to the study and research of the theoretical realm of databases and database management systems. A central focus of database theory is on understanding the complexity and power of query languages and their connection to logic, as well as on the foundations of query optimization and database integration. 2.2.1 Database A database is a collection of information that is organized so that it can easily be accessed, managed, and updated. Computer databases typically contain aggregations of data records or files, such as sales transactions, product catalogs and inventories, and customer profiles. Typically, a database manager provides users the capabilities of controlling read/write access, specifying report generation, and analysing usage. [SEAR, 2008]

__________________________________________________________________________________ Launchbox: A Local Social Networking Applicatio n 2-1 For STI College Muoz-EDSA

The proponents used a database for manipulation of data needed in the proposed system in order to store large amount of information and to retrieve information more efficiently, more flexibly, and more creatively. 2.2.2 Database Normalization In the design of a relational database management system (RDBMS), the process of organizing data to minimize redundancy is called normalization. The goal of database normalization is to decompose relations with anomalies in order to produce smaller, well-structured relations. Normalization usually involves dividing large tables into smaller (and less redundant) tables and defining relationships between them. The objective is to isolate data so that additions, deletions, and modifications of a field can be made in just one table and then propagated through the rest of the database via the defined relationships. [WIKI, 2007] The proponents used database normalization for the purpose of data integrity. Data integrity is helpful to eliminate redundant data and to make sure that data is related. These relations make sense to the proponents and the users. It also enables the proponents to analyze the design of a relational database to see if it is bad.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-2 For STI College Muoz-EDSA

2.2.3 RDBMS A relational database management system (RDBMS) is a program that lets you create, update, and administer a relational database. Most popular commercial and open source databases currently in use are based on the relational database model. Also, DBMS in which data is stored in tables and the relationships among the data are also stored in tables. The data can be accessed or reassembled in many different ways without having to change the table forms. [WIKI, 2007] 2.2.4 MYSQL My SQL is a high performance multi user relational database management system that is today the de facts standard for database-drivers software application both on and off the web. [WIKI, 2007] The proponents used mysql because it is a widely open source database technology and data storage system. It offers reliability; it is easy to use and is secured because it has its own database to implement security. In addition, it offers highly useful function supported well by the community of users. 2.2.5 XAMPP It is a free and open source cross-platform web server solution stack package, consisting mainly of the Apache HTTP Server, MySQL database, interpreters for scripts written in PHP and Perl languages. [WIKI, 2011] and

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-3 For STI College Muoz-EDSA

The proponents used XAMPP as a development tool, for the programmers to test their work on their own computers without any access to the Internet. In addition, it is bundled up conveniently for development. 2.3 Programming Theory Programming language theory (commonly known as PLT) is a branch of computer science that deals with the design, implementation, analysis, characterization, and classification of programming languages and their individual features. It falls within the discipline of computer science, both depending on and affecting mathematics, software engineering and linguistics. It is a well-recognized branch of computer science, and an active research area, with results published in numerous journals dedicated to PLT, as well as in general computer science and engineering publications. [WIKI, 2004] 2.3.1 Visual Basic.Net It is an object-oriented programming language from Microsoft. It is the .NET version of the Visual Basic (VB) programming language. Like all .NET languages, VB.NET uses the Common Language Runtime (CLR) for program execution. VB.NET is substantially different from traditional Visual Basic, which has been the most popular language for developing Windows applications. [PCMA, 2007]

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-4 For STI College Muoz-EDSA

The proponents used Visual Basic.Net because security has become more robust in VB.NET. In addition to the role-based security in VB6, VB.NET comes with a new security model, Code Access security. This security controls on what the code can access. Also, VB.NET provides managed code execution that runs under the Common Language Runtime (CLR), resulting in robust, stable and secure applications. 2.4 Networking In information technology, networking is the construction, design, and use of a network, including the physical (cabling, hub, bridge, switch, router, and so forth), the selection and use of telecommunication protocol and computer software for using and managing the network, and the establishment of operation policies and procedures related to the network. [SEAR, 2008] 2.4.1 INTRANET An intranet is a computer network that uses Internet Protocol technology to share information, operational systems, or computing services within an organization. The term is used in contrast to internet, a network between organizations, and instead refers to a network within an organization. Sometimes, the term refers only to the organization's internal website, but may be a more extensive part of the organizations information technology
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-5 For STI College Muoz-EDSA

infrastructure, and may be composed of multiple local area networks. The objective is to organize each individual's desktop with minimal cost, time and effort to be more productive, cost efficient, timely, and competitive. [WIKI, 2007]

The LaunchBox will only be available inside the network of STI College Muoz- EDSA in order to protect the privacy and information of the students and its faculty and staff. Hence, an INTRANET setup is preferred instead of uploading it via INTERNET. Thus, this application cannot be accessed outside STI Munoz which will also avoid possibilities of data being hacked or infiltrated as this will only be available to authorized users inside the college.

2.5 Graphical User Interface This is a type of user interface that allows users to interact with electronic devices with images, rather, than text commands. GUIs can be used in computers, hand-held devices such as MP3 players, portable media players or gaming devices, household appliances and office equipment. A GUI represents the information and actions available to a user through graphical icons and visual indicators such as secondary notation, as opposed to text-based interfaces, typed command labels or text navigation. The actions are usually performed through direct manipulation of the graphical elements. [WIKI, 2007]

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-6 For STI College Muoz-EDSA

The proponents used a graphical user interface in order for the design to be user-friendly and it can be easier for the user to understand and navigate around the system. For the proponents, it frees up cognitive load and gives the proponents more mental power to focus on other important duties. 2.6 RAD (Rapid Application Development) Rapid application development is a software development methodology that uses minimal planning in favor of rapid prototyping. The "planning" of software developed using RAD is interleaved with writing the software itself. The lack of extensive preplanning generally allows software to be written much faster, and makes it easier to change requirements. [WIKI, 2007]

Requirements Planning Phase

It is the combination of elements of the system planning and systems analysis phases of the System Development Life Cycle (SDLC). Users and proponents discuss and agree on project needs, project scope, constraints, and system requirements. It ends when the team agrees on the key issues and obtains management authorization to continue.

User Design Phase

During this phase, users interact with systems analysts and develop models and prototypes that represent all system processes, inputs, and outputs.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-7 For STI College Muoz-EDSA

The RAD groups or subgroups typically use a combination of Joint Application Development (JAD) techniques and CASE tools to translate user needs into working models.

User Design is a continuous interactive process that allows users to understand, modify, and eventually approve a working model of the system that meets their needs.

Construction Phase

This phase focuses on program and application development task similar to the SDLC. In RAD, however, users continue to participate and can still suggest changes or improvements as actual screens or reports are developed. Its tasks are programming and application development, coding, unit-integration and system testing.

Cutover Phase

It resembles the final tasks in the SDLC implementation phase, including data conversion, testing, changeover to the new system, and user training. Compared with traditional methods, the entire process is compressed. As a result, the new system is built, delivered, and placed in operation much sooner. Its tasks are data conversion, full-scale testing, system changeover, user training.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-8 For STI College Muoz-EDSA

2.7 Summary This study was founded based on the theories and applications stated above that will assist the proponents to develop the system and accomplish its intention for the local social networking application. This study will help the proponents to be effective in the connecting the users within the community.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 2-9 For STI College Muoz-EDSA

CHAPTER

III

LAUNCHBOX:

LOCAL

SOCIAL

NETWORKING

APPLICATION 3.1 Introduction The system is called Launchbox: A Social Local Networking Application for STI College Muoz-EDSA. It will allow private messaging between a student and teachers for the purpose of commenting/suggesting about an issue. It also involves sharing of information among students and teachers. This chapter encompasses the tools that the proponents used in order to meet the requirements needed for the proposal to be feasible. 3.2 System Design and Specification 3.2.1 Flow Chart A flow chart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and their order by connecting these with arrows. Process operations are represented in these boxes, and arrows connecting them represent flow of control. Data flows are not typically represented in a flowchart, in contrast with data flow diagrams; rather, they are implied by the sequencing of operations. Flowcharts are used in analyzing, designing, documenting or managing a process or program in various fields. [WIKI, 2007] .

_____________________________________________________________________________ Launchbox: A Local Social Networking Application 3-1 For STI College Muoz-EDSA

The Flow Chart shows the algorithm of the process in the proposed system. It describes how the information flows from one entity to another. If the user is the admin (see Figure 1.0), it will show the activity that the admin is allowed to do in the system such as creating and viewing messages, creating or modifying announcements, setting up user accounts, and creating groups as well as assigning the groups president and adviser. Regarding comments, if its contents are confidential, the admin will conduct first an investigation before sending it to the teacher. On the other hand, if the user level is a teacher (see Figure 2.0), he is allowed to post announcement in a group by selecting the group he intends to inform, view comments, create or response to a message, and add members in a group he handles. Lastly, if the user is a student, he is allowed to create comments, view announcement, create and response to a message. However, if he is the president, he is permitted to add members in the group. 3.2.2 HIPO (Hierarchy plus Input-Process-Output) The Hierarchy plus Input-Process-Output technique is a tool for planning and/or documenting a computer program. A HIPO model consists of a hierarchy chart that graphically represents a programs control structure and a set of IPO (Input-Process-Output) charts that describe the inputs to, the outputs from, and the functions (or processes) performed by each module on the hierarchy chart. [HITA, 2004]
_____________________________________________________________________________ Launchbox: A Local Social Networking Application 3-2 For STI College Muoz-EDSA

Using the HIPO technique (see Figure 4.0), the proponents can evaluate and refine the program design, and correct flaws prior to implementation. The hierarchy chart serves as a useful planning and visualization document for the proponents to manage the program development process. This contains the forms that a user can access.

3.2.2 CFD (Context Flow Diagram) In software engineering and systems engineering, it is a diagram that represents the actors outside a system that could interact with the system. This diagram is the highest level view of a system. It is similar to a Block diagram. CFDs show a system, often software-based, as a whole and its inputs and outputs from/to external factors. [PQSW, 2004] The proponents used Context Flow Diagram (see Figure 5.0) to scope the proposed capstone as it provides a visual model of the interactions between the system and the outside entities that interface with the solution. 3.2.3 ERD (Entity Relationship Diagram) An Entity Relationship Diagram (ERD) is a snapshot of data structures. ERDs show entities in a database and relationship between tables within database. It is essential to have one of these in order to create a good database design. The patterns help focus on how the database actually works with all of the interactions and data flows. [WIKI, 2007]
_____________________________________________________________________________ Launchbox: A Local Social Networking Application 3-3 For STI College Muoz-EDSA

The proponents used an Entity Relationship Diagram (see Figure 6.0) to create a data model for the proposed system and its requirements in a top-down approach in order to utilize the database design. It contains the attributes of a certain tables along with its relationship to the other tables in the system. 3.4 Summary This chapter is about the overall design, specification, and functional requirements of the proposed system. The tools cited above were used by the proponents in order to develop the Local Social Networking Application for STI College MuozEDSA. The proponents decided to come up with this study in order to assist the students as well as the teachers to have a means of communication.

_____________________________________________________________________________ Launchbox: A Local Social Networking Application 3-4 For STI College Muoz-EDSA

CHAPTER IV

PERFORMANCE ANALYSIS

In this chapter, the experiment conducted by the proponents for system evaluation and testing for the software will be discussed. 4.1 Introduction The main objective of the proponents was to check the correctness of the software and provide guidelines for the application that may satisfy the users needs. The

proponents used the ISO 9126, an international standard for evaluating the software quality.ISO 9126 is the software product evaluation standard from the International Organization for Standardization. This international standard defines four characteristics that describe, with minimal overlap, software quality. 4.2 Experimental The proponents conducted an experiment based on the criteria of ISO 9126. The criteria used include: Functionality- It is the capability of the software to provide functions which meet the stated and implied needs of users under specified conditions of usage (what the software does to meet needs). Suitability- This is the essential Functionality characteristic and refers to the appropriateness (to specification) of the functions of the software. Security- This sub characteristic relates to unauthorized access to the software functions.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-1 For STI College Muoz-EDSA

Accurateness- This refers to the correctness of the functions. Reliability- The capability of the software product to maintain its level of performance under stated conditions for a stated period of time. Maturity- This sub characteristic is concerned with the frequency of failure of the software. Fault tolerance- The ability of software to withstand (and recover) from component or environmental failure. Recoverability- It is the ability of the software to bring back a failed system to full operation, including data and network connections. Usability-It is the capability of the software product to be understood, learned, and used and to provide visual appeal, under specified conditions of usage (the effort needed for use). Understandability- Determines the ease of which the systems functions can be understood. It relates to user mental models in Human Computer Interaction methods. Learnability- It is the learning effort for different users. Operability-This is the ability of the software to be easily operated by a given user in a given environment. Efficiency- The capability of the software product to provide desired performance, relative to the amount of resources used, under stated conditions. Time behavior- This characterizes response times for a given thru put, i.e. transaction rate.
__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-2 For STI College Muoz-EDSA

Resource behavior- This characterizes resources used, i.e. memory, CPU, disk and network usage.

Maintainability- This is the capability of the software product to be modified which may include corrections, improvements or adaptations of the software to changes in the environment and in the requirements and functional specifications (the effort needed for modification). Changeability- This characterizes the amount of effort to change a system. Stability- This characterizes the sensitivity to change of a given system to the negative impact that may be caused by system changes. Testability- This characterizes the effort needed to verify (test) a system change. Portability- It is the capability of the software product to be transferred from one environment to another. The environment may include organizational, hardware or software. Replaceability- This characterizes the plug and play aspect of software components. That is, how easy it is to exchange a given software component within a specified environment. Adaptability- This characterizes the ability of the system to change to new specifications or operating environments. Installability- This characterizes the effort required to install the software.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-3 For STI College Muoz-EDSA

4.3 Results and Analysis After conducting a series of tests, the proponents had come up with the result and analysis of the proposed system in terms of the criteria for software evaluation that the researchers used. The table below shows the result of the test: I.T Professionals Evaluation Sheet Functionality

Sub Characteristics Suitability Security Accurateness Rating:

Numerical Rating 3.4 3.8 3.4 3.5

Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

The I.T. Professionals evaluated the system. First, they checked if the system can perform a task required. Second, they determined if the system is capable of preventing unauthorized access. Lastly, they checked if the system works properly.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-4 For STI College Muoz-EDSA

Reliability

Sub Characteristics Maturity Fault tolerance Recoverability Rating:

Numerical Rating 3.8 3.0 3.4 3.4

Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

The I.T. Professionals evaluated the system. First, they checked if the system is capable of handling errors. Second, they determined if the system can resume work and lost data after failure. Lastly, they checked if most faults in the system have been eliminated over time. Usability

Sub Characteristics Understandability Learnability Operability Rating:

Numerical Rating 3.6 3.8 3.8 3.7

Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-5 For STI College Muoz-EDSA

The I.T. Professionals evaluated the system. First, they checked if the system is easy to use. Next, they examined if the terms or words used in the system are easy to understand. Lastly, they examined if the interface looks good. Efficiency Sub Characteristics Time behavior Resource behavior Rating: Numerical Rating 3.2 3.0 3.1 Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE

The I.T. Professionals evaluated the system. First, they checked the system if it is in a good performance when a large number of students are accessing the system at the same time. Lastly, they checked the system if it utilizes the resources efficiently. Maintainability

Sub Characteristics Changeability Stability Testability Rating:

Numerical Rating 3.2 3.6 4.2 3.67

Equivalent ACCEPTABLE ACCEPTABLE VERY ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-6 For STI College Muoz-EDSA

The I.T. Professionals evaluated the system. First, they checked if the system continues functioning if changes are made. Next, they assessed if the system can be tested easily. And lastly, they checked if the system can be easily modified. Portability

Sub Characteristics Replaceability Adaptability Installability Rating:

Numerical Rating 3.4 3.2 4.0 3.53

Equivalent ACCEPTABLE ACCEPTABLE VERY ACCEPTABLE ACCEPTABLE

The I.T. Professionals evaluated the system. First, they checked if the system can be moved to other environment. Second, they tested if the system can be easily installed. Lastly, they checked if the system will be easily replaced by other software.

Total Rating: 3.5 + 3.4 + 3.7 + 3.1 + 3.67 + 3.53 6 = 3.48 (ACCEPTABLE)

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-7 For STI College Muoz- EDSA

End Users Evaluation Sheet Functionality

Sub Characteristics Suitability Security Accurateness Rating:

Numerical Rating 3.2 3.6 4.0 3.6

Equivalent ACCEPTABLE ACCEPTABLE VERY ACCEPTABLE ACCEPTABLE

The End Users evaluated the system. First, they checked if the system prevents unauthorized access. Next, they assessed if the system can provide an accurate output when a button was clicked. Lastly, they tested if the system can perform the tasks required. Reliability

Sub Characteristics Maturity Fault tolerance Recoverability Rating:

Numerical Rating 3.8 3.6 3.6 3.67

Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-8 For STI College Muoz-EDSA

The End Users evaluated the system. First, they checked if the system can be easily recovered when it failed to operate. Next, they tested if the system is capable of handling errors. Lastly, they checked if the system has an ability to withstand software breakdown. Usability

Sub Characteristics Understandability Learnability Operability Rating:

Numerical Rating 4.0 4.4 3.6 4.0

Equivalent VERY ACCEPTABLE VERY ACCEPTABLE ACCEPTABLE VERY ACCEPTABLE

The End Users evaluated the system. First, they check if the interface of the system looks good. Second, if the system can be use without too much effort. Lastly, if the words or terms used are easy to understand. Efficiency Sub Characteristics Time behavior Resource behavior Rating: Numerical Rating 3.2 3.4 3.3 Equivalent ACCEPTABLE ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-9 For STI College Muoz-EDSA

The End Users evaluated the system. First, they checked if the system can utilize efficiently. They also assessed if the system has an acceptable level of performance when large numbers of students are accessing the system at the same time. Maintainability

Sub Characteristics Changeability Stability Testability Result:

Numerical Rating 4.0 3.2 3.2 3.47

Equivalent VERY ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

The End Users evaluated the system. First, they checked if the system can easily identify the causes of failures. Next, they tested if the system can withstand unexpected side effects due to modification. And lastly, they checked if the system is capable of an easy modification. Portability

Sub Characteristics Replaceability Adaptability Installability Rating:

Numerical Rating 3.2 3.2 4.0 3.47

Equivalent ACCEPTABLE ACCEPTABLE VERY ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-10 For STI College Muoz-EDSA

The End Users evaluated the system. First, they checked if the system is suitable in any place and any time. Next, they assessed if the system can be installed easily. And lastly, they checked if the system can easily replace other software. Total Rating: 3.6 + 3.67 + 4.0 + 3.3 + 3.47 + 3.47 6 = 3.59 (ACCEPTABLE)

4.4 Summary After developing the system, the information gathered, analyzed and tabulated would determine the level of perception of the overall performance of the system. In the Results and Analysis, the proponents used ISO 9126 for software testing and evaluation in order to establish the accuracy of the system that will be adopted to solve the problems in the existing system. Typically, this experiment is useful in measuring and controlling software procedure. These ISO 9126 criteria are separated in six (6): Functionality, Usability, Maintainability, Efficiency, Reliability, and Portability. This kind of criteria was used in the system to test or evaluate the output performance of the system. After the system has been tested, all expected results had overcome the problem of the system. The IT Expert evaluated the Launchbox: A Social Networking Application based on the criteria of ISO 9196 such as Functionality = 3.5, Usability = 3.7, Maintainability = 3.67, Portability = 3.53, Efficiency = 3.1 and Reliability = 3.4.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-11 For STI College Muoz-EDSA

The total Graded Average Rating (GWA) was 3.48, which was equal to acceptable rate. On the other hand, the End User Evaluation results were: Functionality = 3.6, Usability = 4.0, Maintainability = 3.47, Portability = 3.47, Efficiency = 3.3 and Reliability = 3.67. The total Graded Average Rating (GWA) is 3.59, which was also equal to acceptable rate. Below are the overall average evaluation criteria of IT Expert and End User, who tested the system.

Criteria Functionality Reliability Usability Efficiency Maintainability Portability Total

Average 3.55 3.53 3.85 3.2 3.57 3.5 3.53

Remark ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE ACCEPTABLE

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-12 For STI College Muoz-EDSA

Based on data analysis, the findings were identified to include: User- friendliness. The respondents perceived that the software is accessible, the software instructions are easy to follow, the system can accommodate all users, and users can easily use the system without any hazard of conflict. Error-handling. The respondents perceived that the software error handling can handle incorrect inputs, and all kinds of errors. It can also generate fast execution of the different user invokes. Design. The respondents perceived that the design is appropriate to the system, is attractive and is easy to update for future revision. Security. The respondents perceived that the security is accessible by a username and password, and it will not accept unauthorized user and password.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application 4-13 For STI College Muoz-EDSA

CHAPTER V CONCLUSION

The main objective of this study was to have a local social network that will assist the students of STI College Muoz-EDSA to have a private conversation with their teachers as for them to give comments/suggestions. After the completion, the latest system was proficient to augment the students, teacher, and staff in learning the Launchbox: A Local Social Networking Application. It significantly gave support to the students, teachers, and staff in giving comments, forming private groups as well as consultation, alumni viewing including the respective work status, and viewing announcements and events. The proposed system was formulated and evaluated under its functionality, maintainability, reliability, efficiency, portability, and usability. The accomplishments of the intentions prepared were considered pleasant and creative. Furthermore, students, teachers and staff are benefited because they may share pertinent information through Launchbox: A Local Social Networking Application. The implementation of the system after the turnover will

contribute to the attainment of the objectives, mission and vision of the school premises. RECOMMENDATION Future researchers are encouraged to use this study as a reference and that the system can be enhanced in terms of its category, content, graphics etc. and can be used to reduce the problems during the course of the development of the system.

__________________________________________________________________________________ Launchbox: A Local Social Networking Application For STI College Muoz-EDSA

ACKNOWLEDGEMENT

This study would not have been possible without the guidance and the help of several individuals who in one way or another contributed and extended their valuable assistance in the preparation and completion of this study.

First and foremost, our utmost gratitude to Mr. McRey Marcelo, for his unselfish and unfailing support as our thesis adviser;

Mr. Roel Almera, Mr. Billie Boy de Leon, and Mr. Archie Sabe, for their patience and insights they have shared to complete this study as well as to Ms. Ma. Vanna Banigoos, for her patience in correcting the grammar of this study;

The staff of STI College Muoz-EDSA especially to Ms. Cherry Lou for accommodating us in giving the necessary information we needed;

EmCloatz, our friends, who were very supportive from the very beginning despite that we were in the same situation;

Mrs. Jocelyn Delcoro, for accommodating us in her house for almost a one week stays during the course of developing the system;

Last but not the least, our families and the one above all of us, the omnipresent God, for answering our prayers and for giving us the strength and hope that we needed to move on despite our wanting to give up and throw in the towel, thank you so much Dear Lord Jesus Christ.

Bibliography (http://en.wikipedia.org/wiki/Social_network_service) (http://en.wikipedia.org/wiki/Facebook) (http://terrya.edublogs.org/2008/03/17/networks-versus-groups-in-highereducation/#more-90) (http://www.ewenger.com/pub/index.htm.) (http://www.smashingmagazine.com/2009/06/03/9-crucial-ui-features-of-social-mediaand-networking-sites) (http://www.socialhubnotes.com/category/social-networking/) (www. Slideshare.net: mickstravellin/universal-mccann-international-social-mediaresearch-wave-3) (http://mashable.com/follow/topics/social-networking/) (http://en.wikipedia.org/wiki/Social_network) (http://restaurantbriefing.com/2012/01/who-uses-social-networking-sites/) (http://www.businessinsider.com/a-comprehensive-look-at-who-uses-social-networksand-how-2010-6?op=1#ixzz201T5gOs9) (http://www.businessinsider.com/a-comprehensive-look-at-who-uses-social-networksand-how-2010-6?op=1)

(http://www.readwriteweb.com/archives/who_uses_social_networks_and_what_are_they _like_part_1.php)

Others: Metodoloki zvezki, Vol. 3, No. 2, 2006, 185-216 2011 International Conference on Telecommunication Technology and Applications Proc .of CSIT vol.5 (2011) (2011) IACSIT Press, Singapore

Appendix A (List of Figures)

Figure 1.0

Figure 2.0 Flow Chart

Figure 3.0 Flow Chart

0.0 LAUNCHBOX: Local Social Networking Application


1.0 Login/Splash Screen 2.0 Announcements/Events Management

3.0 Admin
3.1 File Maintenance 3.1.1 Admin Profile 3.1.2 User Accounts 3.1.3 Announcements/ Events 3.1.4 Faculty Profile 3.1.5 Student Profile 3.1.6 Groupings 3.1.6.1 Department 3.1.6.2 Alumni 3.1.6.3 Organization

4.0 Faculty
4.1 Faculty Profile

5.0 Student
5.1 Student Profile

4.2 Messages

5.2 Messages

4.3 Commento Box 4.4 View Student Profile

5.3 Commento Box 5.4 Announcement/ Events

4.5 Announcement/ Events

5.5 Organization

4.6 Organization

5.6 Alumni

4.7 Alumni

5.7 Help

3.1.7 Messages 3.1.8 Commento Box

4.8 Help

3.1.9 Audit Trail

Figure 4.0 HIPO (Hierarchical Input-Process-Output) Chart

3.1.10 Help

Figure 5.0 CONTEXT FLOW DIAGRAM (CFD)

Appendix B (Resource Person)

Resource Person

Mr. McRey Marcelo Thesis Adviser O9339103873

Mr. Billie Boy de Leon Thesis Coordinator

Ms. Ma. Vanna Banigoos English Adviser 09277420064

STI College Munoz Edsa Tanco-cu Bldg., EDSA, Quezon City 920-8645 / 927-3970 http://www.stimunoz.edu.ph

Appendix C (Screen Shots)

Log-In

Administrator Main Form

Administrator Profile

File Maintenance

User Accounts Teacher

Student

Staff

Others Department

Program

Organization

Alumni

Announcement

Pending Approval Organization

Accounts

Activate Account Teacher

Student

Staff

Teachers Main Form

Teachers Profile

Students Main Form

Student Profile

Inbox

Comments

Create Comment

Change Password

View Alumni Profile

Groups

Request Organization

Appendix D (Evaluation Form)

LAUNCHBOX: A LOCAL SOCIAL NETWORKING APPLICATION FOR STI COLLEGE MUOZ-EDSA

I.T. Expert Evaluation Sheet Name: Date: 5 = Highly acceptable 4 = Very acceptable 3 = Acceptable 2 = Fairly Acceptable 1 = Not acceptable

Indicators A. Maintainability 1. Does the system continue to function even if changes are made? 2. Can the system be tested easily? 3. Can the system be easily modified? B. Portability 1. Can the software be moved to other environment? 2. Can the software be installed easily? 3. Can the software easily replace other software? C. Usability 1. Do you easily comprehend how to use the system? 2. Can you use the system without much effort? 3. Does the interface look good? D. Functionality 1. Can the system perform the tasks required? 2. Does the system prevent unauthorized access? 3. Is the result as expected? E. Reliability 1. Is the software capable of handling errors? 2. Can the software resume working & restore lost data after failure? 3. Have most of the faults in the software been eliminated overtime? F. Efficiency 1. Does the system have an acceptable level of performance when large numbers of students are accessing the system at the same time? 2. Does the system utilize resources efficiently?

5 4 3 2 1

_____________________ Signature

LAUNCHBOX: A LOCAL SOCIAL NETWORKING APPLICATION FOR STI COLLEGE MUOZ-EDSA

End User Evaluation Sheet Name: Date: 5 = Highly acceptable 4 = Very acceptable 3 = Acceptable 2 = Fairly Acceptable 1 = Not acceptable

Indicators A. Maintainability 1. Can the system easily identify the cause of failure? 2. Can the system withstand unexpected side effects due to modification? 3. Is the system capable for an easy modification? B. Portability 1. Is it suitable in any place and anytime? 2. Can the system be installed easily? 3. Can the software easily replace other software? C. Usability 1. Does the interface look good? 2. Can you use the system without much effort? 3. Can you easily comprehend how to use the system easily? D. Functionality 1. Does the system prevent unauthorized access? 2. Does the system provide an accurate output when a button was clicked? 3. Can the system perform the tasks required? E. Reliability 1. Does the system easily recover when it failed to operate? 2. Is the system capable of handling errors? 3. Does the system have the ability to withstand softwares breakdown? F. Efficiency 1. Does the system utilize resources efficiently? 2. Does the system have an acceptable level of performance when large numbers of students are accessing the system at the same time?

3 2 1

_____________________ Signature

Appendix E (Source Code)

Module Imports MySql.Data.MySqlClient Imports System.Data Imports System.Drawing.Image Imports System.IO Module Module1 Public sqlcon As MySqlConnection Public sqlda As MySqlDataAdapter Public ds As DataSet 'Logging Public userID As String Public userName As String Public userLevel As String 'Viewing Public ViewID As String Public ViewLevel As String 'Group Public GroupID As String Public Sub ManipulateMySQL(ByRef sQuery As String) 'Client 'sqlcon = New MySqlConnection("server=rolydz-PC; UID=UserName; Password=12345; Database=launchbox") 'Server sqlcon = New MySqlConnection("Server = localhost; UID=root ;Database=launchbox") sqlcon.Open() ds = New DataSet sqlda = New MySqlDataAdapter(sQuery, sqlcon) sqlda.Fill(ds) sqlcon.Close() End Sub Public Sub InsertPicture(ByRef sQuery As String, ByRef PicCon As PictureBox) Dim ms As MemoryStream = New MemoryStream PicCon.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg) Dim bytBLOBData(ms.Length - 1) As Byte ms.Position = 0 ms.Read(bytBLOBData, 0, ms.Length) Dim prm As New MySql.Data.MySqlClient.MySqlParameter("@BLOBData", MySql.Data.MySqlClient.MySqlDbType.Blob, bytBLOBData.Length, ParameterDirection.Input, False, 0, 0, Nothing, DataRowVersion.Current, bytBLOBData) Dim ConnectionString As String = "Server = localhost; UID=root ;Database=launchbox" Dim myConnection As New MySqlConnection(ConnectionString) Dim myCommand As New MySqlCommand(sQuery) myCommand.Connection = myConnection myCommand.Parameters.Add(prm) myConnection.Open() myCommand.ExecuteNonQuery() myConnection.Close() End Sub Public Sub ClearFields(ByRef con As GroupBox)

For Each x As Control In con.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Text = Nothing End If Next End Sub Public Sub EnableFields(ByRef en As Boolean, ByRef con As GroupBox) For Each x As Control In con.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Or TypeOf x Is RadioButton Then x.Enabled = en End If Next End Sub End Module LOG-IN Imports System.Net Public Class Login Dim dset As New DataSet Private Sub btnlogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnlogin.Click ManipulateMySQL("SELECT * FROM tbl_UserAccount WHERE Username='" & Replace(txtUsername.Text, "'", "''") & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then If dset.Tables(0).Rows(0).Item("Password").ToString = txtPassword.Text Then If dset.Tables(0).Rows(0).Item(5).ToString = "Active" Then userID = dset.Tables(0).Rows(0).Item(4).ToString userLevel = dset.Tables(0).Rows(0).Item(3).ToString txtUsername.Text = Nothing txtPassword.Text = Nothing txtUsername.Focus() If userLevel.ToString = "Administrator" Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID = '" & userID & "'") dset = ds userName = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString AnnouncementAdmin.ShowDialog() ElseIf userLevel = "Teacher" Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID = '" & userID & "'") dset = ds userName = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString AnnouncementTeacher.ShowDialog() ElseIf userLevel = "Staff" Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID = '" & userID & "'") dset = ds

userName = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString AnnouncementTeacher.ShowDialog() Else If dset.Tables(0).Rows(0).Item(0).ToString = "Rejected" Then MsgBox("Your account has been rejected. Please fill-up with appropriate information") ManipulateMySQL("DELETE FROM tbl_UserAccount WHERE USername='" & userName & "'") ManipulateMySQL("DELETE FROM tbl_StudentInfo WHERE StudentID='" & userID & "'") ElseIf dset.Tables(0).Rows(0).Item(0).ToString = "No" Then MsgBox("Your account has not been approve yet. Please check it later") Else ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID = '" & userID & "'") dset = ds userName = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString AnnouncementStudent.ShowDialog() End If End If Else MsgBox("Your account is deactivated") End If Else MsgBox("Incorrect password") txtPassword.Focus() End If Else MsgBox("Invalid Username/Password!", MsgBoxStyle.OkOnly) txtUsername.Focus() End If txtPassword.Text = Nothing End Sub Private Sub txtUsername_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUsername.KeyPress, txtPassword.KeyPress If Asc(e.KeyChar) = 13 Then btnlogin_Click(btnlogin, System.EventArgs.Empty) End If End Sub Private Sub btnexit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnexit.Click End End Sub Private Sub Login_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load GroupBox1.Top = (Me.Height - GroupBox1.Height) / 2 GroupBox1.Left = (Me.Width - GroupBox1.Width) / 2 'Dim myname As String 'Dim myip As String

'Try ' ComboBox1.Items.AddRange(Dns.GetHostAddresses(Dns.GetHostName)) ' myname = Dns.GetHostName ' myip = ComboBox1.Items.Item(2).ToString 'Catch ex As Exception ' ComboBox1.Items.AddRange(Dns.GetHostAddresses(Dns.GetHostName)) ' myname = Dns.GetHostName ' myip = ComboBox1.Items.Item(1).ToString 'End Try End Sub Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked SignUp.ShowDialog() End Sub End Class

Announcement admin Public Class AnnouncementAdmin Dim dset As DataSet Private Sub AnnouncementAndEventManagementToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AnnouncementAndEventManagementToolStripMenuItem.Click AnnouncementMaintenance.ShowDialog() End Sub Private Sub STudentToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles STudentToolStripMenuItem.Click StudentAccountMaintenance.ShowDialog() End Sub Private Sub TeacherToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TeacherToolStripMenuItem.Click TeacherAccountMaintenance.ShowDialog() End Sub Private Sub StaffToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StaffToolStripMenuItem.Click StaffAccountMaintenance.ShowDialog() End Sub Private Sub OrganizationToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OrganizationToolStripMenuItem.Click OrganizationMaintenance.ShowDialog() End Sub Private Sub ProgramMaintenanceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProgramMaintenanceToolStripMenuItem.Click ProgramMaintenance.ShowDialog() End Sub Private Sub DepartmentMaintenanceToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DepartmentMaintenanceToolStripMenuItem.Click DepartmentMaintenance.ShowDialog()

End Sub Private Sub RequestToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RequestToolStripMenuItem.Click PendingOrganization.ShowDialog() End Sub Private Sub AccountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AccountToolStripMenuItem.Click PendingAccount.ShowDialog() End Sub Private Sub CommentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommentsToolStripMenuItem.Click PendingComments.ShowDialog() End Sub Private Sub MessagesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MessagesToolStripMenuItem.Click MessageBox.ShowDialog() End Sub Private Sub AlumniToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlumniToolStripMenuItem.Click AlumniMaintenance.ShowDialog() End Sub Private Sub MessagesToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MessagesToolStripMenuItem1.Click MessageLogs.ShowDialog() End Sub Private Sub MyProfileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyProfileToolStripMenuItem.Click MainAdmin.ShowDialog() End Sub Private Sub LogOutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem.Click Me.Close() End Sub Private Sub ChangePasswordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordToolStripMenuItem.Click ChangePassword.ShowDialog() End Sub Private Sub AnnouncementAdmin_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated AnnouncementAdmin_Load(sender, e) End Sub Private Sub AnnouncementAdmin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT Title, Contents, DateStart, DateEnd FROM tbl_Announcement") dset = ds

dgvAnnouncement.DataSource = dset.Tables(0) lblATitle.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(0).Value lblADateStart.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(2).Value lblADateEnd.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(3).Value txtAContent.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(1).Value txtBrowse.Text = "" LoadBirthday() LoadNotification() End Sub Private Sub LoadNotification() lstNotification.Items.Clear() ManipulateMySQL("SELECT count(*) FROM tbl_Message WHERE Receiver = 'Administrator' and Flag = '0'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Unread Message(s)") End If ManipulateMySQL("SELECT count(*) FROM tbl_Comments WHERE Flag = '0'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Unread Comment(s)") End If ManipulateMySQL("SELECT count(*) FROM tbl_Group WHERE Status = 'Inactive'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Pending organization(s) request") End If ManipulateMySQL("SELECT count(*) FROM tbl_UserAccount WHERE Approve = 'No'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Pending account(s) request") End If End Sub Private Sub LoadBirthday() lstBirthday.Items.Clear() lstBDayID.Items.Clear() ManipulateMySQL("SELECT Firstname,Lastname,StudentID FROM tbl_StudentInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,TeacherID FROM tbl_TeacherInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1

lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,StaffID FROM tbl_StaffInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,AdminID FROM tbl_Administrator WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub Private Sub dgvAnnouncement_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) lblATitle.Text = dgvAnnouncement.SelectedCells(0).Value lblADateStart.Text = dgvAnnouncement.SelectedCells(2).Value lblADateEnd.Text = dgvAnnouncement.SelectedCells(3).Value txtAContent.Text = dgvAnnouncement.SelectedCells(1).Value End Sub Private Sub txtBrowse_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBrowse.KeyPress If Asc(e.KeyChar) = 13 Then If txtBrowse.Text <> Nothing Then lstBrowse.Items.Clear() lstBrowseID.Items.Clear() ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID = StudentID WHERE (Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "') and Approve = 'Yes'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_TeacherInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1

lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT StaffID,Firstname,Lastname FROM tbl_StaffInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next lstBrowse.Visible = True End If End If End Sub Private Sub txtBrowse_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBrowse.TextChanged If txtBrowse.Text = " " Then txtBrowse.Text = "" End If lstBrowse.Visible = False End Sub Private Sub lstBrowse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstBrowse.SelectedIndexChanged ManipulateMySQL("SELECT Username FROM tbl_TeacherInfo inner join tbl_UserAccount on RefUserID=TeacherID WHERE TeacherID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Teacher" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID=StudentID WHERE StudentID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Student" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_StaffInfo inner join tbl_UserAccount on RefUserID=StaffID WHERE StaffID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Staff" End If End If ViewID = dset.Tables(0).Rows(0).Item(0).ToString If ViewLevel = "Teacher" Then ViewingTeacher.ShowDialog() ElseIf ViewLevel = "Student" Then ViewingStudent.ShowDialog() End If End Sub

Private Sub ActivateAccountToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActivateAccountToolStripMenuItem.Click ActivateStudentAccount.ShowDialog() End Sub Private Sub ActivateAccountToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActivateAccountToolStripMenuItem1.Click ActivateTeacherAccount.ShowDialog() End Sub Private Sub ActivateAccountToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ActivateAccountToolStripMenuItem2.Click ActivateStaffAccount.ShowDialog() End Sub Private Sub dgvAnnouncement_CellContentClick_1(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvAnnouncement.CellContentClick lblATitle.Text = dgvAnnouncement.SelectedCells(0).Value lblADateStart.Text = dgvAnnouncement.SelectedCells(2).Value lblADateEnd.Text = dgvAnnouncement.SelectedCells(3).Value txtAContent.Text = dgvAnnouncement.SelectedCells(1).Value End Sub Private Sub lstNotification_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstNotification.DoubleClick If lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Unread Message(s)" Then MessageBox.ShowDialog() ElseIf lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Unread Comment(s)" Then PendingComments.ShowDialog() ElseIf lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Pending organization(s) request" Then PendingOrganization.ShowDialog() ElseIf lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Pending account(s) request" Then PendingAccount.ShowDialog() End If End Sub End Class File Maintenance (Staff Account) Public Class ModifyStaffInfo Dim dset As DataSet Dim gender As String = "Male" Private Sub btnAContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAContact.Click AddContact.ShowDialog() End Sub Private Sub btnRContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRContact.Click If lstMobile.Text = Nothing Then MsgBox("Select item first") Else ManipulateMySQL("UPDATE tbl_MobileNo SET Status='DELETE' WHERE User='" & userID & "' and MobileNo='" & lstMobile.Text & "'")

EditTeacherInfo_Load(sender, New System.EventArgs) End If End Sub Private Sub EditTeacherInfo_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated EditTeacherInfo_Load(sender, New System.EventArgs) End Sub Private Sub EditTeacherInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT * FROM tbl_StaffInfo WHERE StaffID='" & userID & "'") dset = ds txtFName.Text = dset.Tables(0).Rows(0).Item(1).ToString txtMName.Text = dset.Tables(0).Rows(0).Item(2).ToString txtLName.Text = dset.Tables(0).Rows(0).Item(3).ToString cmbPosition.Text = dset.Tables(0).Rows(0).Item(4).ToString DTP1.Value = dset.Tables(0).Rows(0).Item(5).ToString If RadioButton1.Text = dset.Tables(0).Rows(0).Item(6).ToString Then RadioButton1.Checked = True Else RadioButton2.Checked = True End If cmbDepartment.Text = dset.Tables(0).Rows(0).Item(7).ToString txtLocation.Text = dset.Tables(0).Rows(0).Item(8).ToString txtRView.Text = dset.Tables(0).Rows(0).Item(9).ToString txtFQuotation.Text = dset.Tables(0).Rows(0).Item(10).ToString txtAboutMe.Text = dset.Tables(0).Rows(0).Item(11).ToString lstMobile.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Mobileno WHERE User='" & userID & "' and Status='Old'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobile.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next lstHobby.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE User='" & userID & "' and Status='Old'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstHobby.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub btnAHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAHobby.Click AddHobby.ShowDialog() End Sub Private Sub btnRHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRHobby.Click If lstMobile.Text = Nothing Then MsgBox("Select item first")

Else ManipulateMySQL("UPDATE tbl_Hobbies SET Status='DELETE' WHERE User='" & userID & "' and Hobby='" & lstHobby.Text & "'") EditTeacherInfo_Load(sender, New System.EventArgs) End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='New' and User='" & userID & "'") Me.Close() End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click For Each x As Control In Me.Controls If TypeOf x Is TextBox Then If x.Name = "txtMName" Or x.Name = "txtLocation" Or x.Name = "txtRView" Or x.Name = "txtFQuotation" Or x.Name = "txtAboutMe" Then Else If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If End If End If Next ManipulateMySQL("UPDATE tbl_StaffInfo SET FName='" & txtFName.Text & "',MName='" & txtMName.Text & "',LName='" & txtLName.Text & "',Position='" & cmbPosition.Text & "',Birthday='" & DTP1.Value & "',Gender='" & gender & "',Department='" & cmbDepartment.Text & "',Location='" & Replace(txtLocation.Text, "'", "''") & "',ReligousView='" & Replace(txtRView.Text, "'", "''") & "',FaveQuotation='" & Replace(txtFQuotation.Text, "'", "''") & "',AboutMe='" & Replace(txtAboutMe.Text, "'", "''") & "' WHERE StaffID='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='New' and User='" & userID & "'") MsgBox("Account modified") Me.Close() End Sub Private Sub cmbPosition_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbPosition.KeyPress, cmbDepartment.KeyPress e.Handled = True End Sub

Private Sub txtFName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFName.KeyPress, txtMName.KeyPress, txtLName.KeyPress If (Asc(e.KeyChar) > 64 And Asc(e.KeyChar) < 91) Or (Asc(e.KeyChar) > 96 And Asc(e.KeyChar) < 123) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then 'nothing Else e.KeyChar = Nothing End If End Sub Private Sub ModifyTeacherInfo_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged, RadioButton2.Click gender = sender.text End Sub End Class Student Account Imports System.IO Public Class ModifyStudentInfo Dim dset As DataSet Dim gender As String = "Male" Private Sub btnAContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAContact.Click AddContact.ShowDialog() End Sub Private Sub btnRContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRContact.Click If lstMobile.Text = Nothing Then MsgBox("Select item first") Else ManipulateMySQL("UPDATE tbl_MobileNo SET Status='DELETE' WHERE User='" & userID & "' and MobileNo='" & lstMobile.Text & "'") ModifyStudentInfo_Load(sender, New System.EventArgs) End If End Sub Private Sub EditTeacherInfo_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated ModifyStudentInfo_Load(sender, New System.EventArgs) End Sub Private Sub ModifyStudentInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT * FROM tbl_StudentInfo WHERE StudentID='" & userID & "'") dset = ds txtFName.Text = dset.Tables(0).Rows(0).Item("Firstname").ToString

txtMName.Text = dset.Tables(0).Rows(0).Item("Middlename").ToString txtLName.Text = dset.Tables(0).Rows(0).Item("Lastname").ToString cmbProgram.Text = dset.Tables(0).Rows(0).Item("Program").ToString If dset.Tables(0).Rows(0).Item("Birthday").ToString <> "" Then DTP1.Value = dset.Tables(0).Rows(0).Item("Birthday").ToString End If If RadioButton1.Text = dset.Tables(0).Rows(0).Item("Gender").ToString Then RadioButton1.Checked = True Else RadioButton2.Checked = True End If txtLocation.Text = dset.Tables(0).Rows(0).Item("Location").ToString txtRView.Text = dset.Tables(0).Rows(0).Item("ReligousView").ToString txtFQuotation.Text = dset.Tables(0).Rows(0).Item("FaveQuotation").ToString txtAboutMe.Text = dset.Tables(0).Rows(0).Item("AboutMe").ToString Dim imgByteArray As Byte() = Nothing imgByteArray = dset.Tables(0).Rows(0).Item("Picture") Dim myImage As Image Dim imgMemoryStream As MemoryStream = New MemoryStream() 'Byte[] to image imgMemoryStream = New IO.MemoryStream(imgByteArray) myImage = Drawing.Image.FromStream(imgMemoryStream) PictureBox1.Image = myImage lstMobile.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Mobileno WHERE User='" & userID & "' and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobile.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next lstHobby.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE User='" & userID & "' and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstHobby.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub btnAHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAHobby.Click AddHobby.ShowDialog() End Sub Private Sub btnRHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRHobby.Click If lstHobby.Text = Nothing Then MsgBox("Select item first") Else ManipulateMySQL("UPDATE tbl_Hobbies SET Status='DELETE' WHERE User='" & userID & "' and Hobby='" & lstHobby.Text & "'") ModifyStudentInfo_Load(sender, New System.EventArgs)

End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='New' and User='" & userID & "'") Me.Close() End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click For Each x As Control In Me.Controls If TypeOf x Is TextBox Then If x.Name = "txtMName" Or x.Name = "txtLocation" Or x.Name = "txtRView" Or x.Name = "txtFQuotation" Or x.Name = "txtAboutMe" Then Else If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If End If End If Next InsertPicture("UPDATE tbl_StudentInfo SET Picture=@BLOBData WHERE StudentID='" & userID & "'", PictureBox1) ManipulateMySQL("UPDATE tbl_StudentInfo SET FirstName='" & txtFName.Text & "',MiddleName='" & txtMName.Text & "',LastName='" & txtLName.Text & "',Program='" & cmbProgram.Text & "',Birthday='" & DTP1.Value & "',Gender='" & gender & "',Location='" & Replace(txtLocation.Text, "'", "''") & "',ReligousView='" & Replace(txtRView.Text, "'", "''") & "',FaveQuotation='" & Replace(txtFQuotation.Text, "'", "''") & "',AboutMe='" & Replace(txtAboutMe.Text, "'", "''") & "' WHERE StudentID='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='New' and User='" & userID & "'") MsgBox("Account modified") Me.Close() End Sub Private Sub cmbPosition_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbProgram.KeyPress e.Handled = True End Sub

Private Sub txtFName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFName.KeyPress, txtMName.KeyPress, txtLName.KeyPress If (Asc(e.KeyChar) > 64 And Asc(e.KeyChar) < 91) Or (Asc(e.KeyChar) > 96 And Asc(e.KeyChar) < 123) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then 'nothing Else e.KeyChar = Nothing End If End Sub Private Sub ModifyStudentInfo_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged, RadioButton2.Click gender = sender.text End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter End Sub Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName <> "" Then PictureBox1.ImageLocation = OpenFileDialog1.FileName End If End Sub End Class Teacher Account Imports System.Drawing.Image Imports System.IO Public Class ModifyTeacherInfo Dim dset As DataSet Dim gender As String = "Male" Private Sub btnAContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAContact.Click AddContact.ShowDialog() End Sub Private Sub btnRContact_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRContact.Click If lstMobile.Text = Nothing Then MsgBox("Select item first") Else ManipulateMySQL("UPDATE tbl_MobileNo SET Status='DELETE' WHERE User='" & userID & "' and MobileNo='" & lstMobile.Text & "'") EditTeacherInfo_Activated(sender, e)

End If End Sub Private Sub EditTeacherInfo_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated lstMobile.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Mobileno WHERE User='" & userID & "' and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobile.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next lstHobby.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE User='" & userID & "'and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstHobby.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub EditTeacherInfo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT * FROM tbl_TeacherInfo inner join tbl_UserAccount on RefUserID=TeacherID WHERE TeacherID='" & userID & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT * FROM tbl_Administrator inner join tbl_UserAccount on RefUserID=AdminID WHERE AdminID='" & userID & "'") dset = ds End If If dset.Tables(0).Rows(0).Item("UserLevel").ToString = "Administrator" Then cmbDepartment.Enabled = False cmbPosition.Enabled = False Else cmbDepartment.Enabled = True cmbPosition.Enabled = True End If

txtFName.Text = dset.Tables(0).Rows(0).Item(1).ToString txtMName.Text = dset.Tables(0).Rows(0).Item(2).ToString txtLName.Text = dset.Tables(0).Rows(0).Item(3).ToString cmbPosition.Text = dset.Tables(0).Rows(0).Item(4).ToString If dset.Tables(0).Rows(0).Item(5).ToString <> "" Then DTP1.Value = dset.Tables(0).Rows(0).Item(5).ToString End If If RadioButton1.Text = dset.Tables(0).Rows(0).Item(6).ToString Then RadioButton1.Checked = True Else RadioButton2.Checked = True End If cmbDepartment.Text = dset.Tables(0).Rows(0).Item(7).ToString txtLocation.Text = dset.Tables(0).Rows(0).Item(8).ToString txtRView.Text = dset.Tables(0).Rows(0).Item(9).ToString

txtFQuotation.Text = dset.Tables(0).Rows(0).Item(10).ToString txtAboutMe.Text = dset.Tables(0).Rows(0).Item(11).ToString Dim imgByteArray As Byte() = Nothing imgByteArray = dset.Tables(0).Rows(0).Item("Picture") Dim myImage As Image Dim imgMemoryStream As MemoryStream = New MemoryStream() 'Byte[] to image imgMemoryStream = New IO.MemoryStream(imgByteArray) myImage = Drawing.Image.FromStream(imgMemoryStream) PictureBox1.Image = myImage lstMobile.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Mobileno WHERE User='" & userID & "' and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobile.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next lstHobby.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE User='" & userID & "'and Status <> 'DELETE'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstHobby.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub btnAHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAHobby.Click AddHobby.ShowDialog() End Sub Private Sub btnRHobby_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRHobby.Click If lstHobby.Text = Nothing Then MsgBox("Select item first") Else ManipulateMySQL("UPDATE tbl_Hobbies SET Status='DELETE' WHERE User='" & userID & "' and Hobby='" & Replace(lstHobby.Text, "'", "''") & "'") EditTeacherInfo_Activated(sender, e) End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='DELETE' and User='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='New' and User='" & userID & "'")

Me.Close() End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click For Each x As Control In Me.Controls If TypeOf x Is TextBox Then If x.Name = "txtMName" Or x.Name = "txtLocation" Or x.Name = "txtRView" Or x.Name = "txtFQuotation" Or x.Name = "txtAboutMe" Then Else If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If End If End If Next If userLevel = "Teacher" Then InsertPicture("UPDATE tbl_TeacherInfo SET Picture=@BLOBData WHERE TeacherID='" & userID & "'", PictureBox1) ManipulateMySQL("UPDATE tbl_TeacherInfo SET FirstName='" & txtFName.Text & "',MiddleName='" & txtMName.Text & "',LastName='" & txtLName.Text & "',Department='" & cmbDepartment.Text & "',Birthday='" & DTP1.Value & "',Gender='" & gender & "',Location='" & Replace(txtLocation.Text, "'", "''") & "',ReligousView='" & Replace(txtRView.Text, "'", "''") & "',FaveQuotation='" & Replace(txtFQuotation.Text, "'", "''") & "',AboutMe='" & Replace(txtAboutMe.Text, "'", "''") & "' WHERE TeacherID='" & userID & "'") ElseIf userLevel = "Staff" Then InsertPicture("UPDATE tbl_StaddInfo SET Picture=@BLOBData WHERE StaffID='" & userID & "'", PictureBox1) ManipulateMySQL("UPDATE tbl_StaffInfo SET FirstName='" & txtFName.Text & "',MiddleName='" & txtMName.Text & "',LastName='" & txtLName.Text & "',Deparment='" & cmbDepartment.Text & "',Birthday='" & DTP1.Value & "',Gender='" & gender & "',Location='" & Replace(txtLocation.Text, "'", "''") & "',ReligousView='" & Replace(txtRView.Text, "'", "''") & "',FaveQuotation='" & Replace(txtFQuotation.Text, "'", "''") & "',AboutMe='" & Replace(txtAboutMe.Text, "'", "''") & "' WHERE StaffID='" & userID & "'") Else InsertPicture("UPDATE tbl_Administrator SET Picture=@BLOBData WHERE AdminID='" & userID & "'", PictureBox1) ManipulateMySQL("UPDATE tbl_Administrator SET FirstName='" & txtFName.Text & "',MiddleName='" & txtMName.Text & "',LastName='" & txtLName.Text & "',Department='" & cmbDepartment.Text & "',Birthday='" & DTP1.Value & "',Gender='" & gender & "',Location='" & Replace(txtLocation.Text, "'", "''") & "',ReligousView='" & Replace(txtRView.Text, "'", "''") & "',FaveQuotation='" & Replace(txtFQuotation.Text, "'", "''") & "',AboutMe='" & Replace(txtAboutMe.Text, "'", "''") & "' WHERE AdminID='" & userID & "'") End If ManipulateMySQL("DELETE FROM tbl_MobileNo WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("DELETE FROM tbl_Hobbies WHERE Status='DELETE' and User ='" & userID & "'") ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE Status='New' and User='" & userID & "'") ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Status='New' and User='" & userID & "'") MsgBox("Profile Updated!") Me.Close() End Sub

Private Sub cmbPosition_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbPosition.KeyPress, cmbDepartment.KeyPress e.Handled = True End Sub Private Sub txtFName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFName.KeyPress, txtMName.KeyPress, txtLName.KeyPress If (Asc(e.KeyChar) > 64 And Asc(e.KeyChar) < 91) Or (Asc(e.KeyChar) > 96 And Asc(e.KeyChar) < 123) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then 'nothing Else e.KeyChar = Nothing End If End Sub Private Sub ModifyTeacherInfo_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged, RadioButton2.Click gender = sender.text End Sub Private Sub btnBrowse_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBrowse.Click OpenFileDialog1.ShowDialog() If OpenFileDialog1.FileName <> "" Then PictureBox1.ImageLocation = OpenFileDialog1.FileName End If End Sub End Class Organization Maintenance Public Class OrganizationMaintenance Dim dset As DataSet Dim blnk As String = "" Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click If btnNew.Text = "New" Then btnNew.Text = "Save" btnModify.Enabled = False btnDeactivate.Enabled = False ClearField() txtIdenttify.Focus() EnableFields(True) Else ManipulateMySQL("SELECT GroupID FROM tbl_Group WHERE GroupID = '" & Replace(txtIdenttify.Text, "'", "''") & "'") dset = ds If dset.Tables(0).Rows.Count <> 0 Then

MsgBox("Group identity is already recorded") Exit Sub ElseIf cmbAdviser1.Text = "" Or txtIdenttify.Text = "" Or txtDescription.Text = "" Or txtName.Text = "" Or cmbPresident.Text = "" Then MsgBox("Please fill all required fields") Exit Sub Else If cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text <> "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Adviser2,Adviser3,Name1,N ame2,Name3,Status)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''") & "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "','" & cmbAID3.Items(cmbAdviser3.SelectedIndex) & "','" & cmbAdviser1.Text & "','" & cmbAdviser2.Text & "','" & cmbAdviser3.Text & "','Active')") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text = "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Adviser2,Name1,Name2,Stat us)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''") & "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "','" & cmbAdviser1.Text & "','" & cmbAdviser2.Text & "','Active')") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text = "" And cmbAdviser3.Text = "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Name1,Status)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''") & "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAdviser1.Text & "','Active')") End If MsgBox("Group has been successfully added") SetGMember() End If SetDefault() End If End Sub Private Sub SetDefault() lstMember.Items.Clear() btnNew.Enabled = True btnModify.Enabled = True btnDeactivate.Enabled = True btnNew.Text = "New" btnModify.Text = "Modify" ClearField() EnableFields(False) RefreshRecord() ManipulateMySQL("SELECT GroupID,GroupName,President,Name1 as 'Adviser 1',Name2 as 'Adviser 2',Name3 as 'Adviser 3' FROM tbl_Group") dset = ds dgvOrganization.DataSource = dset.Tables(0) End Sub Private Sub ClearField() For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Text = ""

End If Next End Sub Private Sub cmbAdviser1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbAdviser1.KeyPress, cmbAdviser2.KeyPress, cmbAdviser3.KeyPress e.Handled = True End Sub Private Sub txtDescription_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDescription.KeyPress, txtName.KeyPress, txtIdenttify.KeyPress If Not (Char.IsLetter(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32) Then e.KeyChar = Nothing End If End Sub Private Sub txtDescription_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtDescription.TextChanged, txtIdenttify.TextChanged, txtName.TextChanged If sender.text = " " Then sender.text = "" End If End Sub Private Sub RefreshRecord() cmbAdviser1.Items.Clear() cmbAdviser2.Items.Clear() cmbAdviser3.Items.Clear() cmbAID1.Items.Clear() cmbAID2.Items.Clear() cmbAID3.Items.Clear() cmbAdviser1.Items.Add(blnk) cmbAdviser2.Items.Add(blnk) cmbAdviser3.Items.Add(blnk) cmbAID1.Items.Add(blnk) cmbAID2.Items.Add(blnk) cmbAID3.Items.Add(blnk) ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_TeacherInfo ORDER BY Firstname ASC") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbAID1.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAID2.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAID3.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAdviser1.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) cmbAdviser2.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) cmbAdviser3.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub

Private Sub OrganizationMaintenance_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetDefault() ManipulateMySQL("SELECT GroupID,GroupName,President,Name1 as 'Adviser 1',Name2 as 'Adviser 2',Name3 as 'Adviser 3' FROM tbl_Group WHERE Status='Active'") dset = ds dgvOrganization.DataSource = dset.Tables(0) End Sub Private Sub EnableFields(ByRef en As Boolean) For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Enabled = en End If Next End Sub Private Sub cmbPresident_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbPresident.DropDown cmbPresident.Items.Clear() cmbPID.Items.Clear() cmbPresident.Items.Add(blnk) cmbPID.Items.Add(blnk) ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_StudentInfo WHERE Firstname like '" & Replace(cmbPresident.Text, "'", "''") & "%' or Lastname='" & Replace(cmbPresident.Text, "'", "''") & "%' ORDER BY Firstname ASC") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbPID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbPresident.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub Private Sub cmbAdviser2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser2.SelectedIndexChanged If cmbAdviser1.Enabled = True Then If cmbAdviser1.Text <> "" Then If cmbAdviser2.Text = cmbAdviser1.Text Then MsgBox("Adviser is already selected") cmbAdviser2.Text = "" Else cmbAID2.Text = cmbAID2.Items(cmbAdviser2.SelectedIndex) End If Else cmbAdviser2.Text = "" MsgBox("Please select adviser 1") End If End If End Sub Private Sub cmbAdviser3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser3.SelectedIndexChanged If cmbAdviser1.Enabled = True Then If cmbAdviser2.Text <> "" Then

If cmbAdviser1.Text = cmbAdviser3.Text Or cmbAdviser2.Text = cmbAdviser3.Text Then MsgBox("Adviser is already selected") cmbAdviser3.Text = "" Else cmbAID3.Text = cmbAID3.Items(cmbAdviser3.SelectedIndex) End If Else cmbAdviser3.Text = "" MsgBox("Please select adviser 2") End If End If End Sub Private Sub dgvOrganization_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvOrganization.CellContentClick ManipulateMySQL("SELECT * FROM tbl_Group WHERE GroupID = '" & dgvOrganization.SelectedCells.Item(0).Value & "'") dset = ds txtIdenttify.Text = dset.Tables(0).Rows(0).Item("GroupID").ToString txtName.Text = dset.Tables(0).Rows(0).Item("GroupName").ToString txtDescription.Text = dset.Tables(0).Rows(0).Item("Description").ToString cmbPresident.Text = dset.Tables(0).Rows(0).Item("President").ToString cmbPID.Text = dset.Tables(0).Rows(0).Item("PresidentID").ToString cmbAdviser1.Text = dset.Tables(0).Rows(0).Item("Name1").ToString cmbAdviser2.Text = dset.Tables(0).Rows(0).Item("Name2").ToString cmbAdviser3.Text = dset.Tables(0).Rows(0).Item("Name3").ToString cmbAID1.Text = dset.Tables(0).Rows(0).Item("Adviser1").ToString cmbAID2.Text = dset.Tables(0).Rows(0).Item("Adviser2").ToString cmbAID3.Text = dset.Tables(0).Rows(0).Item("Adviser3").ToString End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click If txtIdenttify.Text <> "" Then If btnModify.Text = "Modify" Then btnModify.Text = "Update" btnNew.Enabled = False btnDeactivate.Enabled = False EnableFields(True) txtIdenttify.Enabled = False Else If cmbAdviser1.Text = "" Or txtIdenttify.Text = "" Or txtDescription.Text = "" Or txtName.Text = "" Or cmbPresident.Text = "" Then MsgBox("Please fill all required fields") Exit Sub Else If cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text <> "" Then ManipulateMySQL("UPDATE tbl_Group SET GroupName='" & txtName.Text & "',Description='" & Replace(txtDescription.Text, "'", "''") & "',PresidentID='" & cmbPID.Text & "',President='" & cmbPresident.Text & "',Adviser1='" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "',Adviser2='" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "',Adviser3='" & cmbAID3.Items(cmbAdviser3.SelectedIndex) & "',Name1='" & cmbAdviser1.Text & "',Name2='" & cmbAdviser2.Text & "',Name3='" & cmbAdviser3.Text & "' WHERE GroupID ='" & txtIdenttify.Text & "'") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text = "" Then

ManipulateMySQL("UPDATE tbl_Group SET GroupName='" & txtName.Text & "',Description='" & Replace(txtDescription.Text, "'", "''") & "',PresidentID='" & cmbPID.Text & "',President='" & cmbPresident.Text & "',Adviser1='" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "',Adviser2='" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "',Adviser3='" & "" & "',Name1='" & cmbAdviser1.Text & "',Name2='" & cmbAdviser2.Text & "',Name3='" & "" & "' WHERE GroupID ='" & txtIdenttify.Text & "'") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text = "" And cmbAdviser3.Text = "" Then ManipulateMySQL("UPDATE tbl_Group SET GroupName='" & txtName.Text & "',Description='" & Replace(txtDescription.Text, "'", "''") & "',PresidentID='" & cmbPID.Text & "',President='" & cmbPresident.Text & "',Adviser1='" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "',Adviser2='" & "" & "',Adviser3='" & "" & "',Name1='" & cmbAdviser1.Text & "',Name2='" & "" & "',Name3='" & "" & "' WHERE GroupID ='" & txtIdenttify.Text & "'") End If SetGMember() MsgBox("Group has been successfully added") End If SetDefault() End If Else MsgBox("Select record first") End If End Sub Private Sub cmbAdviser1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser1.SelectedIndexChanged cmbAID1.Text = cmbAID1.Items(cmbAdviser1.SelectedIndex) End Sub Private Sub cmbPresident_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPresident.SelectedIndexChanged cmbPID.Text = cmbPID.Items(cmbPresident.SelectedIndex) End Sub Private Sub btnDeactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeactivate.Click If txtIdenttify.Text <> "" Then Dim ans As MsgBoxResult = MsgBox("Do you really want to delete this record?", MsgBoxStyle.YesNoCancel) If ans = MsgBoxResult.Yes Then ManipulateMySQL("DELETE FROM tbl_Group WHERE GroupID = '" & txtIdenttify.Text & "'") ManipulateMySQL("DELETE FROM tbl_GroupMember WHERE RefGroupID = '" & txtIdenttify.Text & "'") ManipulateMySQL("DELETE FROM tbl_GroupConversation WHERE RefGroupID = '" & txtIdenttify.Text & "'") MsgBox("Record deleted") End If Else MsgBox("Select record first") End If End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click SetDefault() End Sub

Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub SetGMember() lstMember.Items.Clear() ManipulateMySQL("SELECT PresidentID,Adviser1,Adviser2,Adviser3,GroupID FROM tbl_Group") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("President") End With With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With If dset.Tables(0).Rows(x).Item(2).ToString <> "" Then With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With End If If dset.Tables(0).Rows(x).Item(3).ToString <> "" Then With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(3).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With End If Next ManipulateMySQL("DELETE FROM tbl_GroupMember WHERE Level <> 'Member'") For x = 0 To lstMember.Items.Count - 1 ManipulateMySQL("INSERT INTO tbl_GroupMember(RefUserID,RefGroupID,Level)VALUES('" & lstMember.Items(x).SubItems.Item(0).Text & "','" & lstMember.Items(x).SubItems.Item(1).Text & "','" & lstMember.Items(x).SubItems.Item(2).Text & "')") Next End Sub End Class Active Organization Public Class ActivateOrganization Dim dset As DataSet Private Sub txtGroup_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtGroup.TextChanged ManipulateMySQL("SELECT * FROM tbl_GroupID WHERE GroupID like '" & txtGroup.Text & "%' and Status='Deactive' ORDER BY GroupID ASC") dset = ds lstBrowse.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 With lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString)

End With Next End Sub Private Sub lstBrowse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstBrowse.Click If lstActivate.Items.Count > 0 Then For x = 0 To lstActivate.Items.Count - 1 If lstBrowse.SelectedItems(0).Text = lstActivate.Items(x).Text Then lstActivate.Items.RemoveAt(x) Exit Sub End If Next End If With lstActivate.Items.Add(lstBrowse.SelectedItems(0).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(1).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(2).Text) End With End Sub Private Sub btnDeactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeactivate.Click If lstActivate.Items.Count = 0 Then MsgBox("Nothing to deactivate") Else For x = 0 To lstActivate.Items.Count - 1 ManipulateMySQL("UPDATE tbl_Group SET Status='Active' WHERE GroupID='" & lstActivate.Items(x).Text & "'") Next MsgBox("Account(s) deactivated") End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub DeactivateStudentAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtGroup.Text = Nothing End Sub Private Sub ActivateOrganization_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Active Staff Account Public Class ActivateStaffAccount Dim dset As DataSet Private Sub txtUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUser.TextChanged

ManipulateMySQL("SELECT * FROM tbl_UserAccount WHERE (Username like '" & txtUser.Text & "%' or RefUserID like '" & txtUser.Text & "%') and Status='Inactive' and Userlevel='Staff' ORDER BY Username ASC") dset = ds lstBrowse.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 With lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next End Sub Private Sub lstBrowse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstBrowse.Click If lstActivate.Items.Count > 0 Then For x = 0 To lstActivate.Items.Count - 1 If lstBrowse.SelectedItems(0).Text = lstActivate.Items(x).Text Then lstActivate.Items.RemoveAt(x) Exit Sub End If Next End If With lstActivate.Items.Add(lstBrowse.SelectedItems(0).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(1).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(2).Text) End With End Sub Private Sub btnActivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivate.Click If lstActivate.Items.Count = 0 Then MsgBox("Nothing to activate") Else For x = 0 To lstActivate.Items.Count - 1 ManipulateMySQL("UPDATE tbl_UserAccount SET Status='Active' WHERE RefUserID='" & lstActivate.Items(x).Text & "'") Next MsgBox("Account(s) Activated") DeactivateStudentAccount_Load(sender, New System.EventArgs) End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub DeactivateStudentAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtUser.Text = Nothing lstActivate.Items.Clear() End Sub Private Sub ActivateStaffAccount_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

Me.WindowState = FormWindowState.Normal End Sub End Class Active Student Account Public Class ActivateStudentAccount Dim dset As DataSet Private Sub txtUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUser.TextChanged ManipulateMySQL("SELECT * FROM tbl_UserAccount WHERE (Username like '" & txtUser.Text & "%' or RefUserID like '" & txtUser.Text & "%') and Status='Inactive' and Userlevel='Student' ORDER BY Username ASC") dset = ds lstBrowse.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 With lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next End Sub Private Sub lstBrowse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstBrowse.Click If lstActivate.Items.Count > 0 Then For x = 0 To lstActivate.Items.Count - 1 If lstBrowse.SelectedItems(0).Text = lstActivate.Items(x).Text Then lstActivate.Items.RemoveAt(x) Exit Sub End If Next End If With lstActivate.Items.Add(lstBrowse.SelectedItems(0).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(1).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(2).Text) End With End Sub Private Sub btnActivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivate.Click If lstActivate.Items.Count = 0 Then MsgBox("Nothing to activate") Else For x = 0 To lstActivate.Items.Count - 1 ManipulateMySQL("UPDATE tbl_UserAccount SET Status='Active' WHERE RefUserID='" & lstActivate.Items(x).Text & "'") Next MsgBox("Account(s) Activated") DeactivateStudentAccount_Load(sender, New System.EventArgs) End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub

Private Sub DeactivateStudentAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtUser.Text = Nothing txtUser_TextChanged(sender, e) lstActivate.Items.Clear() End Sub Private Sub ActivateStudentAccount_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Active Teacher Account Public Class ActivateTeacherAccount Dim dset As DataSet Private Sub txtUser_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtUser.TextChanged ManipulateMySQL("SELECT * FROM tbl_UserAccount WHERE (Username like '" & txtUser.Text & "%' or RefUserID like '" & txtUser.Text & "%') and Status='Inactive' and Userlevel='Teacher' ORDER BY Username ASC") dset = ds lstBrowse.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 With lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next End Sub Private Sub lstBrowse_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstBrowse.Click If lstActivate.Items.Count > 0 Then For x = 0 To lstActivate.Items.Count - 1 If lstBrowse.SelectedItems(0).Text = lstActivate.Items(x).Text Then lstActivate.Items.RemoveAt(x) Exit Sub End If Next End If With lstActivate.Items.Add(lstBrowse.SelectedItems(0).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(1).Text) .SubItems.Add(lstBrowse.SelectedItems(0).SubItems.Item(2).Text) End With End Sub Private Sub btnActivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnActivate.Click If lstActivate.Items.Count = 0 Then MsgBox("Nothing to activate") Else For x = 0 To lstActivate.Items.Count - 1 ManipulateMySQL("UPDATE tbl_UserAccount SET Status='Active' WHERE RefUserID='" & lstActivate.Items(x).Text & "'")

Next MsgBox("Account(s) Activated") DeactivateStudentAccount_Load(sender, New System.EventArgs) End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub DeactivateStudentAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtUser.Text = Nothing txtUser_TextChanged(sender, e) lstActivate.Items.Clear() End Sub Private Sub ActivateTeacherAccount_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Adding Contact Public Class AddContact Dim dset As DataSet Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click Me.Close() End Sub Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click ManipulateMySQL("SELECT * FROM tbl_MobileNo WHERE MobileNo='" & txtMobileNo.Text & "' and User='" & userID & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Mobile number is already recorded") Exit Sub 'ManipulateMySQL("UPDATE tbl_MobileNo SET Status='Old' WHERE MobileNo='" & txtMobileNo.Text & "'") Else ManipulateMySQL("INSERT INTO tbl_MobileNo(MobileNo,User,Status)VALUES('" & Replace(txtMobileNo.Text, "'", "''") & "','" & userID & "','New')") End If Me.Close() End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtMobileNo.KeyPress If (Asc(e.KeyChar) > 47 And Asc(e.KeyChar) < 58) Or Asc(e.KeyChar) = 43 Or Asc(e.KeyChar) = 8 Then ElseIf Asc(e.KeyChar) = 13 Then Call btnOk_Click(sender, e)

Else e.KeyChar = Nothing End If End Sub Private Sub AddContact_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtMobileNo.Text = Nothing End Sub Private Sub AddContact_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub txtMobileNo_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtMobileNo.TextChanged If txtMobileNo.Text = " " Then txtMobileNo.Text = Nothing End If End Sub End Class Adding Hobby Public Class AddHobby Dim dset As DataSet Private Sub btnOk_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOk.Click ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE Hobby='" & Replace(txtHobby.Text, "'", "''") & "' and User='" & userID & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Hobby is already recorded") Exit Sub 'ManipulateMySQL("UPDATE tbl_Hobbies SET Status='Old' WHERE Hobby='" & txtHobby.Text & "'") Else ManipulateMySQL("INSERT INTO tbl_Hobbies(Hobby,User,Status)VALUES('" & Replace(txtHobby.Text, "'", "''") & "','" & userID & "','New')") End If Me.Close() End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click Me.Close() End Sub Private Sub AddHobby_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load txtHobby.Text = Nothing End Sub Private Sub AddHobby_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize

Me.WindowState = FormWindowState.Normal End Sub Private Sub txtHobby_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtHobby.KeyPress If Char.IsLetter(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then ElseIf Asc(e.KeyChar) = 13 Then Call btnOk_Click(sender, e) Else e.KeyChar = Nothing End If End Sub Private Sub txtHobby_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtHobby.TextChanged If txtHobby.Text = " " Then txtHobby.Text = Nothing End If End Sub End Class Adding Group Member Public Class AddGroupMember Dim dset As DataSet Dim recipient As String Dim id As String Private Sub AddRecipient_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub AddRecipient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Public Sub setDefault() cmbID.Items.Clear() cmbName.Items.Clear() cmbID.Text = Nothing cmbName.Text = Nothing End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If cmbName.Text = Nothing Then MsgBox("Nothing to add") Exit Sub Else For x = 0 To GroupProfile.lstMember.Items.Count - 1

If id = GroupProfile.lstMemberID.Items(x) Then MsgBox("Member is already joined") setDefault() Exit Sub End If Next ManipulateMySQL("INSERT INTO tbl_GroupMember(RefGroupID,RefUserID,Level)VALUES('" & GroupProfile.lblIdentity.Text & "','" & id & "','Member')") GroupProfile.lstMemberID.Items.Add(id) GroupProfile.lstMember.Items.Add(recipient) Me.Close() End If End Sub Private Sub cmbName_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbName.DropDown If cmbName.Text Like " " Then cmbName.Text = Nothing Else ManipulateMySQL("SELECT StudentID,Firstname,Middlename,Lastname FROM tbl_UserAccount inner join tbl_StudentInfo on RefUserID=StudentID WHERE (Firstname like '%" & cmbName.Text & "%' or Middlename like '%" & cmbName.Text & "%' or Lastname like '%" & cmbName.Text & "%' or Username like '%" & cmbName.Text & "%') and Approve='Yes' and Status='Active'") dset = ds cmbName.Items.Clear() cmbID.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString & " " & dset.Tables(0).Rows(x).Item(3).ToString) Next ManipulateMySQL("SELECT TeacherID,Firstname,Middlename,Lastname FROM tbl_UserAccount inner join tbl_TeacherInfo on RefUserID=TeacherID WHERE (Firstname like '%" & cmbName.Text & "%' or Middlename like '%" & cmbName.Text & "%' or Lastname like '%" & cmbName.Text & "%' or Username like '%" & cmbName.Text & "%') and Approve='Yes' and Status='Active' and TeacherID <> 'Administrator'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString & " " & dset.Tables(0).Rows(x).Item(3).ToString) Next ManipulateMySQL("SELECT StaffID,Firstname,Middlename,Lastname FROM tbl_UserAccount inner join tbl_StaffInfo on RefUserID=StaffID WHERE (Firstname like '%" & cmbName.Text & "%' or Middlename like '%" & cmbName.Text & "%' or Lastname like '%" & cmbName.Text & "%' or Username like '%" & cmbName.Text & "%') and Approve='Yes' and Status='Active'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString & " " & dset.Tables(0).Rows(x).Item(3).ToString) Next End If

End Sub Private Sub cmbName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbName.KeyPress If Char.IsLetter(e.KeyChar) = True Or (Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32) Then Else e.KeyChar = Nothing End If End Sub Private Sub cmbName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbName.SelectedIndexChanged id = cmbID.Items(cmbName.SelectedIndex) recipient = cmbName.Items(cmbName.SelectedIndex) End Sub Private Sub AddRecipient_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Adding Recipient Public Class AddRecipient Dim dset As DataSet Dim recipient As String Dim id As String Private Sub AddRecipient_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub AddRecipient_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Public Sub setDefault() cmbID.Items.Clear() cmbName.Items.Clear() cmbID.Text = Nothing cmbName.Text = Nothing End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click If cmbName.Text = Nothing Then MsgBox("Nothing to add") Exit Sub Else

For x = 0 To MessageBox.lstRecipient.Items.Count - 1 If id = MessageBox.lstRecipientID.Items(x) Then MsgBox("Recipient is already added") setDefault() Exit Sub End If Next MessageBox.lstRecipientID.Items.Add(id) MessageBox.lstRecipient.Items.Add(recipient) Me.Close() End If End Sub Private Sub cmbName_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbName.DropDown If cmbName.Text Like " " Then cmbName.Text = Nothing Else ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_UserAccount inner join tbl_StudentInfo on RefUserID=StudentID WHERE (Firstname like '" & cmbName.Text & "' or Lastname like '" & cmbName.Text & "' or Username like '" & cmbName.Text & "') and Approve='Yes' and Status='Active'") dset = ds cmbName.Items.Clear() cmbID.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_UserAccount inner join tbl_TeacherInfo on RefUserID=TeacherID WHERE (Firstname like '" & cmbName.Text & "' or Lastname like '" & cmbName.Text & "' or Username like '" & cmbName.Text & "') and Approve='Yes' and Status='Active'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT StaffID,Firstname,Lastname FROM tbl_UserAccount inner join tbl_StaffInfo on RefUserID=StaffID WHERE (Firstname like '" & cmbName.Text & "' or Lastname like '" & cmbName.Text & "' or Username like '" & cmbName.Text & "') and Approve='Yes' and Status='Active'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbName.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next End If End Sub Private Sub cmbName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbName.KeyPress If Char.IsLetter(e.KeyChar) = True Or (Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32) Then

Else e.KeyChar = Nothing End If End Sub Private Sub cmbName_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbName.SelectedIndexChanged id = cmbID.Items(cmbName.SelectedIndex) recipient = cmbName.Items(cmbName.SelectedIndex) End Sub Private Sub AddRecipient_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Announcement Maintenance Public Class AnnouncementMaintenance Dim dset As DataSet Private Sub setDefault() txtContent.Text = Nothing txtTitle.Text = Nothing txtTitle.Focus() txtTitle.Enabled = False dtpStart.Enabled = False dtpEnd.Enabled = False txtContent.Enabled = False btnNew.Text = "New" btnModify.Text = "Modify" btnNew.Enabled = True btnModify.Enabled = True btnDelete.Enabled = True dtpStart.Value = Format(Now, "M/d/yyyy") dtpEnd.Value = Format(Now, "M/d/yyyy") ManipulateMySQL("SELECT Title,Contents,DateStart,DateEnd FROM tbl_Announcement") dset = ds dgvAnnouncement.DataSource = dset.tables(0) End Sub Private Sub btnPost_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) If txtTitle.Text = Nothing Or txtContent.Text = Nothing Then MsgBox("Please fill all fields") Else ManipulateMySQL("INSERT INTO tbl_Announcement(Title,DateStart,Contents)VALUES('" & Replace(txtTitle.Text, "'", "''") & "','" & Format(Now, "MMMM dd,yyyy") & "','" & Replace(txtContent.Text, "'", "''") & "')") MsgBox("Announcement/Event has been posted") setDefault() End If End Sub

Private Sub txtContent_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtContent.TextChanged, txtTitle.TextChanged If txtContent.Text = " " Then sender.Text = Nothing End If End Sub Private Sub NewAnnouncement_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Private Sub NewAnnouncement_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click If btnNew.Text = "New" Then btnNew.Text = "Save" btnModify.Enabled = False btnDelete.Enabled = False txtTitle.Enabled = True dtpStart.Enabled = True dtpEnd.Enabled = True txtContent.Enabled = True txtTitle.Text = "" txtContent.Text = "" dtpStart.Value = Format(Now, "M/d/yyyy") dtpEnd.Value = Format(Now, "M/d/yyyy") Else If txtTitle.Text = "" Or txtContent.Text = "" Then MsgBox("Please fill all required fields") Else ManipulateMySQL("INSERT INTO tbl_Announcement(Title,DateStart,DateEnd,Contents)VALUES('" & Replace(txtTitle.Text, "'", "''") & "','" & Format(dtpStart.Value, "M/d/yyyy") & "','" & Format(dtpEnd.Value, "M/d/yyyy") & "','" & Replace(txtContent.Text, "'", "''") & "')") MsgBox("Announcement has been posted") setDefault() End If End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click If txtTitle.Text = "" Then MsgBox("Please select an announcement first") Else

If btnModify.Text = "Modify" Then btnModify.Text = "Update" btnNew.Enabled = False btnDelete.Enabled = False dtpStart.Enabled = True dtpEnd.Enabled = True txtContent.Enabled = True Else If txtTitle.Text = "" Or txtContent.Text = "" Then MsgBox("Please fill all required fields") Else ManipulateMySQL("UPDATE tbl_Announcement SET DateStart='" & Format(dtpStart.Value, "M/d/yyyy") & "',DateEnd='" & Format(dtpEnd.Value, "M/d/yyyy") & "',Contents='" & Replace(txtContent.Text, "'", "''") & "' WHERE Title='" & Replace(txtTitle.Text, "'", "''") & "'") MsgBox("Announcement has been updated") setDefault() End If End If End If End Sub Private Sub dgvAnnouncement_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvAnnouncement.CellContentClick If btnDelete.Enabled = True Then txtTitle.Text = dgvAnnouncement.SelectedCells.Item(0).Value dtpStart.Value = dgvAnnouncement.SelectedCells.Item(2).Value dtpEnd.Text = dgvAnnouncement.SelectedCells.Item(3).Value txtContent.Text = dgvAnnouncement.SelectedCells.Item(1).Value End If End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click setDefault() End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click ManipulateMySQL("DELETE FROM tbl_Announcement WHERE Title='" & Replace(txtTitle.Text, "'", "''") & "'") setDefault() MsgBox("Record deleted") End Sub End Class Program Maintenance Public Class ProgramMaintenance Dim dset As New DataSet Private Sub DepartmentMaintenance_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetDefault() End Sub Public Sub SetDefault()

cmbProgramCode.Text = Nothing cmbProgramCode.Enabled = True txtDescription.Text = Nothing txtDescription.ReadOnly = True btnNew.Text = "New" btnModify.Text = "Modify" btnNew.Enabled = True btnModify.Enabled = True btnDeactivate.Enabled = True ManipulateMySQL("SELECT * FROM tbl_Program") dset = ds DataGridView1.DataSource = dset.Tables(0) RefreshRecord() cmbProgramCode.Focus() End Sub Public Sub RefreshRecord() 'Refresh items of cmbProgramCode ManipulateMySQL("SELECT * FROM tbl_Program WHERE ProgramCode like '" & cmbProgramCode.Text & "%' ORDER BY ProgramCode ASC") dset = ds cmbProgramCode.Items.Clear() If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 cmbProgramCode.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End If End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub btnCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCancel.Click SetDefault() End Sub Private Sub btnNew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNew.Click If btnNew.Text = "New" Then cmbProgramCode.Text = Nothing txtDescription.ReadOnly = False btnNew.Text = "Save" btnModify.Enabled = False btnDeactivate.Enabled = False cmbProgramCode.Focus() Else If cmbProgramCode.Text = Nothing Or txtDescription.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If

ManipulateMySQL("SELECT * FROM tbl_Program WHERE ProgramCode='" & cmbProgramCode.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Program code is already recorded") Exit Sub End If ManipulateMySQL("INSERT INTO tbl_Program (ProgramCode,ProgramDescription) VALUES ('" & Replace(cmbProgramCode.Text, "'", "''") & "','" & Replace(txtDescription.Text, "'", "''") & "')") MsgBox("Successfully Added", MsgBoxStyle.OkOnly) SetDefault() End If End Sub Private Sub btnModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnModify.Click If btnModify.Text = "Modify" Then ManipulateMySQL("SELECT * FROM tbl_Program WHERE ProgramCode='" & cmbProgramCode.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then cmbProgramCode.Enabled = False Else MsgBox("No record found!", MsgBoxStyle.OkOnly) Exit Sub End If txtDescription.ReadOnly = False btnModify.Text = "Update" btnNew.Enabled = False btnDeactivate.Enabled = False Else If cmbProgramCode.Text = Nothing Or txtDescription.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If ManipulateMySQL("UPDATE tbl_Program SET ProgramDescription='" & Replace(txtDescription.Text, "'", "''") & "' WHERE ProgramCode = '" & cmbProgramCode.Text & "'") MsgBox("Successfully Modified", MsgBoxStyle.OkOnly) SetDefault() End If End Sub Private Sub btnDeactivate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDeactivate.Click ManipulateMySQL("SELECT * FROM tbl_Program WHERE ProgramCode = '" & cmbProgramCode.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then Dim res As MsgBoxResult = MsgBox("Do you want to delete this record?", MsgBoxStyle.YesNo, )

If res = MsgBoxResult.Yes Then ManipulateMySQL("SELECT * FROM tbl_Program inner join tbl_StudentInfo on ProgramCode=Program WHERE ProgramCode='" & cmbProgramCode.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Program is being use") Else ManipulateMySQL("DELETE FROM tbl_Program WHERE ProgramCode = '" & cmbProgramCode.Text & "'") MsgBox("Successfully deleted", MsgBoxStyle.OkOnly) SetDefault() End If End If Else MsgBox("No record to delete", MsgBoxStyle.OkOnly) End If End Sub Private Sub DepartmentMaintenance_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub ProgramMaintenance_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub cmbProgramCode_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbProgramCode.KeyPress If Char.IsLetterOrDigit(e.KeyChar) Or Asc(e.KeyChar) = 8 Then Else e.KeyChar = Nothing End If End Sub Private Sub cmbProgramCode_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbProgramCode.TextChanged ManipulateMySQL("SELECT * FROM tbl_Program WHERE ProgramCode='" & cmbProgramCode.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then txtDescription.Text = dset.Tables(0).Rows(0).Item(1).ToString Else txtDescription.Text = Nothing End If End Sub Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick cmbProgramCode.Text = DataGridView1.SelectedCells.Item(0).Value End Sub End Class Alumni Maintenance

Public Class AlumniMaintenance Dim dset As DataSet Dim gender As String = "Male" Private Sub ClearField() For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Text = Nothing End If Next End Sub Public Sub SetDefault() cmbID.Enabled = True cmbAP.Enabled = False cmbAYG.Enabled = False cmbAWS.Enabled = False ClearField() EnableFields(False) RadioButton1.Checked = True btnANew.Text = "New" btnAModify.Text = "Modify" btnANew.Enabled = True btnAModify.Enabled = True RefreshRecord() ManipulateMySQL("SELECT * FROM tbl_alumni") dset = ds DataGridView1.DataSource = dset.Tables(0) End Sub Public Sub RefreshRecord() 'Refresh items of cmbAID ManipulateMySQL("SELECT * FROM tbl_alumni WHERE StudentID like '" & cmbID.Text & "%' ORDER BY StudentID ASC") dset = ds cmbID.Items.Clear() If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 cmbID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End If 'Refresh items of cmbProgram ManipulateMySQL("SELECT * FROM tbl_Program ORDER BY ProgramCode ASC") dset = ds cmbAP.Items.Clear() If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 cmbAP.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) Next End If 'Refresh items of YearGraduated cmbAYG.Items.Clear() For x = Year(Now) To 1997 Step -1

cmbAYG.Items.Add(x) Next End Sub

Private Sub btnANew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnANew.Click If btnANew.Text = "New" Then ClearField() EnableFields(True) cmbID.Enabled = True cmbID.Focus() btnANew.Text = "Save" btnAModify.Enabled = False Else For Each x As Control In Me.Controls If TypeOf x Is ComboBox Then If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If ElseIf TypeOf x Is TextBox Then If x.Name = "txtBrowse" Or x.Name = "txtAMI" Or x.Name = "txtAWD" Then Else If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If End If End If Next ManipulateMySQL("SELECT * FROM tbl_Alumni WHERE StudentID='" & cmbID.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("ID is already used") Else ManipulateMySQL("INSERT INTO tbl_Alumni (StudentID,FName,MName,LName,Gender,Program,YearGraduated,WorkStatus,WorkDescription) VALUES ('" & cmbID.Text & "','" & Replace(txtAFN.Text, "'", "''") & "','" & Replace(txtAMI.Text, "'", "''") & "','" & Replace(txtALN.Text, "'", "''") & "','" & gender & "','" & cmbAP.Text & "','" & cmbAYG.Text & "','" & Replace(cmbAWS.Text, "'", "''") & "','" & Replace(txtAWD.Text, "'", "''") & "')") MsgBox("Successfully Added", MsgBoxStyle.OkOnly) SetDefault() End If End If End Sub Public Sub EnableFields(ByRef en As Boolean) For Each x As Control In Me.Controls If TypeOf x Is TextBox Then If x.Name <> "txtBrowse" Then x.Enabled = en Else x.Enabled = Not en End If

ElseIf TypeOf x Is ComboBox Then If x.Name <> "cmbID" Then x.Enabled = en Else x.Enabled = Not en End If End If Next End Sub Private Sub btnAModify_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAModify.Click If btnAModify.Text = "Modify" Then ManipulateMySQL("SELECT * FROM tbl_Alumni WHERE StudentID='" & cmbID.Text & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then MsgBox("No record found!", MsgBoxStyle.OkOnly) Exit Sub End If EnableFields(True) btnAModify.Text = "Update" btnANew.Enabled = False Else For Each x As Control In Me.Controls If TypeOf x Is ComboBox Then If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If ElseIf TypeOf x Is TextBox Then If x.Name = "txtBrowse" Or x.Name = "txtAMI" Or x.Name = "txtAWD" Then Else If x.Text = Nothing Then MsgBox("Please fill all fields") Exit Sub End If End If End If Next ManipulateMySQL("UPDATE tbl_Alumni SET FName = '" & Replace(txtAFN.Text, "'", "''") & "',MName = '" & Replace(txtAMI.Text, "'", "''") & "',LName='" & Replace(txtALN.Text, "'", "''") & "',Gender='" & gender & "',Program='" & cmbAP.Text & "',YearGraduated='" & cmbAYG.Text & "',WorkStatus='" & cmbAWS.Text & "',WorkDescription='" & Replace(txtAWD.Text, "'", "''") & "' WHERE StudentID = '" & cmbID.Text & "'") MsgBox("Successfully Modified", MsgBoxStyle.OkOnly) SetDefault() End If End Sub Private Sub btnACancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnACancel.Click SetDefault() End Sub

Private Sub btnABack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnABack.Click Me.Close() End Sub Private Sub AlumniMaintenance_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load SetDefault() End Sub Private Sub AlumniMaintenance_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub cmbID_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbID.KeyPress If Char.IsDigit(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then Else e.KeyChar = Nothing End If End Sub Private Sub cmbAID_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbID.TextChanged ManipulateMySQL("SELECT * FROM tbl_Alumni where StudentID='" & cmbID.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then txtAFN.Text = dset.Tables(0).Rows(0).Item(1).ToString txtAMI.Text = dset.Tables(0).Rows(0).Item(2).ToString txtALN.Text = dset.Tables(0).Rows(0).Item(3).ToString If RadioButton1.Text = dset.Tables(0).Rows(0).Item(4).ToString Then RadioButton1.Checked = True Else RadioButton2.Checked = True End If cmbAP.Text = dset.Tables(0).Rows(0).Item(5).ToString cmbAYG.Text = dset.Tables(0).Rows(0).Item(6).ToString cmbAWS.Text = dset.Tables(0).Rows(0).Item(7).ToString txtAWD.Text = dset.Tables(0).Rows(0).Item(8).ToString End If End Sub Private Sub cmbAG_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbAP.KeyPress, cmbAYG.KeyPress, cmbAWS.KeyPress e.Handled = True End Sub Private Sub AlumniMaintenance_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub

Private Sub RadioButton1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadioButton1.Click gender = sender.text End Sub Private Sub txtBrowse_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBrowse.KeyPress If Char.IsLetterOrDigit(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then Else e.KeyChar = Nothing End If End Sub Private Sub txtBrowse_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBrowse.TextChanged If txtBrowse.Text = " " Then txtBrowse.Text = Nothing Else ManipulateMySQL("SELECT * FROM tbl_Alumni WHERE LName like '" & txtBrowse.Text & "%' or StudentID like '" & txtBrowse.Text & "%'") dset = ds DataGridView1.DataSource = dset.Tables(0) End If End Sub Private Sub txtAFN_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtAFN.KeyPress, txtAMI.KeyPress, txtALN.KeyPress If Char.IsLetter(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then Else e.KeyChar = Nothing End If End Sub Private Sub DataGridView1_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick cmbID.Text = DataGridView1.SelectedCells.Item(0).Value End Sub End Class Pending Approval(Organization) Public Class PendingOrganization Dim dset As DataSet Dim adv1 As String Dim adv2 As String Dim adv3 As String Private Sub PendingOrganization_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT GroupID,Description FROM tbl_Group WHERE Status = 'Inactive'") dset = ds lstReqOrg.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 With lstReqOrg.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(1).ToString)

End With Next End Sub Private Sub lstReqOrg_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstReqOrg.SelectedIndexChanged ManipulateMySQL("SELECT * FROM tbl_Group WHERE GroupID = '" & lstReqOrg.SelectedItems(0).SubItems.Item(0).Text & "'") dset = ds txtIdenttify.Text = dset.Tables(0).Rows(0).Item("GroupID").ToString txtName.Text = dset.Tables(0).Rows(0).Item("GroupName").ToString txtDescription.Text = dset.Tables(0).Rows(0).Item("Description").ToString cmbPresident.Text = dset.Tables(0).Rows(0).Item("President").ToString cmbAdviser1.Text = dset.Tables(0).Rows(0).Item("Name1").ToString cmbAdviser2.Text = dset.Tables(0).Rows(0).Item("Name2").ToString cmbAdviser3.Text = dset.Tables(0).Rows(0).Item("Name3").ToString End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApprove.Click ManipulateMySQL("UPDATE tbl_Group SET Status='Active' WHERE GroupID='" & txtIdenttify.Text & "'") MsgBox("Request accepted") ManipulateMySQL("SELECT Adviser1,Adviser2,Adviser3 FROM tbl_Group WHERE GroupID='" & txtIdenttify.Text & "'") dset = ds adv1 = dset.Tables(0).Rows(0).Item(0).ToString adv2 = dset.Tables(0).Rows(0).Item(1).ToString adv3 = dset.Tables(0).Rows(0).Item(2).ToString ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver,Flag)VALUES('" & userID & "','" & adv1 & "','" & Now & "','Your request group has been approve','No','No''0')") If adv2 <> "" Then ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver,Flag)VALUES('" & userID & "','" & adv2 & "','" & Now & "','Your request group has been approve','No','No''0')") End If If adv3 <> "" Then ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver,Flag)VALUES('" & userID & "','" & adv3 & "','" & Now & "','Your request group has been approve','No','No''0')") End If MsgBox("Nofication sent") PendingOrganization_Load(sender, e) End Sub End Class Account Public Class PendingAccount Dim dset As DataSet Private Sub PendingAccount_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lstPAccount.Items.Clear()

ManipulateMySQL("SELECT Approve,Username,Password,StudentID,Firstname,Middlename,Lastname FROM tbl_UserAccount inner join tbl_StudentInfo on RefUserID=StudentID WHERE Approve='No'") dset = ds If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 With lstPAccount.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(5).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(6).ToString) End With Next End If ManipulateMySQL("SELECT Approve,Username,Password,TeacherID,Firstname,Middlename,Lastname FROM tbl_UserAccount inner join tbl_TeacherInfo on RefUserID=TeacherID WHERE Approve='No'") dset = ds If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 With lstPAccount.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(5).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(6).ToString) End With Next End If End Sub Private Sub btnApprove_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnApprove.Click For x = 0 To lstPAccount.Items.Count - 1 If lstPAccount.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_UserAccount SET Approve='Yes' WHERE UserName='" & lstPAccount.Items(x).Text & "'") MsgBox("Selected account(s) approved") End If Next PendingAccount_Load(sender, New System.EventArgs) End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Close() End Sub Private Sub btnDecline_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDecline.Click For x = 0 To lstPAccount.Items.Count - 1 If lstPAccount.Items(x).Selected = True Then

ManipulateMySQL("UPDATE tbl_UserAccount SET Approve='Rejected' WHERE UserName='" & lstPAccount.Items(x).Text & "'") MsgBox("Selected account(s) rejected") End If Next PendingAccount_Load(sender, New System.EventArgs) End Sub Private Sub PendingAccount_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub End Class Inbox Messages Public Class MessageBox Dim dset As DataSet Private Sub setDefault() lblDateTime.Text = Nothing txtNContent.Text = Nothing txtNContent.ReadOnly = False btnSend.Text = "Send" txtOContent.Text = Nothing txtResponse.Text = Nothing lstRecipientID.Items.Clear() lstRecipient.Items.Clear() RefreshInbox() End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub TeacherInbox_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub btnCreateMessage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateMessage.Click setDefault() grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub btnAddRecipient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddRecipient.Click AddRecipient.ShowDialog() End Sub Private Sub btnRemoveRecipient_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRemoveRecipient.Click If lstRecipient.Text <> Nothing Then

lstRecipientID.Items.RemoveAt(lstRecipient.SelectedIndex) lstRecipient.Items.RemoveAt(lstRecipient.SelectedIndex) End If End Sub Private Sub Message_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub btnNSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click If lstRecipient.Items.Count <> 0 Then If txtNContent.Text <> Nothing Then For x = 0 To lstRecipientID.Items.Count - 1 ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver)VALUES('" & userID & "','" & lstRecipientID.Items(x).ToString & "','" & Now() & "','" & Replace(txtNContent.Text, "'", "''") & "','No','No')") Next End If MsgBox("Message send") setDefault() Else MsgBox("No Recipient") End If End Sub Private Sub MessageBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Private Sub lstInbox_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstInbox.Click lblDateTime.Text = Nothing txtSender.Text = Nothing txtSenderID.Text = Nothing txtOContent.Text = Nothing txtResponse.Text = Nothing grpNewMessage.Visible = False grpOldMessage.Visible = True ManipulateMySQL("SELECT * FROM tbl_Message WHERE Sender='" & lstSenderID.Items(lstInbox.SelectedItems.Item(0).Index) & "' and DateTime='" & lstInbox.SelectedItems.Item(0).SubItems.Item(2).Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then lblDateTime.Text = dset.Tables(0).Rows(0).Item(2).ToString txtSender.Text = lstInbox.SelectedItems.Item(0).Text txtOContent.Text = dset.Tables(0).Rows(0).Item(3).ToString txtSenderID.Text = lstSenderID.Items(lstInbox.SelectedItems.Item(0).Index) ManipulateMySQL("UPDATE tbl_Message SET Flag='1' WHERE Sender='" & txtSenderID.Text & "' and Receiver='" & userID & "' and DateTime='" & lblDateTime.Text & "'")

End If End Sub Private Sub btnOSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOSend.Click If txtResponse.Text <> Nothing Then ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver)VALUES('" & userID & "','" & txtSenderID.Text & "','" & Now() & "','" & Replace(txtResponse.Text, "'", "''") & "','No','No')") MsgBox("Message Sent") setDefault() End If End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click For x = 0 To lstInbox.Items.Count - 1 If lstInbox.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_Message SET DeleteByReceiver='Yes' WHERE Sender = '" & lstSenderID.Items(x) & "' and DateTime='" & lstInbox.Items(x).SubItems.Item(1).Text & "'") End If Next For x = 0 To lstSent.Items.Count - 1 If lstSent.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_Message SET DeleteBySender='Yes' WHERE Receiver ='" & lstReceiverID.Items(x) & "' and DateTime='" & lstSent.Items(x).SubItems.Item(1).Text & "'") End If Next For x = 0 To lstDraft.Items.Count - 1 If lstDraft.Items(x).Selected = True Then ManipulateMySQL("DELETE FROM tbl_PendingMessage WHERE Contents = '" & lstDraft.Items(x).SubItems.Item(0).Text & "' and DateTime= '" & lstDraft.Items(x).SubItems.Item(1).Text & "'") End If Next btnRefresh_Click(sender, e) MsgBox("Message(s) deleted") End Sub Private Sub lstSent_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstSent.Click ManipulateMySQL("SELECT * FROM tbl_Message WHERE Receiver='" & lstReceiverID.Items(lstSent.SelectedItems.Item(0).Index) & "' and DateTime='" & lstSent.SelectedItems.Item(0).SubItems.Item(1).Text & "'") dset = ds txtNContent.Text = dset.Tables(0).Rows(0).Item("Contents").ToString lstRecipient.Items.Clear() lstRecipientID.Items.Clear() If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 lstRecipientID.Items.Add(dset.Tables(0).Rows(x).Item("Receiver").ToString) Next For x = 0 To lstRecipientID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID = '" & lstRecipientID.Items(x) & "'")

dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID = '" & lstRecipientID.Items(x) & "'") dset = ds End If End If End If lstRecipient.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString) Next End If txtNContent.ReadOnly = True btnSend.Text = "Forward" grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub lstDraft_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstDraft.Click ManipulateMySQL("SELECT Receiver FROM tbl_PendingMessage WHERE Sender = '" & userID & "' and Contents ='" & Replace(lstDraft.SelectedItems(0).SubItems.Item(0).Text, "'", "''") & "' and DateTime = '" & lstDraft.SelectedItems(0).SubItems.Item(1).Text & "'") dset = ds lstRecipient.Items.Clear() lstRecipientID.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 lstRecipientID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next For x = 0 To lstRecipientID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID = '" & lstRecipientID.Items(x) & "'") dset = ds End If End If

End If lstRecipient.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString) Next txtNContent.Text = lstDraft.SelectedItems(0).SubItems.Item(0).Text grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub btnDraft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDraft.Click For x = 0 To lstRecipientID.Items.Count - 1 If txtNContent.Text <> "" Then ManipulateMySQL("INSERT INTO tbl_PendingMessage(Sender,Receiver,Contents,DateTime)VALUES('" & userID & "','" & lstReceiverID.Items(x) & "','" & Replace(txtNContent.Text, "'", "''") & "','" & Format(Now, "MMMM dd,yyyy hh:mm:ss tt") & "')") MsgBox("Your message has been moved to draft") Else MsgBox("No message") Exit Sub End If Next lstRecipient.Items.Clear() lstRecipientID.Items.Clear() txtNContent.Text = Nothing txtNContent.ReadOnly = False btnSend.Text = "Send" setDefault() End Sub Private Sub txtNContent_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtNContent.TextChanged If txtNContent.Text = " " Then txtNContent.Text = "" End If End Sub Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click RefreshInbox() End Sub Private Sub RefreshInbox() 'Inbox ManipulateMySQL("SELECT * FROM tbl_Message WHERE Receiver='" & userID & "' and DeleteByReceiver='No'") dset = ds lstSenderID.Items.Clear() lstInbox.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 lstSenderID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) With lstInbox.Items.Add(dset.Tables(0).Rows(0).Item("Flag").ToString) .SubItems.Add(" ") .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString)

End With Next For x = 0 To lstSenderID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID='" & lstSenderID.Items(x).ToString & "'") dset = ds End If End If End If lstInbox.Items(x).SubItems.Item(1).Text = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString Next 'Sent ManipulateMySQL("SELECT * FROM tbl_Message WHERE Sender='" & userID & "' and DeleteBySender='No'") dset = ds lstReceiverID.Items.Clear() lstSent.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 lstReceiverID.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) With lstSent.Items.Add(" ") .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next For x = 0 To lstReceiverID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID='" & lstReceiverID.Items(x).ToString & "'") dset = ds End If End If

End If lstSent.Items(x).Text = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString Next 'Draft ManipulateMySQL("SELECT * FROM tbl_PendingMessage WHERE Sender ='" & userID & "'") dset = ds lstDraft.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 If x = dset.Tables(0).Rows.Count - 1 Then With lstDraft.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) End With Else For y = 0 To lstDraft.Items.Count - 1 If lstDraft.Items(y).SubItems.Item(0).Text = dset.Tables(0).Rows(x).Item(2).ToString And lstDraft.Items(y).SubItems.Item(1).Text = dset.Tables(0).Rows(x).Item(3).ToString Then GoTo here ElseIf y = lstDraft.Items.Count - 1 Then With lstDraft.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) End With End If Next End If here: Next End Sub Private Sub lstInbox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstInbox.SelectedIndexChanged End Sub Private Sub grpOldMessage_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles grpOldMessage.Enter End Sub End Class Profile Admin Imports System.IO Imports System.Drawing.Image Public Class MainAdmin Dim dset As DataSet Private Sub MainAdmin_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated MainAdmin_Load(sender, New System.EventArgs) End Sub Private Sub MainAdmin_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub

Private Sub MainAdmin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT * FROM tbl_Administrator WHERE AdminID='" & userID & "'") dset = ds lblName.Text = dset.Tables(0).Rows(0).Item(1).ToString & " " & dset.Tables(0).Rows(0).Item(3).ToString lblPosition.Text = dset.Tables(0).Rows(0).Item(4).ToString lblBirthday.Text = dset.Tables(0).Rows(0).Item(5).ToString lblGender.Text = dset.Tables(0).Rows(0).Item(6).ToString lblDepartment.Text = dset.Tables(0).Rows(0).Item(7).ToString lblLocation.Text = dset.Tables(0).Rows(0).Item(8).ToString txtRView.Text = dset.Tables(0).Rows(0).Item(9).ToString txtFQuotation.Text = dset.Tables(0).Rows(0).Item(10).ToString txtAboutMe.Text = dset.Tables(0).Rows(0).Item(11).ToString Dim imgByteArray As Byte() = Nothing imgByteArray = dset.Tables(0).Rows(0).Item("Picture") Dim myImage As Image Dim imgMemoryStream As MemoryStream = New MemoryStream() 'Byte[] to image imgMemoryStream = New IO.MemoryStream(imgByteArray) myImage = Drawing.Image.FromStream(imgMemoryStream) PictureBox1.Image = myImage lstMobile.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Mobileno WHERE User='" & userID & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobile.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next lstHobby.Items.Clear() ManipulateMySQL("SELECT * FROM tbl_Hobbies WHERE User='" & userID & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstHobby.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub btnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEdit.Click ModifyTeacherInfo.ShowDialog() End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub GroupBox3_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox3.Enter

End Sub End Class Change Password Public Class ChangePassword Dim dset As DataSet Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Public Sub setDefault() ManipulateMySQL("SELECT * FROM tbl_UserAccount WHERE RefUserID='" & userID & "'") dset = ds txtUsername.Text = dset.Tables(0).Rows(0).Item(1).ToString txtOPassword.Text = Nothing txtNPassword.Text = Nothing txtCPassword.Text = Nothing End Sub Private Sub Form2_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub btnChange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnChange.Click If txtOPassword.Text = Nothing Or txtNPassword.Text = Nothing Or txtCPassword.Text = Nothing Then MsgBox("Fill all fields") ElseIf txtOPassword.Text <> dset.Tables(0).Rows(0).Item(2) Then MsgBox("Wrong Password") ElseIf txtNPassword.Text <> txtCPassword.Text Then MsgBox("Password not match") ElseIf txtNPassword.TextLength < 5 Then MsgBox("Password have atleast 6 characters") Else ManipulateMySQL("UPDATE tbl_UserAccount SET Password='" & txtNPassword.Text & "' WHERE RefUserID='" & userID & "'") MsgBox("Password updated") End If setDefault() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub ChangePassword_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub

End Class Teacher Public Class AnnouncementTeacher Dim dset As DataSet Private Sub AnnouncementTeacher_Activated(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Activated AnnouncementTeacher_Load(sender, e) End Sub Private Sub AnnouncementTeacher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT Title,Contents,DateStart,DateEnd FROM tbl_Announcement") dset = ds dgvAnnouncement.DataSource = dset.Tables(0) lblATitle.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(0).Value lblADateStart.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(2).Value lblADateEnd.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(3).Value txtAContent.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(1).Value LoadBirthday() LoadGroups() LoadNotification() End Sub Private Sub dgvAnnouncement_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvAnnouncement.CellContentClick lblATitle.Text = dgvAnnouncement.SelectedCells(0).Value lblADateStart.Text = dgvAnnouncement.SelectedCells(2).Value lblADateEnd.Text = dgvAnnouncement.SelectedCells(3).Value txtAContent.Text = dgvAnnouncement.SelectedCells(1).Value End Sub Private Sub LoadNotification() lstNotification.Items.Clear() ManipulateMySQL("SELECT count(*) FROM tbl_Message WHERE Receiver = '" & userID & "' and Flag = '0' and DeleteByReceiver = 'No'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Unread Message(s)") End If End Sub Private Sub LoadGroups() lstGroups.Items.Clear() ManipulateMySQL("SELECT RefGroupID FROM tbl_GroupMember WHERE RefUserID = '" & userID & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstGroups.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub

Private Sub LoadBirthday() lstBirthday.Items.Clear() lstBDayID.Items.Clear() ManipulateMySQL("SELECT Firstname,Lastname,StudentID FROM tbl_StudentInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,TeacherID FROM tbl_TeacherInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,StaffID FROM tbl_StaffInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,AdminID FROM tbl_Administrator WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub Private Sub txtBrowse_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBrowse.KeyPress If Asc(e.KeyChar) = 13 Then If txtBrowse.Text <> Nothing Then lstBrowse.Items.Clear() lstBrowseID.Items.Clear() ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID = StudentID WHERE (Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "') and Approve = 'Yes'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString)

Next ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_TeacherInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT StaffID,Firstname,Lastname FROM tbl_StaffInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT AdminID,Firstname,Lastname FROM tbl_Administrator WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next lstBrowse.Visible = True End If End If End Sub Private Sub txtBrowse_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBrowse.TextChanged If txtBrowse.Text = " " Then txtBrowse.Text = "" End If lstBrowse.Visible = False End Sub Private Sub lstBrowse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstBrowse.SelectedIndexChanged ManipulateMySQL("SELECT Username FROM tbl_TeacherInfo inner join tbl_UserAccount on RefUserID=TeacherID WHERE TeacherID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Teacher" If dset.Tables(0).Rows.Count = 0 Then

ManipulateMySQL("SELECT Username FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID=StudentID WHERE StudentID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Student" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_StaffInfo inner join tbl_UserAccount on RefUserID=StaffID WHERE StaffID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Staff" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_Administrator inner join tbl_UserAccount on RefUserID=AdminID WHERE AdminID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Administrator" End If End If End If ViewID = dset.Tables(0).Rows(0).Item(0).ToString If ViewLevel = "Teacher" Or ViewLevel = "Staff" Or ViewLevel = "Administrator" Then ViewingTeacher.ShowDialog() ElseIf ViewLevel = "Student" Then ViewingStudent.ShowDialog() End If End Sub Private Sub lstGroups_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstGroups.SelectedIndexChanged 'ManipulateMySQL("UPDATE tbl_GroupMember SET Log = '1' WHERE RefUserID='" & userID & "' and GroupID = '" & lstGroups.Text & "'") GroupID = lstGroups.Text GroupProfile.ShowDialog() End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GroupBox1.Enter End Sub Private Sub MyProfileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyProfileToolStripMenuItem.Click MainTeacher.ShowDialog() End Sub Private Sub RequestOrgToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RequestOrgToolStripMenuItem.Click RequestOrg.ShowDialog() End Sub Private Sub MessagesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MessagesToolStripMenuItem.Click MessageBox.ShowDialog() End Sub

Private Sub CommentsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CommentsToolStripMenuItem.Click CommentBoxTeacher.ShowDialog() End Sub Private Sub lstNotification_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstNotification.DoubleClick If lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Unread Message(s)" Then MessageBox.ShowDialog() End If End Sub Private Sub LogoutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogoutToolStripMenuItem.Click Me.Close() End Sub End class Inbox Comments Public Class CommentBoxTeacher Dim dset As DataSet Private Sub setDefault() btnRefresh_Click(Sender, New System.EventArgs) lblDateTime.Text = Nothing lblSender.Text = Nothing txtContent.Text = Nothing End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub CommentBoxTeacher_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub CommentBoxTeacher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click ManipulateMySQL("SELECT * FROM tbl_Comments WHERE Receiver='" & userID & "' and Approve='Yes' and Deleted ='No'") dset = ds For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 With lstComment.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(5).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) End With Next

End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click For x = 0 To lstComment.Items.Count - 1 If lstComment.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_Comments SET Deleted='Yes' WHERE Sender='" & lstComment.Items(0).SubItems.Item(0).Text & "' and Receiver='" & lstComment.Items(0).SubItems.Item(1).Text & "' and DateTime='" & lstComment.Items(0).SubItems.Item(2).Text & "'") End If Next MsgBox("Comment(s) deleted") setDefault() End Sub Private Sub lstComment_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstComment.DoubleClick ManipulateMySQL("SELECT FName,LName FROM tbl_StudentInfo WHERE Sender='" & lstComment.Items(0).SubItems.Item(0).Text & "' and DateTime ='" & lstComment.Items(0).SubItems.Item(2).Text & "'") dset = ds lblSender.Text = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString txtContent.Text = lstComment.Items(0).SubItems.Item(1).Text lblDateTime.Text = lstComment.Items(0).SubItems.Item(2).Text End Sub End Class Messages Public Class MessageBox Dim dset As DataSet Private Sub setDefault() lblDateTime.Text = Nothing txtNContent.Text = Nothing txtNContent.ReadOnly = False btnSend.Text = "Send" txtOContent.Text = Nothing txtResponse.Text = Nothing lstRecipientID.Items.Clear() lstRecipient.Items.Clear() RefreshInbox() End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub TeacherInbox_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub

Private Sub btnCreateMessage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateMessage.Click setDefault() grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub btnAddRecipient_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddRecipient.Click AddRecipient.ShowDialog() End Sub Private Sub btnRemoveRecipient_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnRemoveRecipient.Click If lstRecipient.Text <> Nothing Then lstRecipientID.Items.RemoveAt(lstRecipient.SelectedIndex) lstRecipient.Items.RemoveAt(lstRecipient.SelectedIndex) End If End Sub Private Sub Message_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub btnNSend_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnSend.Click If lstRecipient.Items.Count <> 0 Then If txtNContent.Text <> Nothing Then For x = 0 To lstRecipientID.Items.Count - 1 ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver)VALUES('" & userID & "','" & lstRecipientID.Items(x).ToString & "','" & Now() & "','" & Replace(txtNContent.Text, "'", "''") & "','No','No')") Next End If MsgBox("Message send") setDefault() Else MsgBox("No Recipient") End If End Sub Private Sub MessageBox_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load setDefault() End Sub Private Sub lstInbox_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstInbox.Click lblDateTime.Text = Nothing txtSender.Text = Nothing txtSenderID.Text = Nothing txtOContent.Text = Nothing txtResponse.Text = Nothing

grpNewMessage.Visible = False grpOldMessage.Visible = True ManipulateMySQL("SELECT * FROM tbl_Message WHERE Sender='" & lstSenderID.Items(lstInbox.SelectedItems.Item(0).Index) & "' and DateTime='" & lstInbox.SelectedItems.Item(0).SubItems.Item(2).Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then lblDateTime.Text = dset.Tables(0).Rows(0).Item(2).ToString txtSender.Text = lstInbox.SelectedItems.Item(0).Text txtOContent.Text = dset.Tables(0).Rows(0).Item(3).ToString txtSenderID.Text = lstSenderID.Items(lstInbox.SelectedItems.Item(0).Index) ManipulateMySQL("UPDATE tbl_Message SET Flag='1' WHERE Sender='" & txtSenderID.Text & "' and Receiver='" & userID & "' and DateTime='" & lblDateTime.Text & "'") End If End Sub Private Sub btnOSend_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOSend.Click If txtResponse.Text <> Nothing Then ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver)VALUES('" & userID & "','" & txtSenderID.Text & "','" & Now() & "','" & Replace(txtResponse.Text, "'", "''") & "','No','No')") MsgBox("Message Sent") setDefault() End If End Sub Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDelete.Click For x = 0 To lstInbox.Items.Count - 1 If lstInbox.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_Message SET DeleteByReceiver='Yes' WHERE Sender = '" & lstSenderID.Items(x) & "' and DateTime='" & lstInbox.Items(x).SubItems.Item(1).Text & "'") End If Next For x = 0 To lstSent.Items.Count - 1 If lstSent.Items(x).Selected = True Then ManipulateMySQL("UPDATE tbl_Message SET DeleteBySender='Yes' WHERE Receiver ='" & lstReceiverID.Items(x) & "' and DateTime='" & lstSent.Items(x).SubItems.Item(1).Text & "'") End If Next For x = 0 To lstDraft.Items.Count - 1 If lstDraft.Items(x).Selected = True Then ManipulateMySQL("DELETE FROM tbl_PendingMessage WHERE Contents = '" & lstDraft.Items(x).SubItems.Item(0).Text & "' and DateTime= '" & lstDraft.Items(x).SubItems.Item(1).Text & "'") End If Next btnRefresh_Click(sender, e) MsgBox("Message(s) deleted") End Sub

Private Sub lstSent_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstSent.Click ManipulateMySQL("SELECT * FROM tbl_Message WHERE Receiver='" & lstReceiverID.Items(lstSent.SelectedItems.Item(0).Index) & "' and DateTime='" & lstSent.SelectedItems.Item(0).SubItems.Item(1).Text & "'") dset = ds txtNContent.Text = dset.Tables(0).Rows(0).Item("Contents").ToString lstRecipient.Items.Clear() lstRecipientID.Items.Clear() If dset.Tables(0).Rows.Count > 0 Then For x = 0 To dset.Tables(0).Rows.Count - 1 lstRecipientID.Items.Add(dset.Tables(0).Rows(x).Item("Receiver").ToString) Next For x = 0 To lstRecipientID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID = '" & lstRecipientID.Items(x) & "'") dset = ds End If End If End If lstRecipient.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString) Next End If txtNContent.ReadOnly = True btnSend.Text = "Forward" grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub lstDraft_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstDraft.Click ManipulateMySQL("SELECT Receiver FROM tbl_PendingMessage WHERE Sender = '" & userID & "' and Contents ='" & Replace(lstDraft.SelectedItems(0).SubItems.Item(0).Text, "'", "''") & "' and DateTime = '" & lstDraft.SelectedItems(0).SubItems.Item(1).Text & "'") dset = ds lstRecipient.Items.Clear() lstRecipientID.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 lstRecipientID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next For x = 0 To lstRecipientID.Items.Count - 1

ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID = '" & lstRecipientID.Items(x) & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID = '" & lstRecipientID.Items(x) & "'") dset = ds End If End If End If lstRecipient.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString) Next txtNContent.Text = lstDraft.SelectedItems(0).SubItems.Item(0).Text grpNewMessage.Visible = True grpOldMessage.Visible = False End Sub Private Sub btnDraft_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnDraft.Click For x = 0 To lstRecipientID.Items.Count - 1 If txtNContent.Text <> "" Then ManipulateMySQL("INSERT INTO tbl_PendingMessage(Sender,Receiver,Contents,DateTime)VALUES('" & userID & "','" & lstReceiverID.Items(x) & "','" & Replace(txtNContent.Text, "'", "''") & "','" & Format(Now, "MMMM dd,yyyy hh:mm:ss tt") & "')") MsgBox("Your message has been moved to draft") Else MsgBox("No message") Exit Sub End If Next lstRecipient.Items.Clear() lstRecipientID.Items.Clear() txtNContent.Text = Nothing txtNContent.ReadOnly = False btnSend.Text = "Send" setDefault() End Sub Private Sub txtNContent_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtNContent.TextChanged If txtNContent.Text = " " Then txtNContent.Text = "" End If End Sub

Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click RefreshInbox() End Sub Private Sub RefreshInbox() 'Inbox ManipulateMySQL("SELECT * FROM tbl_Message WHERE Receiver='" & userID & "' and DeleteByReceiver='No'") dset = ds lstSenderID.Items.Clear() lstInbox.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 lstSenderID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) With lstInbox.Items.Add(dset.Tables(0).Rows(0).Item("Flag").ToString) .SubItems.Add(" ") .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next For x = 0 To lstSenderID.Items.Count - 1 ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID='" & lstSenderID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID='" & lstSenderID.Items(x).ToString & "'") dset = ds End If End If End If lstInbox.Items(x).SubItems.Item(1).Text = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString Next 'Sent ManipulateMySQL("SELECT * FROM tbl_Message WHERE Sender='" & userID & "' and DeleteBySender='No'") dset = ds lstReceiverID.Items.Clear() lstSent.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 lstReceiverID.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) With lstSent.Items.Add(" ") .SubItems.Add(dset.Tables(0).Rows(x).Item(2).ToString) End With Next For x = 0 To lstReceiverID.Items.Count - 1

ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_TeacherInfo WHERE TeacherID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StudentInfo WHERE StudentID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_StaffInfo WHERE StaffID='" & lstReceiverID.Items(x).ToString & "'") dset = ds If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Firstname,Lastname FROM tbl_Administrator WHERE AdminID='" & lstReceiverID.Items(x).ToString & "'") dset = ds End If End If End If lstSent.Items(x).Text = dset.Tables(0).Rows(0).Item(0).ToString & " " & dset.Tables(0).Rows(0).Item(1).ToString Next 'Draft ManipulateMySQL("SELECT * FROM tbl_PendingMessage WHERE Sender ='" & userID & "'") dset = ds lstDraft.Items.Clear() For x = dset.Tables(0).Rows.Count - 1 To 0 Step -1 If x = dset.Tables(0).Rows.Count - 1 Then With lstDraft.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) End With Else For y = 0 To lstDraft.Items.Count - 1 If lstDraft.Items(y).SubItems.Item(0).Text = dset.Tables(0).Rows(x).Item(2).ToString And lstDraft.Items(y).SubItems.Item(1).Text = dset.Tables(0).Rows(x).Item(3).ToString Then GoTo here ElseIf y = lstDraft.Items.Count - 1 Then With lstDraft.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(3).ToString) End With End If Next End If here: Next End Sub Private Sub lstInbox_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstInbox.SelectedIndexChanged End Sub End Class Viewing Teacher Public Class ViewingTeacher Dim dset As DataSet

Private Sub ViewingTeacher_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load If ViewLevel = "Teacher" Then ManipulateMySQL("SELECT * FROM tbl_TeacherInfo inner join tbl_UserAccount on RefUserID=TeacherID WHERE Username='" & ViewID & "' or TeacherID='" & ViewID & "'") dset = ds lblTeacherID.Text = dset.Tables(0).Rows(0).Item("TeacherID").ToString ElseIf ViewLevel = "Administrator" Then ManipulateMySQL("SELECT * FROM tbl_Administrator inner join tbl_UserAccount on RefUserID=AdminID WHERE Username='" & ViewID & "' or AdminID='" & ViewID & "'") dset = ds lblTeacherID.Text = dset.Tables(0).Rows(0).Item("AdminID").ToString Else ManipulateMySQL("SELECT * FROM tbl_StaffTeacherInfo inner join tbl_UserAccount on RefUserID=StaffID WHERE Username='" & ViewID & "' or StaffID='" & ViewID & "'") dset = ds lblTeacherID.Text = dset.Tables(0).Rows(0).Item("StaffID").ToString End If lblName.Text = dset.Tables(0).Rows(0).Item("Firstname").ToString & " " & dset.Tables(0).Rows(0).Item("Lastname").ToString lblGender.Text = dset.Tables(0).Rows(0).Item("Gender").ToString lblPosition.Text = dset.Tables(0).Rows(0).Item("Position").ToString lblBirthday.Text = dset.Tables(0).Rows(0).Item("Birthday").ToString txtLocation.Text = dset.Tables(0).Rows(0).Item("Location").ToString lblDepartment.Text = dset.Tables(0).Rows(0).Item("Department").ToString txtRView.Text = dset.Tables(0).Rows(0).Item("ReligousView").ToString txtFQuotation.Text = dset.Tables(0).Rows(0).Item("FaveQuotation").ToString txtAboutMe.Text = dset.Tables(0).Rows(0).Item("AboutMe").ToString ManipulateMySQL("SELECT * FROM tbl_UserAccount inner join tbl_MobileNo on RefUserID=User WHERE Username='" & ViewID & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobileNo.Items.Add(dset.Tables(0).Rows(x).Item("MobileNo").ToString) Next ManipulateMySQL("SELECT * FROM tbl_UserAccount inner join tbl_Hobbies on RefUserID=User WHERE Username='" & ViewID & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstMobileNo.Items.Add(dset.Tables(0).Rows(x).Item("Hobby").ToString) Next End Sub Private Sub ViewingTeacher_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click InstantPrivateMessages.ShowDialog() End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

Dim receiver As String ManipulateMySQL("SELECT RefUserID FROM tbl_UserAccount WHERE Username = '" & ViewID & "'") dset = ds receiver = dset.Tables(0).Rows(0).Item(0).ToString ManipulateMySQL("INSERT INTO tbl_Message(Sender,Receiver,DateTime,Contents,DeleteBySender,DeleteByReceiver)VALUES('" & userID & "','" & receiver & "','" & Now() & "','Hi!','No','No')") MsgBox("Message sent") Me.Close() End Sub End Class Request Organization Public Class RequestOrg Dim dset As DataSet Dim blnk As String = "" Private Sub SetDefault() lstMember.Items.Clear() ClearField() EnableFields(True) RefreshRecord() End Sub Private Sub ClearField() For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Text = "" End If Next End Sub Private Sub cmbAdviser1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbAdviser1.KeyPress, cmbAdviser2.KeyPress, cmbAdviser3.KeyPress e.Handled = True End Sub Private Sub txtDescription_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtDescription.KeyPress, txtName.KeyPress, txtIdenttify.KeyPress If Not (Char.IsLetter(e.KeyChar) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32) Then e.KeyChar = Nothing End If End Sub Private Sub txtDescription_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtDescription.TextChanged, txtIdenttify.TextChanged, txtName.TextChanged If sender.text = " " Then sender.text = "" End If End Sub Private Sub RefreshRecord()

cmbAdviser1.Items.Clear() cmbAdviser2.Items.Clear() cmbAdviser3.Items.Clear() cmbAID1.Items.Clear() cmbAID2.Items.Clear() cmbAID3.Items.Clear() cmbAdviser1.Items.Add(blnk) cmbAdviser2.Items.Add(blnk) cmbAdviser3.Items.Add(blnk) cmbAID1.Items.Add(blnk) cmbAID2.Items.Add(blnk) cmbAID3.Items.Add(blnk) ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_TeacherInfo") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbAID1.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAID2.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAID3.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbAdviser1.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) cmbAdviser2.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) cmbAdviser3.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub Private Sub OrganizationMaintenance_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load SetDefault() End Sub Private Sub EnableFields(ByRef en As Boolean) For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Enabled = en End If Next End Sub Private Sub cmbPresident_DropDown(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbPresident.DropDown cmbPresident.Items.Clear() cmbPID.Items.Clear() cmbPresident.Items.Add(blnk) cmbPID.Items.Add(blnk) ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_StudentInfo WHERE Firstname like '" & Replace(cmbPresident.Text, "'", "''") & "%' or Lastname='" & Replace(cmbPresident.Text, "'", "''") & "%'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbPID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) cmbPresident.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString)

Next End Sub Private Sub cmbAdviser2_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser2.SelectedIndexChanged If cmbAdviser1.Enabled = True Then If cmbAdviser1.Text <> "" Then If cmbAdviser2.Text = cmbAdviser1.Text Then MsgBox("Adviser is already selected") cmbAdviser2.Text = "" Else cmbAID2.Text = cmbAID2.Items(cmbAdviser2.SelectedIndex) End If Else cmbAdviser2.Text = "" MsgBox("Please select adviser 1") End If End If End Sub Private Sub cmbAdviser3_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser3.SelectedIndexChanged If cmbAdviser1.Enabled = True Then If cmbAdviser2.Text <> "" Then If cmbAdviser1.Text = cmbAdviser3.Text Or cmbAdviser2.Text = cmbAdviser3.Text Then MsgBox("Adviser is already selected") cmbAdviser3.Text = "" Else cmbAID3.Text = cmbAID3.Items(cmbAdviser3.SelectedIndex) End If Else cmbAdviser3.Text = "" MsgBox("Please select adviser 2") End If End If End Sub Private Sub cmbAdviser1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles cmbAdviser1.SelectedIndexChanged cmbAID1.Text = cmbAID1.Items(cmbAdviser1.SelectedIndex) End Sub Private Sub cmbPresident_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmbPresident.SelectedIndexChanged cmbPID.Text = cmbPID.Items(cmbPresident.SelectedIndex) End Sub Private Sub btnClear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnClear.Click SetDefault() End Sub Private Sub SetGMember() lstMember.Items.Clear() ManipulateMySQL("SELECT PresidentID,Adviser1,Adviser2,Adviser3,GroupID FROM tbl_Group") dset = ds

For x = 0 To dset.Tables(0).Rows.Count - 1 With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("President") End With With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With If dset.Tables(0).Rows(x).Item(2).ToString <> "" Then With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With End If If dset.Tables(0).Rows(x).Item(3).ToString <> "" Then With lstMember.Items.Add(dset.Tables(0).Rows(x).Item(3).ToString) .SubItems.Add(dset.Tables(0).Rows(x).Item(4).ToString) .SubItems.Add("Adviser") End With End If Next ManipulateMySQL("DELETE FROM tbl_GroupMember WHERE Level <> 'Member'") For x = 0 To lstMember.Items.Count - 1 ManipulateMySQL("INSERT INTO tbl_GroupMember(RefUserID,RefGroupID,Level)VALUES('" & lstMember.Items(x).SubItems.Item(0).Text & "','" & lstMember.Items(x).SubItems.Item(1).Text & "','" & lstMember.Items(x).SubItems.Item(2).Text & "')") Next End Sub Private Sub btnRequest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRequest.Click ManipulateMySQL("SELECT GroupID FROM tbl_Group WHERE GroupID = '" & Replace(txtIdenttify.Text, "'", "''") & "'") dset = ds If dset.Tables(0).Rows.Count <> 0 Then MsgBox("Group identity is already recorded") Exit Sub ElseIf cmbAdviser1.Text = "" Or txtIdenttify.Text = "" Or txtDescription.Text = "" Or txtName.Text = "" Or cmbPresident.Text = "" Then MsgBox("Please fill all required fields") Exit Sub Else If cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text <> "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Adviser2,Adviser3,Name1,N ame2,Name3,Status)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''") & "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "','" & cmbAID3.Items(cmbAdviser3.SelectedIndex) & "','" & cmbAdviser1.Text & "','" & cmbAdviser2.Text & "','" & cmbAdviser3.Text & "','Inactive')") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text <> "" And cmbAdviser3.Text = "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Adviser2,Name1,Name2,Stat us)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''")

& "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAID2.Items(cmbAdviser2.SelectedIndex) & "','" & cmbAdviser1.Text & "','" & cmbAdviser2.Text & "','Inactive')") ElseIf cmbAdviser1.Text <> "" And cmbAdviser2.Text = "" And cmbAdviser3.Text = "" Then ManipulateMySQL("INSERT INTO tbl_Group(GroupID,GroupName,Description,PresidentID,President,Adviser1,Name1,Status)VALUES('" & txtIdenttify.Text & "','" & txtName.Text & "','" & Replace(txtDescription.Text, "'", "''") & "','" & cmbPID.Items(cmbPresident.SelectedIndex) & "','" & cmbPresident.Text & "','" & cmbAID1.Items(cmbAdviser1.SelectedIndex) & "','" & cmbAdviser1.Text & "','Inactive')") End If MsgBox("Request has been sent") SetGMember() End If SetDefault() End Sub End Class Student Announcement Form Public Class AnnouncementStudent Dim dset As DataSet Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Me.Close() End Sub Private Sub Announcement_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub Announcement_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub ChangePasswordToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordToolStripMenuItem.Click MessageBox.ShowDialog() End Sub Private Sub LogoutToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogoutToolStripMenuItem.Click CommentBoxStudent.ShowDialog() End Sub Private Sub AlumniToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AlumniToolStripMenuItem.Click Alumni.ShowDialog() End Sub Private Sub MyProfileToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyProfileToolStripMenuItem.Click MainStudent.ShowDialog() End Sub

Private Sub ChangePasswordToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangePasswordToolStripMenuItem1.Click ChangePassword.ShowDialog() End Sub Private Sub LogOutToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LogOutToolStripMenuItem1.Click Me.Close() End Sub Private Sub LoadGroups() lstGroups.Items.Clear() ManipulateMySQL("SELECT RefGroupID FROM tbl_GroupMember WHERE RefUserID = '" & userID & "'") dset = ds lstGroups.Items.Clear() For x = 0 To dset.Tables(0).Rows.Count - 1 lstGroups.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub LoadBirthday() lstBirthday.Items.Clear() lstBDayID.Items.Clear() ManipulateMySQL("SELECT Firstname,Lastname,StudentID FROM tbl_StudentInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,TeacherID FROM tbl_TeacherInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,StaffID FROM tbl_StaffInfo WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT Firstname,Lastname,AdminID FROM tbl_Administrator WHERE Birthday like '" & Format(Now, "M/d") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1

lstBirthday.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString & " " & dset.Tables(0).Rows(x).Item(1).ToString) lstBDayID.Items.Add(dset.Tables(0).Rows(x).Item(2).ToString) Next End Sub Private Sub LoadNotification() lstNotification.Items.Clear() ManipulateMySQL("SELECT count(*) FROM tbl_Message WHERE Receiver = '" & userID & "' and Flag = '0' and DeleteByReceiver = 'No'") dset = ds If dset.Tables(0).Rows(0).Item(0).ToString <> "0" Then lstNotification.Items.Add(dset.Tables(0).Rows(0).Item(0).ToString).SubItems.Add("Unread Message(s)") End If End Sub Private Sub AnnouncementStudent_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ManipulateMySQL("SELECT Title,Contents,DateStart,DateEnd FROM tbl_Announcement") dset = ds dgvAnnouncement.DataSource = dset.Tables(0) lblATitle.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(0).Value lblADateStart.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(2).Value lblADateEnd.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(3).Value txtAContent.Text = dgvAnnouncement.Rows.Item(0).Cells.Item(1).Value LoadBirthday() LoadGroups() LoadNotification() End Sub Private Sub dgvAnnouncement_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgvAnnouncement.CellContentClick lblATitle.Text = dgvAnnouncement.SelectedCells(0).Value lblADateStart.Text = dgvAnnouncement.SelectedCells(2).Value lblADateEnd.Text = dgvAnnouncement.SelectedCells(3).Value txtAContent.Text = dgvAnnouncement.SelectedCells(1).Value End Sub Private Sub txtBrowse_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtBrowse.KeyPress If Asc(e.KeyChar) = 13 Then If txtBrowse.Text <> Nothing Then lstBrowse.Items.Clear() lstBrowseID.Items.Clear() ManipulateMySQL("SELECT StudentID,Firstname,Lastname FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID = StudentID WHERE (Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "') and Approve = 'Yes'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString)

lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT TeacherID,Firstname,Lastname FROM tbl_TeacherInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT StaffID,Firstname,Lastname FROM tbl_StaffInfo WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next ManipulateMySQL("SELECT AdminID,Firstname,Lastname FROM tbl_Administrator WHERE Firstname like '" & Replace(txtBrowse.Text, "'", "''") & "' or Lastname like '" & Replace(txtBrowse.Text, "'", "''") & "'") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 lstBrowseID.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) lstBrowse.Items.Add(dset.Tables(0).Rows(x).Item(1).ToString & " " & dset.Tables(0).Rows(x).Item(2).ToString) Next lstBrowse.Visible = True End If End If End Sub Private Sub txtBrowse_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtBrowse.TextChanged If txtBrowse.Text = " " Then txtBrowse.Text = "" End If lstBrowse.Visible = False End Sub Private Sub lstBrowse_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstBrowse.SelectedIndexChanged ManipulateMySQL("SELECT Username FROM tbl_TeacherInfo inner join tbl_UserAccount on RefUserID=TeacherID WHERE TeacherID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Teacher"

If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_StudentInfo inner join tbl_UserAccount on RefUserID=StudentID WHERE StudentID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Student" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_StaffInfo inner join tbl_UserAccount on RefUserID=StaffID WHERE StaffID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Staff" If dset.Tables(0).Rows.Count = 0 Then ManipulateMySQL("SELECT Username FROM tbl_Administrator inner join tbl_UserAccount on RefUserID=AdminID WHERE AdminID = '" & lstBrowseID.Items((lstBrowse.SelectedItems(0).Index)).Text & "'") dset = ds ViewLevel = "Administrator" End If End If End If ViewID = dset.Tables(0).Rows(0).Item(0).ToString If ViewLevel = "Teacher" Or ViewLevel = "Staff" Or ViewLevel = "Administrator" Then ViewingTeacher.ShowDialog() ElseIf ViewLevel = "Student" Then ViewingStudent.ShowDialog() End If End Sub Private Sub lstGroups_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstGroups.SelectedIndexChanged GroupID = lstGroups.Text GroupProfile.ShowDialog() End Sub Private Sub lstNotification_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles lstNotification.DoubleClick If lstNotification.SelectedItems(0).SubItems.Item(1).Text = "Unread Message(s)" Then MessageBox.ShowDialog() End If End Sub End Class Sign-up Public Class SignUp Dim dset As DataSet Dim toAdd As Boolean = True Dim gender As String = "Male" Private Sub cmbGender_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles cmbProgram.KeyPress e.Handled = True End Sub

Private Sub btn_SignUp_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_SignUp.Click For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then If x.Name <> "txtMName" Then If x.Text = Nothing Then MsgBox("Please fill-up all fields") txtPassword.Text = Nothing txtConfirm.Text = Nothing Exit Sub End If End If End If Next ManipulateMySQL("SELECT Username FROM tbl_UserAccount WHERE Username='" & txtUsername.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Username is already exist") ClearFields() Exit Sub End If ManipulateMySQL("SELECT RefUserID FROM tbl_UserAccount WHERE RefUserID='" & Replace(txtStudentID.Text, "'", "''") & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Then MsgBox("Student ID is already used") End If If txtPassword.Text <> txtConfirm.Text Then MsgBox("Password did not match") ElseIf txtUsername.Text.Length < 6 Then MsgBox("Username should have atleast 6 character") ElseIf txtPassword.Text.Length < 6 Then MsgBox("Password should have atleast 6 character") Else ManipulateMySQL("INSERT INTO tbl_UserAccount(Approve,Username,Password,Userlevel,RefUserID,Status)VALUES('No','" & txtUsername.Text & "','" & Replace(txtPassword.Text, "'", "''") & "','Student','" & Replace(txtStudentID.Text, "'", "''") & "','Active')") ManipulateMySQL("INSERT INTO tbl_StudentInfo(StudentID,FirstName,MiddleName,LastName,Birthday,Gender,Program)VALUES('" & txtStudentID.Text & "','" & txtFName.Text & "','" & txtMName.Text & "','" & txtLName.Text & "','" & DTP1.Value & "','" & gender & "','" & cmbProgram.Text & "')") InsertPicture("UPDATE tbl_StudentInfo SET Picture = @BLOBData WHERE StudentID = '" & txtStudentID.Text & "'", PictureBox1) MsgBox("Wait for administrator to activate this account") Me.Close() End If End Sub

Private Sub txtUsername_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtUsername.KeyPress If (Asc(e.KeyChar) > 47 And Asc(e.KeyChar) < 58) Or (Asc(e.KeyChar) > 64 And Asc(e.KeyChar) < 91) Or (Asc(e.KeyChar) > 96 And Asc(e.KeyChar) < 123) Or Asc(e.KeyChar) = 8 Then 'nothing Else e.KeyChar = Nothing End If End Sub Public Sub ClearFields() For Each x As Control In Me.Controls If TypeOf x Is TextBox Or TypeOf x Is ComboBox Then x.Text = Nothing End If Next End Sub Private Sub txtFName_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtFName.KeyPress, txtMName.KeyPress, txtLName.KeyPress If (Asc(e.KeyChar) > 64 And Asc(e.KeyChar) < 91) Or (Asc(e.KeyChar) > 96 And Asc(e.KeyChar) < 123) Or Asc(e.KeyChar) = 8 Or Asc(e.KeyChar) = 32 Then 'nothing Else e.KeyChar = Nothing End If End Sub Private Sub SignUp_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load RadioButton1.Checked = True ManipulateMySQL("SELECT ProgramCode FROM tbl_Program ORDER BY ProgramCode ASC") dset = ds For x = 0 To dset.Tables(0).Rows.Count - 1 cmbProgram.Items.Add(dset.Tables(0).Rows(x).Item(0).ToString) Next End Sub Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click Me.Close() End Sub Private Sub SignUp_LocationChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LocationChanged Me.CenterToScreen() End Sub Private Sub SignUp_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize Me.WindowState = FormWindowState.Normal End Sub Private Sub GroupBox1_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs)

End Sub Private Sub RadioButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.Click, RadioButton2.Click gender = sender.text End Sub Private Sub txtStudentID_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtStudentID.KeyPress If Char.IsDigit(e.KeyChar) Or Asc(e.KeyChar) = 8 Then Else e.KeyChar = Nothing End If End Sub Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton1.CheckedChanged gender = "Male" PictureBox1.Image = My.Resources.male_pix End Sub Private Sub RadioButton2_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RadioButton2.CheckedChanged gender = "Female" PictureBox1.Image = My.Resources.female_pix End Sub Private Sub txtUsername_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtUsername.LostFocus ManipulateMySQL("SELECT Username FROM tbl_UserAccount WHERE Username='" & txtUsername.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Or txtUsername.TextLength < 6 Then chkUsername.Image = My.Resources.red_x toAdd = False Else chkUsername.Image = My.Resources.green_check toAdd = True End If End Sub Private Sub txtStudentID_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtStudentID.LostFocus ManipulateMySQL("SELECT RefUserID FROM tbl_UserAccount WHERE RefUserID='" & txtStudentID.Text & "'") dset = ds If dset.Tables(0).Rows.Count > 0 Or txtStudentID.TextLength < 11 Then chkStudentID.Image = My.Resources.red_x toAdd = False Else chkStudentID.Image = My.Resources.green_check toAdd = True End If End Sub End Class

Appendix F (Personal Data)

GREGGY JHUNE A. BIGLANG-AWA G.Biglang-awa St., Talipapa Novaliches, Quezon City Mobile: 0912-8703433 Email: gjyohji@yahoo.com

TECHNICAL SKILLS AND ABILITIES In-depth knowledge of programming languages and database management system like HTML, JavaScript, Visual Basic, C++, MySQL

EDUCATION Tertiary Education: STI College Muoz EDSA (2009-Present) Secondary Education: Capitol Institute (2004-2008) Primary Education: Placido del Mundo Elementary School (1998-2004)

PERSONAL DETAILS Date of Birth : March 27, 1992 Age : 20 Height : 58 Weight : 110 lbs
Religion : Roman Catholic

BETHANY D. CORPUZ Blk 6 Lot 28 Natividad Townhomes, Punturin, Valenzuela City Mobile: 0906-1884474 Email: bethanycorpuz24@yahoo.com TECHNICAL SKILLS AND ABILITIES: Proficient in: Microsoft Office 2010 GIMP Adobe Photoshop CS5 HTML/CSS BLENDER VB6

EDUCATION: Tertiary Education: STI College Muoz EDSA (2009-Present) Secondary Education: Lawang Bato National High School (2005-2009) Primary Education: Lawang Bato Elementary School (2002-2005) San Isidro San Roque Academy (2001-2002) Immaculate Mother Learning Center (1997-2001)

PERSONAL DETAILS Date of Birth : November 24, 1992 Age : 20 Height : 5 Weight : 50kg Religion : Born Again Christian

MARYJOY DELCORO #33 Rd 23 Project 8, Quezon City Mobile: 0907-9074395 Email: delcoro.8@gmail.com

TECHNICAL SKILLS AND ABILITIES: Proficient in: Microsoft Office 2012 GIMP Assembly Language Microsoft Visual Studio 2005 HTML/CSS BLENDER

EDUCATION: Tertiary Education: STI College Muoz EDSA (2009-Present) Secondary Education: Ismael Mathay Senior High School (2005-2009) Primary Education: Torohills Elementary School (1997-2005)

PERSONAL DETAILS Date of Birth : March 20, 1991 Age : 21 Height : 5 Weight : 80 lbs Religion : Roman Catholic

WORKING EXPERIENCE: McDonalds, Crew

JENINA F. DIZON #30N Sorsogon St., Brgy. Nayong Kanluran, Quezon City Telephone No.: (02)412-43-96 Email: heartzadizon@yahoo.com TECHNICAL SKILLS AND ABILITIES: Proficient in: Microsoft Office 2010 Adobe PhotoshopCS3 Capable of using OS like Microsoft XP/Vista

EDUCATION: Tertiary Education: STI College Muoz EDSA (2009-Present) Secondary Education: Sauyo High School (2003-2007) Primary Education: Eguia Elementary School (1997-2003)

PERSONAL DETAILS Date of Birth : November 19, 1990 Age : 21 Height : 53 Weight : 56kg Religion : Roman Catholic WORKING EXPERIENCE Sanctuarium Everliving Inc., Operation Department, Assistant Secretary