Barangay Management System Final

Download as pdf or txt
Download as pdf or txt
You are on page 1of 124

POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

BARANGAY MANAGEMENT SYSTEM


FOR BARANGAY SAN ANTONIO, PARAÑAQUE CITY

A Capstone Project
Presented to the Faculty
of Parañaque City Campus
Polytechnic University of the Philippines
Parañaque City, Metro Manila

In Partial Fulfillment of the Requirements for the


Degree Bachelor of Science in Information Technology

Prepared by:

CRUZ, LAIZA MARIE CHRISTINE V.


CUERDO, CRISCEL B.
DALISAY, JHON KYLE
ESTIJAL, NIÑA BIANCA M.

2022
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CERTIFICATION

This Capstone Project, BARANGAY MANAGEMENT SYSTEM prepared and


submitted by CRISCEL B. CUERDO, LAIZA MARIE CHRISTINE V. CRUZ, JHON
KYLE DALISAY, and NIÑA BIANCA M. ESTIJAL in partial fulfillment of the
requirements for the degree BACHELOR OF SCIENCE IN INFORMATION
TECHNOLOGY has been examined and recommended for ORAL EXAMINATION.

Evaluation Committee

ALDRIN P. OBSANGA
Adviser

MARVIN C. DE PEDRO CATHERINE R. LLAVE, MLing


Member Member

RIBERT R. ENIERGA, MIT


Member

APPROVAL

Approved by the Panel on Oral Examination on February 4, 2022 with the


grade of _____.

RIBERT R. ENIERGA, MIT


Chair

MARVIN C. DE PEDRO CATHERINE R. LLAVE, MLing


Member Member

Accepted in Partial fulfillment of the requirements for the degree Bachelor of


Science in Information Technology.

CLEOTILDE L. CRESCINI, DBA


Campus Director
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

GRAMMARIAN’S CERTIFICATE

This is to certify that the undersigned reviewed and went through the papers of

the capstone project manuscript entitled “BARANGAY MANAGEMENT SYSTEM

FOR BARANGAY SAN ANTONIO, PARAÑAQUE CITY”, developed by CRISCEL

CUERDO, JHON KHYLE DALISAY, LAIZA MARIE CHRISTINE V. CRUZ, and NIÑA

BIANCA ESTIJAL aligned with the set of structural rules that govern the composition

of sentences of phrases, and words in the English language.

Signed by: Date Signed

__________________ _______________
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

ACKNOWLEDGEMENT

The researchers would like to express their heartfelt gratitude to the

following

people that made this thesis possible. His/her guidance and advices carried the

developers through all the stages of this project.

First and foremost, the warmest thanks to God the Father, for giving the

developers strength, wisdom and knowledge to surpass all the difficulties and trials

that they have encountered.

The developers would also like to thank the Barangay San Antonio,

Parañaque City especially the Barangay Secretary, Mr. Jomar Eugenio who gave

the chance to start and finish the development of this project within the premises

under his supervision. The group of staff of Barangay San Antonio for their

participation during the interview and survey, as well as the kindest acceptance and

collaboration of the employees that pushed the developers to strive harder in

achieving the system that the area needs.

To the research adviser, Mr. Aldrin P. Obsanga, who ably guided each

developer from the start until the end of their research study by sharing his ideas,

advices, own experiences and knowledge which resulted in the final

conceptualization and completion of this thesis project.

The set of panelists, Mr. Marvin C. De Pedro, Ms. Catherine R. Llave, MLing

and Mr. Ribert R. Enierga, MIT, who gave their time during the final defense by
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

analyzing every part of the study and pointing out the flaws that the developers

could work on, furthermore their recommendations in enhancing this study.

Special appreciation will also be given the developers’ family, who are

always on their side to give constant love, financial support, patience and

encouragement. Not to mention the classmates, friends, relatives, and to the rest

who contributed, helped and

gave their full support in the means of this project.

The developers will keep all of these in their hearts. Without all of you, none

of this would indeed be possible. Thank you so much and God bless you more.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CERTIFICATION OF ORIGINALITY

This is to certify that the research work presented in this thesis entitled

“Barangay Management System for Barangay San Antonio, Parañaque City,” for the

degree Bachelor of Science in Information Technology. At the Polytechnic

University of the Philippines embodies the result of original and scholarly work

carried by the undersigned. This thesis does not contain words or ideas taken from

published sources or written works that have been accepted as basis for the award

of a degree from any higher education institution, except where the proper

referencing and acknowledgement were made.

LAIZA MARIE CHRISTINE CRUZ

CRISCEL CUERDO

DALISAY, JHON KYLE

ESTIJAL, NIÑA BIANCA M.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

ABSTRACT

Title : Barangay Management System of Barangay San

Antonio, Paranaque City

Researchers : Cruz, Laiza Marie Christine V.

Cuerdo, Criscel B.

Dalisay, Jhon Kyle

Estijal, Niña Bianca M.

Degree : Bachelor of Science in Information Technology

Institution : Polytechnic University of the Philippines

Year : 2022

Adviser : Prof. Aldrin P. Obsanga

This study is conducted to provide a system for Barangay San Antonio, Parañaque

City.The Management processes of the Barangay San Antonio, Parañaque City

operates manually for years. Unlike the other Barangays who already operate

systematically, Barangay San Antonio works inconveniently and has a lot of work

that is manually done. Therefore, the researchers develop a Barangay Management

System for them. The indicated programming tools— SQL Server Management

Studio, Visual Basic for Applications, and Microsoft IDE-Visual Studios were used to

make this system possible. The researchers conducted an online interview and

visited the clients on-site to get the detailed information about the manual process in

getting information. In designing, developing, and evaluating the proposed system,

the ISO 25010 software quality model is used, while its effectiveness was checked

and evaluated by the client, IT Experts and IT Graduates and Local Government
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Employees. The ISO 25010 software quality model identifies eight main quality

characteristics: functionality, performance efficiency, compatibility, usability,

reliability, security, maintainability and portability. The Researchers used the formula

of weighted mean to get the average mean of every function. The combined results

are combined and overall analyzed. The findings revealed that the Barangay

Management System provides a great service and much easier filings of documents

needed in the Barangay San Antonio, Parañaque City.

Keywords: SQL Server Management Studio, Visual Basic for Applications, and

Microsoft IDE-Visual Studio, Management System, Bachelor of Science in

Information Technology and Polytechnic University of the Philippines


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

TABLE OF CONTENTS

Page

Title Page i

Certification and Approval Sheet ii

Acknowledgement iii

Certification of Originality iv

Abstract

Table of Contents

List of Tables

List of Figures

Chapter 1 The Problem and Its Setting

Introduction
Purpose and Description
Significance of the Study
Objectives
Scope and Delimitation
Definition of Terms

Chapter 2 REVIEW RELATED LITERATURE AND SYSTEMS

Chapter 3 METHODOLOGY, RESULTS AND DISCUSSIONS

Requirements Analysis
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Requirements Documentation

Design of Software, Systems, Product or Process

Development and Testing

Implementation Plan

Data Case Analysis

Chapter 4 PRESENTATION, ANALYSIS AND INTERPRETATION OF DATA

User’s Interface (Admin)

Result and Discussion

Result of the Survey

Chapter 5 CONCLUSION AND RECOMMENDATIONS

Summary of findings

Conclusions

Recommendations

Bibliography

Appendices

A. Letter Request

B. Interview Guide Questions

C. Transcription

D. Researchers Profile

LIST OF FIGURES
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 1. Conceptual Framework


Figure 2. DFD diagram
Figure 3. ER Diagram
Figure 4. Waterfall Model
Figure 5. Flowchart
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CHAPTER I

THE PROBLEM AND ITS SETTING

The continuous development in technology has contributed massively to the

increase of all classes of the economy. As the global economy ages, change is

emerging. Information technology has grown above the surface of the initiatives for

development. It lies at the core of the mechanism of the innovation center for

streamlining procedures in both the public and private sectors of the business. It is

becoming less of an option but more of a necessity for people, computers play a

vital role in supporting them.

According to Sakthivel (2014), The Management Information System (MIS)

plays almost the same role in the organization. The system ensures that sufficient

data is gathered from different sources, stored and transmitted to all required

destinations. The system is supposed to satisfy the information needs of individuals,

classes of individuals, administrators: managers and senior management. Thus, the

computerized environment is a highly effective one, which manages and preserves

vast volumes of data. Extensive documents will not be a challenge for a post

industrialized society, as will inefficient and slow production and preparation of

citizen profiles and certificates.

A Barangay is considered as the smallest unit of the government in the

Philippines. It performs the initial operations such as formation and employment of

programs, activities, policies and others that involve the community. As the
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Philippines population increases, the number of households in each barangay in the

country increases.

Lado (2017) stated that a computerized barangay information system is

appropriate for use by barangay employees, who have access to profiles of

barangay residents for the direct reports. In addition, departmental organizational

personnel that have a business need for this knowledge can also support their

business unit. It is responsible for an effective and efficient solution for workers and

citizens of Barangay. That would help them do the job better which would also

eliminate the need for a big workforce. Provides profile-based information for

residents.

In this project, it will allow the Barangay San Antonio, Parañaque City the

ability to reduce paperwork and computer services so that they can serve their

citizens more easily. In the past years, there were only few residents in the

barangay San Antonio, and so the paperwork of all the residents could be managed

easily. Thus, the researchers will propose a management information system for

Barangay San Antonio, Paranaque City, a software that will give secured storage,

maintain reliability and accuracy, and faster tracking of the files.

A. PURPOSE AND DESCRIPTION

The purpose of this is to potentially help in achieving effective and efficient

public services. This study aims to help the staff/employees of the barangay to
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

manage their important files and records properly and make their work faster,

smoother, and precise by using the system as an admin while the residents will be

able to view their own information only. The system will focus on improvement and

implementation of a software that will automate the records, managing of files, and

printing of certificates of the barangay to promote efficiency in terms of manual

services of the barangay.

Barangay Management System Features

● Admin login is only accessible for barangay officials, secretaries, or any staff

that is responsible.

● Time-in and time-out button for employees to log their shift.

● Creating new records, reading and viewing of information, updating and

deleting records of data, and printing of certificates.

● Direct fill-ups for ready to print certificates.

B. SIGNIFICANCE OF THE STUDY

This system will have a significant effect on both the residents and the

employees of the barangay who manage the system as well as the barangay

itself. The results of the study will be beneficial to the following:

Barangay Staff/Employees, the one who manages the files, documents and

information of the barangay as it will be easier to access and to update the data

they need.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Residents, as for the relevant information will be accessible so it will be easier

for them if there are some changes that need to be done.

Future researchers, this study may be used as a reference data in conducting

new research about barangay management systems.

C. OBJECTIVES

a. General Objective

The main objective of this project is to improve the public services

by automation of the Barangay San Antonio, Parañaque City.

b. Specific Objectives

Specifically, this project aims;

1. To develop a system that will help in making the file and record

management secured, easier, and organized.

2. To keep track of the reel time number of registered residents.

3. To lessen the paper and time consumption of barangay

employees in relation to file retrieval from bulky documents and

other amenities that could possibly improve their service.

4. To create a system that could be available to the residents in

terms of viewing their own information.

5. To develop a system with system user level security preventing

unauthorized personnel from accessing the information.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

D. SCOPE AND LIMITATIONS

The proposed system’s scope is to develop a management system for

Barangay San Antonio, Parañaque City. When successful, this might help the

community that is having difficulties in managing and storing data information of

the residents.

The system is designed for Barangay San Antonio; it cannot cover the

personal costs of paying different bills to residents. For instance, the cost of the

utility bill to the resident is not covered. The system does not cover third-party

announcements, such as job fairs, and there is no access to other online

services. It can only register resident’s information, create documents that’s only

exclusive to the said barangay.

The setting of the project will be in Barangay San Antonio Parañaque City.

Thus, the project covers only the employees and residents of the said barangay.

This study is limited to the office of the barangay and employees who are

authorized for jobs that facilitate the records in the system.

E. DEFINITIONS OF TERMS

In order to understand the terms and the words used in the study, the

following are defined operationally and theoretically.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Automated/Automation- it is operated by largely automatic equipment and

is controlled by a machine rather than a person.

Barangay Management Information System (BMIS)- facilitates

identification of barangay needs vital for nutrition and development planning,

project implementation, monitoring and evaluation, and promotes capacity

development of Barangay Development Councils (BDCs) in e-governance.

Data- a set of values of qualitative or quantitative variables; restated, pieces

of data are individual pieces of information.

Database- is an organized collection of structured information, or data,

typically stored electronically in a computer system.

Integrated development environment (IDE)- is software for building

applications that combines common developer tools into a single graphical

user interface (GUI).

Management information system (MIS)- is a computer system consisting

of hardware and software, an MIS gathers data from multiple online systems,

analyzes the information, and reports data.

Graphical user interface (GUI)- is a type of user interface through which

users interact with electronic devices via visual indicator representations.

Software- comprises the entire set of programs, procedures, and routines

associated with the operation of a computer system.

SQL Server Management Studio SSMS- is one of the SQL Server

management tools, regardless of your location, used for designing queries

and managing databases and data warehouses via personal computer or

Cloud.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Visual Basic (VB)- is an event-driven programming language and

environment from Microsoft that provides a graphical user interface (GUI)

which allows programmers to modify code by simply dragging and dropping

objects and defining their behavior and appearance.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CHAPTER II

REVIEW RELATED LITERATURE AND SYSTEMS

This chapter presents the related literature and studies after the thorough

and in-depth search done by the developers to give insight for a better

understanding and appreciation of the project. This will summarize and analyze the

information based on local and foreign studies of previous researchers and

developers, associated with the project.

Building this system is not possible without using SQL Server Management

Studio or SSMS, which is an integrated environment for managing any SQL

infrastructure. With SSMS we are able to create the database that will allow the

users not just to input and store data but also to access, configure, manage, and

develop all of its necessary features. Which is according to Craig Stedman (2019), a

programming language used by database administrators and other IT practitioners.

This structured programming language is to handle databases and query the data

that is contained within them. It also allows the controls of data storage, processing

the data and lastly, its high-quality security.

Together with Visual Basic for Applications, a computer programming

language developed and owned by Microsoft. As Badsectoracula (2015) mentioned,

Visual Basic is a nice scripting environment. If the developers or users desire to

quickly prototype stuff and throw GUIs altogether, then using this kind of scripts is a

very good choice since the developers can rely on it; it's one of the few mainstream

basic packages for Windows. Its existence is nothing comparable so it will definitely
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

still be in 5 years. It only proves that the working features of the system will be

easier and more accessible to explore.

With VBA we are able to create the foundation of our system, it also gives us

the opportunity to automate repetitive word and data-processing functions, and

generate custom forms since it functions within MS Office applications and not a stand-

alone product.

Lastly, Microsoft Visual Studios is an IDE made by Microsoft and used for

different types of software development such as computer programs, websites, web

apps, web services, and mobile apps. It contains completion tools, compilers, and

other features to facilitate the software development process. With the use of this IDE,

we are able to create, design, and edit the interface of this system. The indicated

programming tools— SQL Server Management Studio, Visual Basic for Applications,

and Microsoft Visual Studios were used to make this system possible and also are

very helpful in getting data, processes the records of an organization specially on to

individual persons information and mostly to update the system according to the needs

of today’s generation.

In a study of Martinez (2018), The Computerized Barangay Information System

is designed for use by barangay personnel that need access to barangay resident

profiles for direct reports. It requires an effective and efficient approach from the

Barangay personnel who are in charge of the residents' information. This also profits

the departmental organizational staff in terms of allowing them to complete the job

quickly and minimize the needs of a huge crew. This also presents the residents

information accurately based on their given profiles.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

A manual-based system can capture and preserve lots of things and various

methods to be manually done, this alone can only prove that a manual information

system is a highly maintained job process such as paper files. While a computer-based

information system, data will be securely kept on databases or other highly secured

computer programs with security measures. This study supports the proponents'

proposed system by utilizing database technology for Barangay Unang Sigaw's

Computerized Barangay Resident Information Management and Issuance System; this

will allow them to have accurate information about their residents to use in their reports,

which will aid them in upcoming LGU meetings. Medel (2015).

As studied by Shwetadhuri (2015), The information management system is

known to be a mechanism for delivering various administrative functions to different

facilities. Lots of tools have been evolving year after year and different methods are

also offered and extremely diverse. Managing is one of a very effective ways of

handling and monitoring multiple tasks, decision making and access to process lots of

information.

As per Eithne Rhoads (2011) Information system has a range of deals that will

help any organization. Organizations and users must be mindful and careful on how a

person's information can be delivered. There are some aspects that need to be

clarified once the use of information technology, data processes, and people’s

information are already acquired and recorded.

In this study, the Barangay Management System that is developed by the

researcher can have a secured system database for the given information of every
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

individual. Offers a good quality of service and makes the job easier and timely

irrelevant for the Barangay staff and its people. It will also give a friendly-user interface

and features that will help every individual work in the easiest ways possible.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CHAPTER III

METHODOLOGY

A. REQUIREMENT ANALYSIS

The importance of having a Barangay Management System is fixing the issue

of handling data and documents more effectively, as well as making it possible for

workers to find a faster means of recording and managing all the residents' files. To

access the system, the user must log in with a password for safe and secured personal

information of the residents.

a. CONCEPTUAL FRAMEWORK

This illustrates what the developers expect to find during the making of the

project. It also defines the relevant variables for your study and maps out how they

might relate to each other.

Figure 1. Conceptual Framework


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

b. DATA FLOW DIAGRAM

This data flow diagram shows the way information flows through a process or

system. It includes data inputs and outputs, data stores, and the various sub

processes the data moves through.

Figure 2. DFD Diagram


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

c. ENTITY RELATIONSHIP DIAGRAM

This will illustrate how “entities” such as; people, objects or concepts are

related to each other within a system.

Figure 3. ER Diagram
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

d. ITERATIVE MODEL

The developers adopted the “Iterative Model” of System Development Life

Cycle (SDLC) in which this model is specifically designed to start with the bare

minimum requirements and only implement a part of the program.

Figure 4. Iterative Model

e. Sequential Phase of Iterative Model


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

● Requirement gathering and analysis − The system's requirements are

defined in detail throughout this phase. Throughout the process, users of

the system are interviewed to learn what they expected from it. The

developers will analyze the gathered information from the client.

● Design − The software solution is prepared in the Design phase to meet

the design requirements. The system design could be completely new or a

continuation of a previous build.

● Implementation and Testing − The system is created throughout the

implementation and test phases by coding and developing the user

interface and modules, which are the incorporated and tested.

● Deployment − Once the functional and non-functional testing is done; the

product is deployed in the customer environment or released into the

Barangay.

● Review - After the product has been deployed, this phase is used to check

the behavior and integrity of the developed product. If any errors are

discovered, the process is restarted from the requirement gathering stage.

● Maintenance − There are some issues which come up in the client

environment. To fix those issues, patches are released. Also, to enhance

the product some better versions are released. Maintenance is done to


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

deliver these changes in the customer environment. The system will have

an exact date for checking monthly and maintenance to see if it’s working

normally, and will continue to provide great service to the Barangay for the

future.

B. DESIGN OF SOFTWARE, SYSTEMS, PRODUCT, AND PROCESS

a. USER DIAGRAM

Figure 5. User Diagram


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

b. Architecture Diagram of Barangay Management System

Figure 6. Architecture Diagram


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

C. REQUIREMENT DOCUMENTATION

a. Plotting:

● Log in and out system.

● A feature that can view residents’ information.

● Search bar for the names of the residents.

● Creation, updating, and deleting of residents’ information as well as

barangay clearances and certificates.

b. Proposal, Development, and Introducing

This presents how the development of the project was carried out, from

the project proposal, brainstorming, to introducing it to the client.

Project Proposal
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

The developers contacted the potential client to schedule a meeting

regarding the introduction of the desired system. After a few rounds of

discussions, the client and developers closed an agreement on specific

features needed for the system.

Development of the System

The second meeting with the clients gave the developers a chance to

present the progress in the system. After the first demo, the client suggested a

few more features and pointed out which to fix in the system.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Introducing the system

At the last meeting, the client requested to conduct a demonstration to the

employees of the barangay specially to the group of staffs whose duty will be

related to the developed system. The developers immediately conducted an

on-the-spot presentation in which they discussed about the purpose, features,

the advantages, as well as the suggestions and ideas of the people involved.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

A. Survey and Feedback

After the presentation, the developers conducted a survey to see how much the

system will help the barangay staff and its residents. Also, to know the efficiency and

reliability of the system itself.

B. DEVELOPMENT AND SYSTEM TESTING

System testing phase includes defection of errors in the software. Researchers

will test the system with the client to see if the design they want is created. And also, to

prove that our system meets the client's expectations. The Barangay Management

System is a software framework that was developed to enhance the manual services

of the barangay, therefore making a system that is easier and faster for the

staff/employee and the residents, safer and secured records of data.

C. IMPLEMENTATION PLAN

The implementation phase may take a long time and that depends on the

complexity of the system and the solution it presents. When the software developers

have already indicated that the system will be able to be deployed after the evaluation,

the deployment strategy will be implemented.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

D. DATA CASE ANALYSIS

1. Weighted Mean

This is used to determine the mean with regards to their personal profile, The

average weighted mean is a value that is derived from the responses of the likert scale

survey questionnaires.

The figure shown above is the formula for the weighted mean. In simple terms,

the formula can be written as:

Weighted mean = ΣWX/N


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 3.1 Likert Scale

Strongly
Strongly Slightly Slightly
Disagree Agree
Disagree Disagree Agree
Agree

(1) (2) (3) (4) (5) (6)

The proponents used the Likert Scale to verbally represent how much the

respondents agree or disagree with the statements. The survey questionnaires will be

used as the basis of the evaluation of the Barangay Management System for Barangay

San Antonio, Parañaque City. This table shows that strongly agree is equivalent to 6

which has the highest rating; agree is equivalent to 5; slightly agree is 4; slightly

disagree is 3; disagree is 2; and, strongly disagree is 1 which is the lowest rating a

respondent could provide.

In designing, developing, and evaluating the proposed system, the ISO 25010

software quality model is used. The ISO 25010 software quality model identifies eight

main quality characteristics: functionality, performance efficiency, compatibility,

usability, reliability, security, maintainability and portability.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 3.2 Likert Scale

RATE VERBAL INTERPRETATION INTERVAL

6 STRONGLY AGREE 1-6

5 AGREE 1-5

4 SLIGHTLY AGREE 1-4

3 SLIGHTLY DISAGREE 1-3

2 DISAGREE 1-2

1 STRONGLY DISAGREE 1
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CHAPTER IV

PRESENTATION, ANALYSIS AND INTERPRETATION OF DATA

This chapter presents and discusses the results, analysis and interpretation of

data along with the innovation, tools, software, and the evaluation of the respondents

to the newly developed system.

The respondents of the system are the IT Experts, BSIT Students, Local

Government Employees are all presented using tables. The system is evaluated in

functionality, performance efficiency, compatibility, usability, reliability, security,

maintainability and portability.

System Interface

Figure 4.1, 4.2 and 4.3 User Login Interface


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.1 interface will serve as the User Login of the admin (Barangay staff)

that are responsible for the said Barangay Management System. Figure 4.2

shows the time-in and time-out as well as the date and status for the admin to

handle the system. Figure 4.3, this interface is to enable all the buttons once

the admin is already time-in and disabled after time-out.

Figure 4.4 and 4.5 Dashboard and History Transact


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.4, Dashboard indicates the overall tally in each transaction such as the totality

of the registered Residency, Indigency, and issued Barangay Clearance. Figure 4.5 is

the History of Transact, to make an easy track of records each month or year.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.6 Resident Information

Figure 4.6, this interface makes the admins perform create and update for the

residents information.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.7 Certificate of Residency and Indigency

Figure 4.7 shows the interface that performs update, create and print the

residents Certificate of Residency and Indigency.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.8 Barangay Clearance

Figure 4.8 is the Barangay Clearance interface, this shows that the admin can

update, create and print the residents Barangay Clearance.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Figure 4.9 Printed Barangay Clearance

Figure 4.9 is the example Barangay Clearance ready to be printed


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.1 Profile of the respondents in terms of sex.

Gender Frequency Percentage

Male 9 45%

Female 11 55%

TOTAL 20 100%

Table 4.1 shows the profile of the respondents in terms of their gender. The

majority came from females with a total of 11 (55% in percentage) females. There are

only 9 males with a 45% percentage.

Table 4.2 Type of Respondents

Respondents Frequency Percentage

IT Experts 6 30%

Local Government Employee 9 45%

BSIT Student 5 25%

TOTAL 20 100%

Table 4.2 shows the type of respondents. In this table, the majority of the

respondents came from the Local Government Employee with a total of 9 respondents

and 45% in percentage, while the lowest came from the BSIT Student with a total of 5

respondents and 25% in percentage.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.3 Evaluation of the application in terms of Functionality

Functionality SD D SLD SLA A SA Weighted Verbal


Interpretation
Mean

1. The system can 4 12 4 4.6 SLIGHTLY


cover all the AGREE
specified tasks and
user objectives
(Functional
completeness).

2. The system can 1 13 6 5.25 AGREE


provide the correct
results with the
needed degree of
precision.
(Functional
correctness).

3. The system 1 11 8 5.35 AGREE


facilitates the
accomplishment of
specified tasks and
objectives.
(Functional
appropriateness)

TOTAL 6 36 18 5.2 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.3 presents the evaluation of the application in terms of Functionality.

The highest mean with 5.35 weighted mean got a verbal interpretation of “Agree” is

from question 3, while the lowest with a weighted mean of 4.6 with a verbal

interpretation of “Slightly Agree” is from question no. 1. The overall mean got a 5.2

weighted mean and a verbal interpretation of “Agree”.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

According to Salleh, M., et. al., (2017), It is found that there is an increase of

research related to software functionality service for the last five years mainly in

functionality service development while there is still lack of research coverage on

functional compliance sub-characteristics. Future work should include reviewing a

greater number of articles from more various types of journals and workshops.

Table 4.4 Evaluation of the application in terms of Performance Efficiency

Performance Weighted Verbal


SD D SLD SLA A SA
Efficiency Mean Interpretation

4.The system’s
response and
processing times
and throughput
rates when 2 11 7 5.25 AGREE
performing its
functions, meet
requirements.
(Time Behavior)

5.The system’s
amounts and
types of
resources used
when performing 4 9 7 5.15 AGREE
its functions, meet
requirements.
(Resource
Utilization)

6. The system’s
maximum limits of
SLIGHTLY
parameters meet 1 6 10 3 4.75
AGREE
requirements.
(Capacity)

TOTAL 1 12 30 17 5.15 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA -


Slightly Agree; A - Agree; SA – Strongly Agree
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.4 discusses the evaluation of the application in terms of Performance

Efficiency. Question no. 4 got the highest mean of 5.25 with a verbal interpretation of

“Agree” followed by question no. 5 with a weighted mean of 5.15; verbal interpretation

of 5.15, and lastly the lowest with 4.75 weighted mean and a verbal interpretation of

“Slightly Agree”. In totality, 5.15 weighted mean and a verbal interpretation of “Agree”.

Designing effective control systems that take a proactive approach to

eliminating systems and detect, correct, and recover from threats when they occur.

Making it easier to build controls into systems at the initial design stage than to add

them after the fact. If any system has to be effective it should include a combination of

well qualified human resources, the best software, and hardware and databases.

(Ramly, 2011).

Table 4.5 Evaluation of the application in terms of Compatibility

Compatibility SD D SLD SLA A SA Weighted Verbal


Mean Interpretation

7. The system can 6 12 2 4.8 SLIGHTLY


perform its AGREE
required functions
efficiently while
sharing a common
environment and
resources with
other products,
without detrimental
impact on any
other product. (Co-
existence)

8. The system can 1 4 8 7 5.05 AGREE


exchange
information and
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

use the information


that has been
exchanged.
(Interoperability)

TOTAL 1 10 20 9 4.92 SLIGHTLY


AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.5 presents the evaluation of the application in terms of Compatibility.

Question no. 8 got the highest weighted mean of 5.05 interpreted as “Agree” while the

lowest is question no. 7 of 4.8 weighted mean interpreted as “Slightly Agree”. The

overall verbal interpretation “Slightly Agree'' has a weighted mean of 4.92.

A compatibility test is an assessment used to ensure a software application is

properly working across different browsers, databases, operating systems (OS),

mobile devices, networks and hardware. Compatibility testing is a form of non-

functional software testing -- meaning it tests aspects such as usability, reliability and

performance - that is used to ensure trustworthy applications and customer satisfaction.

Brush K. (2022).
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.6 Evaluation of the application in terms of Usability

Usability SD D SLD SLA A SA Weighted Verbal


Mean Interpretation

9. The system 1 10 9 5.35 AGREE


allows users to
recognize if it is
appropriate for
their needs.
(Appropriateness
Recognizability)

10. The system 5 9 6 5.05 AGREE


can be used by
specified users to
achieve specific
goals of learning to
use the application
with effectiveness,
efficiency, freedom
from risk and
satisfaction in a
specified context
of use.
(Learnability)

11. The system 3 7 10 5.35 AGREE


has attributes that
make it easy to
operate and
control.
(Operability)

12. The system 2 8 10 5.40 AGREE


protects users
against making
errors. (User Error
Protection)

13. The system’s 4 7 9 5.25 AGREE


user interface
enables pleasing
and satisfying
interaction for the
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

user. (User
Interaction
Aesthetics)

14. The system 1 9 10 5.40 AGREE


can be used by
people with the
widest range of
characteristics and
capabilities to
achieve a specified
goal in a specified
context of use
(Accessibility)

TOTAL 1 15 50 54 5.30 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.6 shows the evaluation of the application in terms of Usability.

Question no. 12 and 14 both got the highest weighted mean of 5.40 with the verbal

interpretation of “Agree” while question no. 10 got the lowest weighted mean of 5.05.

The overall total is 5.30 weighted mean with a verbal interpretation of “Agree”.

Usability is an important factor for all software quality models. It is the key factor

in the development of successful interactive software applications. Usability is the most

widely used concept in the software engineering field and defines the software

system’s demand and use. Madan, A. et. al. (2012).


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.7 Evaluation of the application in terms of Reliability

Reliability SD D SLD SLA A SA Weighted Verbal


Mean Interpretation

15. The system 7 8 5 4.90 SLIGHTLY


meets the needs for AGREE
reliability under
normal operation
(Maturity)

16. The system is 4 11 5 5.05 AGREE


operational and
accessible when
required for use.
(Availability)

17. The system 4 11 5 5.05 AGREE


operates as
intended despite the
presence of
hardware or
software faults.
(Fault Tolerance)

18. The system can 11 9 5.45 AGREE


recover the data
directly affected and
re-establish the
desired state.
(Recoverability)

TOTAL 15 41 24 5.11 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.7 presents the evaluation of the application in terms of Reliability. The

highest weighted mean was from question no. 18 with 5.45 and a verbal interpretation

of “Agree”. The lowest is question no. 15 with a weighted mean of 4.90 and a verbal
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

interpretation of “Slightly Agree”. Overall, the weighted mean is 5.11 with a verbal

interpretation of “Agree”.

According to Raza, M. (2019) Reliability follows an exponential failure law,

which means that it reduces as the time duration considered for reliability calculations

elapses. In other words, reliability of a system will be high at its initial state of operation

and gradually reduce to its lowest magnitude over time.

Table 4.8 Evaluation of the application in terms of Security

Security SD D SLD SL A SA Weighted Verbal


A Mean Interpretation

19. The system 2 7 11 5.45 AGREE


ensures that data
are accessible only
to those authorized
to have access.
(Confidentiality)

20. The system 3 9 8 5.25 AGREE


prevents
unauthorized access
to, or modification of,
computer programs
or data. (Integrity)

21. The system can 4 10 6 5.10 AGREE


be proven to have
taken place, so that
the events or actions
cannot be repudiated
later. (Non-
repudiation)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

22. The system can 4 6 10 5.30 AGREE


trace uniquely the
actions of an entity.
(Accountability)

23. The system can 1 12 7 5.30 AGREE


prove the identity of
a subject or resource
claimed
(Authenticity)

TOTAL 14 44 42 5.28 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA -

Slightly Agree; A - Agree; SA – Strongly Agree

Table 4.8 evaluates the application in terms of Security and presents that

question no. 19 got the highest weighted mean of 5.45 and a verbal interpretation of

“Agree” while question no. 21 got the lowest weighted mean of 5.10 verbal

interpretation of “Agree”. The overall weighted mean is 5.28 which has a verbal

interpretation of “Agree”.

System security goes hand-in-hand with data security. System security

describes the controls and safeguards that an organization takes to ensure its

networks and resources are safe from downtime, interference or malicious intrusion. If

data security is meant to protect the information in the books in the library, then system

security is what protects the library itself. Priela, E. (2022).


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.9 Evaluation of the application in terms of Maintainability

Maintainability SD D SLD SLA A SA Weighted Verbal


Mean Interpretation

24. The system is 2 12 6 5.20 AGREE


composed of
discrete
components such
that a change to
one component
has minimal impact
on other
components.
(Modularity)

25. The system 4 8 8 5.20 AGREE


can be used in
more than one
system, or in
building other
assets.
(Reusability)

26. The system can 1 15 4 5.15 AGREE


assess the impact
of an intended
change to one or
more of its parts, or
to diagnose a
product for
deficiencies or
causes of failures,
or to identify parts
to be modified.
(Analyzability)

27. The system can 3 13 4 5.05 AGREE


be effectively and
efficiently modified
without introducing
defects or
degrading existing
product quality.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

(Modifiability)

28. The system can 2 11 7 5.25 AGREE


be established for a
system, product, or
component and
tests can be
performed to
determine whether
those criteria have
been met.
(Testability)

TOTAL 12 59 29 5.17 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.9 presents the evaluation of the application in terms of Maintainability.

Question no. 28 with a weighted mean of 5.25 got the highest, a verbal interpretation

of “Agree” while question no. 27 got the lowest weighted mean of 5.05, a verbal

interpretation of “Agree”. The Overall weighted mean is 5.17 with a verbal

interpretation of “Agree”.

Maintainability measures the ease and speed with which a system can be

restored to operational status after a failure occurs. Software maintainability means the

ease with which these operations can be carried out. If the maintainability can be

measured in early phases of the software development, it helps in better planning and

optimum resource utilization. Malhotra, R., Chug, A. (2022).


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Table 4.10 Evaluation of the application in terms of Portability

Portability SD D SLD SLA A SA Weighted Verbal


Mean Interpretation

29.The system can 4 10 6 5.10 AGREE


effectively and
efficiently be adapted
for different or
evolving hardware,
software or other
operational or usage
environments.
(Adaptability)

30. The system can 3 13 4 5.05 AGREE


be successfully
installed and/or
uninstalled in a
specified
environment.
(Installability)

31. The system can 3 12 5 5.70 AGREE


be replaced by
another specified
software product for
the same purpose in
the same
environment.
(Replaceability)

TOTAL 10 35 15 5.07 AGREE

Legends: SD - Strongly Disagree, D - Disagree; SLD - Slightly Disagree; SLA - Slightly

Agree; A - Agree; SA – Strongly Agree

Table 4.10 shows the evaluation of the application in terms of Portability. The

highest weighted mean came from question no. 31 with 5.70 and a verbal

interpretation of “Agree” while question no. 30 got the lowest with a 5.05 weighted
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

mean and a verbal interpretation of “Agree”. The overall weighted mean is 5.07 and a

verbal interpretation of “Agree”.

Portability is the ability of an application to run properly in a different platform to

the one it was designed for, with little or no modification. Where modification is needed,

the task of modifying the software to allow it to run in the new environment is known as

porting. Portability is generally considered a desirable characteristic to have for a

software product, especially in the ever-growing mobile market. Johansson, A., et.

al.(2021).
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CHAPTER V

CONCLUSION AND RECOMMENDATIONS

This chapter presents the summary of the findings and conclusions drawn from

the gathered data and recommendations offered based on the study. Still, these

conclusions are relevant to the process of upgrading and automating of barangay

services.

A. Summary of Research

This study observed the process of developing a system for Barangay

San Antonio, Parañaque City. The literature review was concentrated on the

process of progressive development occurring with the same system. It was

found that, based on observations of the studies, Barangay Management

Systems are efficient for each barangay, however some barangays are still

rooting in the traditional way.

The study was undertaken in the Barangay San Antonio, Parañaque

City. The intention was to observe the problems on manual processing of

barangay requirements and how to give a solution on a long-term basis. The

development of the project showed a lot of different ideas combined into one

system. The efficiency, functionality, security, and credibility of the system was

observed in a survey sample using parameters relevant to the project.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Survey results showed that the system met the bar of needs of the

Barangay San Antonio, Parañaque City. However, further developments are

still expected for its future upgrades.

B. Conclusion

In today’s world, almost everything can be done with the power of

technology. That's why most of the things are upgraded in a very automated

way and one of them is a barangay automated system. Instead of doing

requirements manually, with the help of information technology it can be done

easily, securely, and with quality. Therefore, it concludes that a barangay

management system would greatly help in improving the public service of

Barangay San Antonio, Parañaque City.

C. Recommendations for Further Research

Based on the finding and conclusion of the capstone project, the

following are hereby recommended for the improvement of the project in the

near future.

1. To make the system more open to the public with reliable

security.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

2. To widen the scope of the system rather than it being available

only in a specific area.

3. Upgrading the interface and the system itself by the means of

needs and trends.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

APPENDIX A

March 01, 2022

Dear Secretary Jomar Eugenio,

Good day! I am writing to ask for permission to conduct a survey among the

employees regarding the system proposed by my team, entitled “Barangay

Management System for San Antonio Parañaque City”. If the time works for you, we

would like to start the survey right after the demo of our system today (March 01, 2022).

Please confirm whether that works for you or if another time is better. Thank

you for your consideration and kindness.

Project Manager,

Niña Bianca Estijal

Sec. Jomar Eugenio


Barangay Secretary
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

APPENDIX B

Survey Questionnaire

Good day!

We are fourth year students of Bachelor of Science in Information Technology

in Polytechnic University of the Philippines-Parañaque Campus, who are

developing a system entitled “Barangay Management System for Barangay San

Antonio, Parañaque City” in partial fulfillment of the requirements for our capstone

project.

We assure you that all the information provided by you will be kept strictly

confidential and will be used only for the academic research purpose.

Thank you so much for your cooperation.

Yours truly,

Estijal, Nina Bianca M.

Dalisay, Jhon Khyle P.

Cruz, Laiza Marie Christine V.

Cuerdo, Criscel B.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Email: Gender:

Name (Optional): Age:

Type of Respondent:

● IT Expert

● College Professor

● Local Government Employee

● BSIT Student

Instructions: Using the 6-point scale shown below. Rate the following statements

from 1-6. Do not leave each item unanswered. Scale: 6 – Strongly Agree, 5 – Agree,

4 - Slightly Agree, 3 – Slightly Disagree, 2 – Disagree, 1- Strongly Disagree.

Strongly Disagree Slightly Slightly Agree Strongly


Functionality Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

1. The system can


cover all the
specified tasks and
user objectives.
(Functional
completeness).

2. The system can


provide the correct
results with the
needed degree of
precision.
(Functional
correctness).

3. The system
facilitates the
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

accomplishment of
specified tasks and
objectives.
(Functional
appropriateness)

Performance Strongly Disagree Slightly Slightly Agree Strongly


Efficiency Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

4.The system’s
response and
processing times
and throughput
rates when
performing its
functions, meet
requirements.
(Time Behavior)

5.The system’s
amounts and types
of resources used
when performing
its functions, meet
requirements.
(Resource
Utilization)

6. The system’s
maximum limits of
parameters meet
requirements.
(Capacity)

Strongly Disagree Slightly Slightly Agree Strongly


Compatibility Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

7. The system can


perform its required
functions efficiently
while sharing a
common
environment and
resources with
other products,
without detrimental
impact on any
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

other product. (Co-


existence)

8. The system can


exchange
information and
use the information
that has been
exchanged.
(Interoperability)

Strongly Disagree Slightly Slightly Agree Strongly


Usability Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

9. The system
allows users to
recognize if it is
appropriate for
their needs.
(Appropriateness
Recognizability)

10. The system


can be used by
specified users to
achieve specific
goals of learning to
use the application
with effectiveness,
efficiency, freedom
from risk and
satisfaction in a
specified context of
use. (Learnability)

11. The system


has attributes that
make it easy to
operate and
control.
(Operability)

12. The system


protects users
against making
errors. (User Error
Protection)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

13. The system’s


user interface
enables pleasing
and satisfying
interaction for the
user. (User
Interaction
Aesthetics)

14. The system


can be used by
people with the
widest range of
characteristics and
capabilities to
achieve a specified
goal in a specified
context of use
(Accessibility)

Strongly Disagree Slightly Slightly Agree Strongly


Reliability Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

15. The system


meets the needs
for reliability under
normal operation
(Maturity)

16. The system is


operational and
accessible when
required for use.
(Availability)

17. The system


operates as
intended despite
the presence of
hardware or
software faults.
(Fault Tolerance)

18. The system


can recover the
data directly
affected and re-
establish the
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

desired state.
(Recoverability)

Strongly Disagree Slightly Slightly Agree Strongly


Security Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

19. The system


ensures that data
are accessible only
to those authorized
to have access.
(Confidentiality)

20. The system


prevents
unauthorized
access to, or
modification of,
computer programs
or data. (Integrity)

21. The system


can be proven to
have taken place,
so that the events
or actions cannot
be repudiated later.
(Non-repudiation)

22. The system


can trace uniquely
the actions of an
entity.
(Accountability)

23. The system


can prove the
identity of a subject
or resource
claimed
(Authenticity)

Strongly Disagree Slightly Slightly Agree Strongly


Maintainability Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

24. The system is


composed of
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

discrete
components such
that a change to
one component
has minimal impact
on other
components.
(Modularity)

25. The system


can be used in
more than one
system, or in
building other
assets.
(Reusability).

26. The system


can assess the
impact of an
intended change to
one or more of its
parts, or to
diagnose a product
for deficiencies or
causes of failures,
or to identify parts
to be modified.
(Analyzability).

27. The system


can be effectively
and efficiently
modified without
introducing defects
or degrading
existing product
quality.
(Modifiability)

28. The system


can be established
for a system,
product, or
component and
tests can be
performed to
determine whether
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

those criteria have


been met.
(Testability)

Strongly Disagree Slightly Slightly Agree Strongly


Portability Disagree (2) Disagree Agree (5) Agree
(1) (3) (4) (6)

29.The system can


effectively and
efficiently be
adapted for
different or
evolving hardware,
software or other
operational or
usage
environments.
(Adaptability)

30. The system


can be successfully
installed and/or
uninstalled in a
specified
environment.
(Installability)

31. The system


can be replaced by
another specified
software product
for the same
purpose in the
same environment.
(Replaceability)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

REFERENCES:

Badsectoracula. (2015). Visual Basic. Coursehero.Com. Retrieved from

https://www.coursehero.com/file/p1bl0gd0/Researchers-In-order-to-increase-the-

personal-knowledge-of-problem-solving-and/

Brush K. (2022). Compatibility Test. Retrieved from

https://whatis.techtarget.com/definition/compatibility-test

Lado, M., & Perez, R. (2017). Barangay Management System. Retrieved from

https://www.slideshare.net/MarkJohnPerezLado/computerized-information-system-in-

barangay- poblacion-danao-city-cebu

Madan, A. et. al. (2012). Usability evaluation methods: a literature review. Retrieved

from

https://www.researchgate.net/publication/266874640_Usability_evaluation_methods_a

_literature_review

Malhotra, R., Chug, A. (2022). Software Maintainability: Systematic Literature Review

and Current Trends. Retrieved from

https://www.worldscientific.com/doi/abs/10.1142/S0218194016500431

Medel. (2015). Computerized Barangay Resident Information Management.

Coursehero.Com. https://www.coursehero.com/file/54845019/
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Microsoft (September 11, 2019). What is SQL Server Management Studio (SSMS)?.

Microsoft. https://docs.microsoft.com/en-us/sql/ssms/sql-server-management-studio-

ssms?view=sql-server-ver15

Priela, E. (2022). Data Security vs. System Security. Retrieved from

https://www.floridatechonline.com/blog/information-technology/data-security-vs-

system-security/ March, 2022

Raza, M. (2019). System Reliability & Availability Calculations. Retrieved from

https://www.bmc.com/blogs/system-reliability-availability

calculations/#:~:text=Reliability%20is%20the%20probability%20that,follows%20the%2

0defined%20performance%20specifications

Salleh, M., et. al., (2017), An Overview of Software Functionality Service: A Systematic

Literature Review. Retrieved from

https://www.sciencedirect.com/science/article/pii/S1877050917329319

Stedman, C., (2019). SQL Server Management System. Techtarget.Com. Retrieved

from https:/ /searchsqlserver.techtarget.com/definition/SQL-Server


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CURRICULUM VITAE

CUERDO, CRISCEL B.

274 Papaya St., Brgy. BF International,

Las Piñas City

Contact no: 0967-340-1359

Email Address: [email protected]

Criscel B. Cuerdo is a student of BS Information Technology in Polythechnic

University of the Philippines-Parañaque Campus. She is mostly known as being

enthusiastic, creative and resourceful. She excels best at creating things and make it

something new. She contributes in this group project when it is timely needed. Her

hobbies are performing, writing various things such as poems, stories and creating a

song. She is very encouraging and reliable person to her friends.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CURRICULUM VITAE

NIÑA BIANCA M. ESTIJAL

Block 19 Lot 15, Princeton St. West

Governor Heights Ph2, Barangay Cabuco,

Trece Martires City, Cavite 4109

Contact no: 0910-380-0177

Email Address: [email protected]

Niña Bianca Estijal is a BS Information Technology student ay the University of

the Philippines Parañaque Campus. She is mostly known because of her passion in

spoken word poetry and writing after performing in various events of the university.

She’s an ambivert who’s attitude and characteristics are mostly defined as a mirror of

one’s personality which made her fit well in any group of people. Her interest are

always aligned with making such a huge impact by using words to openly

communicate and express herself as well as her ideas and opinions. Although, her

technical and logical skills are yet to be widened, her undeniable talent on adapting

and communicating became and will always be her asset to overcome and reach her

preferred goals in life.


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CURRICULUM VITAE

LAIZA MARIE CHRISTINE V. CRUZ

#56 Jade St. Bernabe 3 San Dionisio

Paranaque City

Contact no: 0966-744-5518

Email Address: [email protected]

Laiza Marie Christine Cruz is a student of BS Information Technology at the

Polytechnic University of the Philippines - Paranaque. She is Hard working, kind

energetic and with cheerful disposition doing school activities. She is ambitious and

always striving to improve her skills and have more confidence in herself. She likes to

learn more about life and hopefully reached her goals in life.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

CURRICULUM VITAE

JHON KHYLE DALISAY

144 Mangga St. Masville Sucat

Paranaque City, Metro Manila

Contact No. : 09213354915

Email Address: [email protected]

Jhon Khyle Dalisay is a student of BS Information Technology at the Polytechnic

University of the Philippines - Paranaque City Campus. He is friendly person and open

person. He is interested with Game Developing for Fun and Developed their Skills. and

He is basic knowledge about Adobe Desktop such as Photoshop, Illustrator, Premiere,

and Audition. and He is willing to learn new trends about technology right now.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Source Code

main_form.Show()
Imports System.Data Me.Enabled = False
Imports System.Data.SqlClient Me.Close()
Imports System.IO Else
Public Class Form1 MessageBox.Show("Wrong Username
Private Sub Form1_Load(sender As Object, e or Password." + vbCrLf + "(Try Again)",
As EventArgs) Handles MyBase.Load "Warning", MessageBoxButtons.OK,
End Sub MessageBoxIcon.Warning)
Private Sub Panel_Drag_MouseMove(sender Return
As Object, e As MouseEventArgs) Handles End If
Panel_Drag.MouseMove End Sub
Static lpos As Point
If e.Button = Private Sub Form1_Paint(sender As Object, e
Windows.Forms.MouseButtons.Left Then As System.Windows.Forms.PaintEventArgs)
'move form Handles Me.Paint
Me.Location += New Size(e.X - lpos.X, ControlPaint.DrawBorder(e.Graphics,
e.Y - lpos.Y) Me.ClientRectangle, Color.FromArgb(169, 93,
Else 36), ButtonBorderStyle.Solid)
lpos = e.Location End Sub
End If End Class
End Sub
Imports System.Data.SqlClient
Private Sub Button1_Click(sender As Object, Imports System.Data
e As EventArgs) Handles Button1.Click Public Class main_form
Me.Close()
End Sub Private Const cGrip = 16
Dim cmd As SqlCommand Private Const cCaption = 32
Private Sub loginBtn_Click(sender As Object, Protected Overrides Sub WndProc(ByRef m
e As EventArgs) Handles loginBtn.Click As Message)
Dim con As SqlConnection = New If m.Msg = &H84 Then
SqlConnection("Data Source=DESKTOP- Dim pos As Point = New
NFHHL86\SQLEXPRESS;Initial Point(m.LParam.ToInt32())
Catalog=My_Database;Integrated pos = Me.PointToClient(pos)
Security=True")
con.Open() If pos.Y < cCaption Then
Dim cmd As SqlCommand = New m.Result = CType(2, IntPtr)
SqlCommand("SELECT * FROM login where Return
username = @username and password = End If
@password", con)
cmd.Parameters.Add("@username", If pos.X >= Me.ClientSize.Width - cGrip
SqlDbType.VarChar).Value = userBox.Text AndAlso pos.Y >= Me.ClientSize.Height - cGrip
cmd.Parameters.Add("@password", Then
SqlDbType.VarChar).Value = passBox.Text m.Result = CType(17, IntPtr)
Dim sda As SqlDataAdapter = New Return
SqlDataAdapter(cmd) End If
Dim dt As DataTable = New DataTable() End If
sda.Fill(dt)
If (dt.Rows.Count > 0) Then MyBase.WndProc(m)
MessageBox.Show("Login Successfully.",
"Information", MessageBoxButtons.OK, End Sub
MessageBoxIcon.Asterisk)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub Panel_Drag_MouseMove(sender Me.Enabled = False


As Object, e As MouseEventArgs) Handles resident_infoForm.Show()
Panel_Drag.MouseMove End Sub
Static lpos As Point
If e.Button = Private Sub ctf_indi_resiBtn_Click(sender As
Windows.Forms.MouseButtons.Left Then Object, e As EventArgs) Handles
'move form ctf_indi_resiBtn.Click
Me.Location += New Size(e.X - lpos.X, Me.Hide()
e.Y - lpos.Y) Me.Enabled = False
Else ctf_indi_form.Enabled = True
lpos = e.Location ctf_indi_form.Show()
End If 'Me.Close()
End Sub End Sub
Private Sub logoutBtn_Click(sender As Object,
e As EventArgs) Handles logoutBtn.Click Private Sub brgy_clearanceBtn_Click(sender
Form1.Show() As Object, e As EventArgs) Handles
Form1.Enabled = True brgy_clearanceBtn.Click
Me.Enabled = False Me.Hide()
Me.Close() Me.Enabled = False
End Sub ctf_brgy.Show()
End Sub
Private Sub main_form_Load(sender As Private Sub inBtn_Click(sender As Object, e
Object, e As EventArgs) Handles MyBase.Load As EventArgs) Handles inBtn.Click
Dim USERNAME = admin_name.Text
Me.ResizeRedraw = True Dim TIME_IN As String =
'TODO: This line of code loads data into TimeOfDay.ToString("hh:mm tt")
the 'DataSet1.attendance' table. You can move, Dim DATE_IN As String =
or remove it, as needed. DateTime.Now.ToString("dd:MMM:yyyy")
Dim STATUS_IN As String = "In"
Me.AttendanceTableAdapter.Fill(Me.DataSet1.a Dim val As String = "SELECT * FROM
ttendance) attendance WHERE
admin_name.Text = Form1.userBox.Text [USERNAME]=@USERNAME and
'outBtn.Enabled = False [DATE_IN]=@DATE_IN and
Timer1 = New Timer [STATUS_IN]=@STATUS_IN"
AddHandler Timer1.Tick, AddressOf
Timer1_Tick Using con As New SqlConnection("Data
Timer1.Start() Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
dashboardBtn.Enabled = False Catalog=My_Database;Integrated
imgbtn.Enabled = False Security=True")
res_infBtn.Enabled = False Using cmd As SqlCommand = New
ctf_indi_resiBtn.Enabled = False SqlCommand(val, con)
brgy_clearanceBtn.Enabled = False
historyBtn.Enabled = False cmd.Parameters.AddWithValue("@USERNAME
outBtn.Enabled = False ", USERNAME)
End Sub
Public Sub Timer1_Tick(ByVal sender As cmd.Parameters.AddWithValue("@DATE_IN",
Object, ByVal e As EventArgs) DATE_IN)
date3.Text =
DateTime.Now.ToString("dddd : MM : yyyy") cmd.Parameters.AddWithValue("@STATUS_IN",
time.Text = TimeOfDay.ToString("hh : mm : STATUS_IN)
tt") Dim adp As New SqlDataAdapter(cmd)
End Sub Dim myT As New DataTable

Private Sub res_infBtn_Click(sender As adp.Fill(myT)


Object, e As EventArgs) Handles
res_infBtn.Click If myT.Rows.Count > 0 Then
'Me.Close() MessageBox.Show("YOU HAVE
Me.Hide() ALREADY TIME IN TODAY", "Information",
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

MessageBoxButtons.OK, Dim val As String = "SELECT * FROM


MessageBoxIcon.Information) attendance WHERE
Return [USERNAME]=@USERNAME and
Else [DATE_OUT]=@DATE_OUT and
Dim addQ As String = "INSERT [STATUS_OUT]=@STATUS_OUT"
INTO attendance([USERNAME], [TIME_IN],
[DATE_IN], [STATUS_IN]) VALUES Using con As New SqlConnection("Data
Source=DESKTOP-
(@USERNAME,@TIME_IN,@DATE_IN,@STA NFHHL86\SQLEXPRESS;Initial
TUS_IN)" Catalog=My_Database;Integrated
Dim com As New Security=True")
SqlCommand(addQ, con) Using cmd As SqlCommand = New
SqlCommand(val, con)
com.Parameters.AddWithValue("@USERNAME
", USERNAME) cmd.Parameters.AddWithValue("@USERNAME
", USERNAME)
com.Parameters.AddWithValue("@TIME_IN",
TIME_IN) cmd.Parameters.AddWithValue("@DATE_OUT",
DATE_OUT)
com.Parameters.AddWithValue("@DATE_IN",
DATE_IN) cmd.Parameters.AddWithValue("@STATUS_O
UT", STATUS_OUT)
com.Parameters.AddWithValue("@STATUS_IN", Dim adp As New SqlDataAdapter(cmd)
STATUS_IN) Dim myT As New DataTable
con.Open()
com.ExecuteNonQuery() adp.Fill(myT)
MessageBox.Show("TIME IN
CHECK: " + TIME_IN, "Information", If myT.Rows.Count > 0 Then
MessageBoxButtons.OK, MessageBox.Show("You are
MessageBoxIcon.Information) already time out today.", "Information",
MessageBoxButtons.OK,
Me.AttendanceTableAdapter.Fill(Me.DataSet1.a MessageBoxIcon.Information)
ttendance) Return
con.Close() Else

imgbtn.Enabled = True If MessageBox.Show("ONCE YOU


res_infBtn.Enabled = True TIMEOUT 3 BUTTONS BELOW ARE DISABLE,
ctf_indi_resiBtn.Enabled = True NEXT DAY YOU WILL ENABLED THE
brgy_clearanceBtn.Enabled = True BUTTONS (JUST CLICK TIME-IN AGAIN)",
historyBtn.Enabled = True "WARNING", MessageBoxButtons.YesNo,
dashboardBtn.Enabled = True MessageBoxIcon.Warning) =
outBtn.Enabled = True Windows.Forms.DialogResult.Yes Then
logoutBtn.Enabled = False Dim addQ As String = "UPDATE
End If attendance SET TIME_OUT=@TIME_OUT,
End Using DATE_OUT=@DATE_OUT,
End Using STATUS_OUT=@STATUS_OUT
End Sub WHERE
USERNAME=@USERNAME and
Private Sub outBtn_Click(sender As Object, e DATE_IN=@DATE_IN"
As EventArgs) Handles outBtn.Click Dim com As New
Dim USERNAME = admin_name.Text SqlCommand(addQ, con)
Dim TIME_OUT As String =
TimeOfDay.ToString("hh:mm tt") com.Parameters.AddWithValue("@USERNAME
Dim DATE_OUT As String = ", USERNAME)
DateTime.Now.ToString("dd:MMM:yyyy")
Dim DATE_IN As String = com.Parameters.AddWithValue("@DATE_IN",
DateTime.Now.ToString("dd:MMM:yyyy") DATE_IN)
Dim STATUS_OUT As String = "Out"
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub dashboardBtn_Click(sender As


com.Parameters.AddWithValue("@TIME_OUT", Object, e As EventArgs)
TIME_OUT) GB1.Hide()
GB2.Hide()
com.Parameters.AddWithValue("@DATE_OUT", End Sub
DATE_OUT) Private Sub Form_Paint(sender As Object, e
As System.Windows.Forms.PaintEventArgs)
com.Parameters.AddWithValue("@STATUS_O Handles Me.Paint
UT", STATUS_OUT) ControlPaint.DrawBorder(e.Graphics,
con.Open() Me.ClientRectangle, Color.FromArgb(169, 93,
com.ExecuteNonQuery() 36), ButtonBorderStyle.Solid)
MessageBox.Show("TIME OUT End Sub
CHECK: " + TIME_OUT, "Information",
MessageBoxButtons.OK, Private Sub historyBtn_Click(sender As
MessageBoxIcon.Information) Object, e As EventArgs) Handles
historyBtn.Click
Me.AttendanceTableAdapter.Fill(Me.DataSet1.a Dim con As New SqlConnection("Data
ttendance) Source=DESKTOP-
con.Close() NFHHL86\SQLEXPRESS;Initial
Catalog=My_Database;Integrated
res_infBtn.Enabled = False Security=True")
imgbtn.Enabled = False Dim cmd As New SqlCommand("select *
ctf_indi_resiBtn.Enabled = False from history_transacts", con)
brgy_clearanceBtn.Enabled = Dim sda As New SqlDataAdapter(cmd)
False Dim dt As New DataTable
outBtn.Enabled = False sda.Fill(dt)
historyBtn.Enabled = False history_transacts.show_view.DataSource =
dashboardBtn.Enabled = False dt
logoutBtn.Enabled = True history_transacts.Show()
Else Me.Hide()
Return End Sub
End If
End If Private Sub dashboardBtn_Click_1(sender As
End Using Object, e As EventArgs) Handles
End Using dashboardBtn.Click
End Sub norlbl()
malelbl()
Private Sub maxminBtn_Click(sender As femalelbl()
Object, e As EventArgs) Handles iilbl()
maxminBtn.Click irlbl()
If WindowState = bclbl()
FormWindowState.Normal Then dashboard_form.Show()
WindowState = Me.Hide()
FormWindowState.Maximized End Sub
Else Private Sub norlbl()
WindowState = Dim con As New SqlConnection("Data
FormWindowState.Normal Source=DESKTOP-
Me.Width = 1266 NFHHL86\SQLEXPRESS;Initial
Me.Height = 742 Catalog=My_Database;Integrated
End If Security=True")
End Sub Dim cmd1 As New SqlCommand("SELECT
COUNT(DISTINCT resident_id) FROM
Private Sub minBtn_Click(sender As Object, e resident_information", con)
As EventArgs) Handles minBtn.Click con.Open()
WindowState = Dim count1 =
FormWindowState.Minimized Convert.ToString(cmd1.ExecuteScalar)
dashboard_form.nor.Text = count1
End Sub con.Close()
End Sub
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Dim cmd5 As New SqlCommand("SELECT


Private Sub malelbl() COUNT(CASE WHEN Issued_Report='Issued
Dim con As New SqlConnection("Data Certificate of Residency' THEN 1 END) AS
Source=DESKTOP- 'Residency' FROM history_transacts", con)
NFHHL86\SQLEXPRESS;Initial Dim count5 =
Catalog=My_Database;Integrated Convert.ToString(cmd5.ExecuteScalar)
Security=True") dashboard_form.toir.Text = count5
con.Open() con.Close()
Dim cmd2 As New SqlCommand("SELECT End Sub
COUNT(CASE WHEN Gender='Male' THEN 1
END) AS 'MALE' FROM resident_information ", Private Sub bclbl()
con) Dim con As New SqlConnection("Data
Dim count2 = Source=DESKTOP-
Convert.ToString(cmd2.ExecuteScalar) NFHHL86\SQLEXPRESS;Initial
dashboard_form.ml.Text = count2 Catalog=My_Database;Integrated
con.Close() Security=True")
End Sub con.Open()
Private Sub femalelbl() Dim cmd6 As New SqlCommand("SELECT
Dim con As New SqlConnection("Data COUNT(CASE WHEN Issued_Report='Issued
Source=DESKTOP- Certificate of Barangay' THEN 1 END) AS
NFHHL86\SQLEXPRESS;Initial 'Barangay' FROM history_transacts", con)
Catalog=My_Database;Integrated Dim count6 =
Security=True") Convert.ToString(cmd6.ExecuteScalar)
con.Open() dashboard_form.tobc.Text = count6
Dim cmd3 As New SqlCommand("SELECT con.Close()
COUNT(CASE WHEN Gender='Female' THEN End Sub
1 END) AS 'Female' FROM
resident_information", con) Private Sub imgbtn_Click(sender As Object, e
Dim count3 = As EventArgs) Handles imgbtn.Click
Convert.ToString(cmd3.ExecuteScalar) Me.Hide()
dashboard_form.fml.Text = count3 Me.Enabled = False
con.Close() image_form.Show()
End Sub End Sub
End Class
Private Sub iilbl()
Dim con As New SqlConnection("Data Imports System.Data.SqlClient
Source=DESKTOP- Imports System.Data
NFHHL86\SQLEXPRESS;Initial Public Class dashboard_form
Catalog=My_Database;Integrated
Security=True") Private Const cGrip = 16
con.Open() Private Const cCaption = 32
Dim cmd4 As New SqlCommand("SELECT Protected Overrides Sub WndProc(ByRef m
COUNT(CASE WHEN Issued_Report='Issued As Message)
Certificate of Indigency' THEN 1 END) AS If m.Msg = &H84 Then
'Indigency' FROM history_transacts", con) Dim pos As Point = New
Dim count4 = Point(m.LParam.ToInt32())
Convert.ToString(cmd4.ExecuteScalar) pos = Me.PointToClient(pos)
dashboard_form.toii.Text = count4
con.Close() If pos.Y < cCaption Then
End Sub m.Result = CType(2, IntPtr)
Return
Private Sub irlbl() End If
Dim con As New SqlConnection("Data
Source=DESKTOP- If pos.X >= Me.ClientSize.Width - cGrip
NFHHL86\SQLEXPRESS;Initial AndAlso pos.Y >= Me.ClientSize.Height - cGrip
Catalog=My_Database;Integrated Then
Security=True") m.Result = CType(17, IntPtr)
con.Open() Return
End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End If NFHHL86\SQLEXPRESS;Initial
Catalog=My_Database;Integrated
MyBase.WndProc(m) Security=True"
If con.State = ConnectionState.Open Then
End Sub con.Close()
Private Sub Panel_Drag_MouseMove(sender End If
As Object, e As MouseEventArgs) Handles End Sub
Panel_Drag.MouseMove Private Sub closeBtn_Click(sender As Object,
Static lpos As Point e As EventArgs) Handles closeBtn.Click
If e.Button = main_form.Show()
Windows.Forms.MouseButtons.Left Then Me.Hide()
'move form End Sub
Me.Location += New Size(e.X - lpos.X, End Class
e.Y - lpos.Y)
Else Imports System.Data.SqlClient
lpos = e.Location Imports System.Data
End If Public Class resident_infoForm
End Sub Dim conn As New SqlConnection("Data
Source=DESKTOP-
Private Sub Form_Paint(sender As Object, e NFHHL86\SQLEXPRESS;Initial
As System.Windows.Forms.PaintEventArgs) Catalog=My_Database;Integrated
Handles Me.Paint Security=True")
ControlPaint.DrawBorder(e.Graphics, Private Sub Form1_Paint(sender As Object, e
Me.ClientRectangle, Color.FromArgb(169, 93, As System.Windows.Forms.PaintEventArgs)
36), ButtonBorderStyle.Solid) Handles Me.Paint
End Sub ControlPaint.DrawBorder(e.Graphics,
Me.ClientRectangle, Color.FromArgb(169, 93,
36), ButtonBorderStyle.Solid)
Private Sub maxminBtn_Click(sender As End Sub
Object, e As EventArgs) Handles Private Sub resident_infoForm_Load(ByVal
maxminBtn.Click sender As System.Object, ByVal e As
If WindowState = System.EventArgs) Handles MyBase.Load
FormWindowState.Normal Then 'TODO: This line of code loads data into
WindowState = the 'DataSet1.resident_information' table. You
FormWindowState.Maximized can move, or remove it, as needed.
Else
WindowState = Me.Resident_informationTableAdapter.Fill(Me.D
FormWindowState.Normal ataSet1.resident_information)
Me.Width = 951 'TODO: This line of code loads data into
Me.Height = 641 the 'DataSet1.resident_information' table. You
End If can move, or remove it, as needed.
End Sub
Me.Resident_informationTableAdapter.Fill(Me.D
Private Sub minBtn_Click(sender As Object, e ataSet1.resident_information)
As EventArgs) Handles minBtn.Click BindDataGrid()
WindowState = load_data()
FormWindowState.Minimized Me.ResizeRedraw = True
End Sub
End Sub
Dim cmd As SqlCommand Private Const cGrip = 16
Dim con As New SqlConnection("Data Private Const cCaption = 32
Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial Protected Overrides Sub WndProc(ByRef m
Catalog=My_Database;Integrated As Message)
Security=True") If m.Msg = &H84 Then
Private Sub dashboard_form_Load(sender As Dim pos As Point = New
Object, e As EventArgs) Handles MyBase.Load Point(m.LParam.ToInt32())
con.ConnectionString = "Data pos = Me.PointToClient(pos)
Source=DESKTOP-
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If pos.Y < cCaption Then Using cmd As SqlCommand = New


m.Result = CType(2, IntPtr) SqlCommand(query, con)
Return Using da As SqlDataAdapter = New
End If SqlDataAdapter()
da.SelectCommand = cmd
If pos.X >= Me.ClientSize.Width - cGrip Using dt As New DataTable()
AndAlso pos.Y >= Me.ClientSize.Height - cGrip da.Fill(dt)
Then If dt.Rows.Count > 0 Then
m.Result = CType(17, IntPtr) show_view.DataSource = dt
Return Else
End If MessageBox.Show("No
End If Record Found.", "Information",
MessageBoxButtons.OK,
MyBase.WndProc(m) MessageBoxIcon.Question)
End Sub End If
End Using
Private Sub Panel_Drag_MouseMove(sender End Using
As Object, e As MouseEventArgs) Handles End Using
Panel_Drag.MouseMove End Using
Static lpos As Point End Sub
If e.Button =
Windows.Forms.MouseButtons.Left Then
'move form
Me.Location += New Size(e.X - lpos.X, Private Sub BindDataGrid()
e.Y - lpos.Y) Dim con As New SqlConnection("Data
Else Source=DESKTOP-
lpos = e.Location NFHHL86\SQLEXPRESS;Initial
End If Catalog=My_Database;Integrated
End Sub Security=True")
Dim cmd As New SqlCommand("select *
Private Sub backBtn_Click(sender As Object, from resident_information", con)
e As EventArgs) Handles backBtn.Click Dim sda As New SqlDataAdapter(cmd)
Me.Close() Dim dt As New DataTable
main_form.Show() sda.Fill(dt)
main_form.Enabled = True show_view.DataSource = dt
End Sub End Sub

Private Sub refreshBtn_Click_1(sender As


Private Sub registresBtn_Click(sender As Object, e As EventArgs) Handles
Object, e As EventArgs) Handles refreshBtn.Click
registresBtn.Click BindDataGrid()
Me.Hide() Dim con As New SqlConnection("Data
Me.Enabled = False Source=DESKTOP-
registform.Show() NFHHL86\SQLEXPRESS;Initial
End Sub Catalog=My_Database;Integrated
Security=True")
Private Sub searchBox_TextChanged(sender con.Open()
As Object, e As EventArgs) Handles Dim cmd As New SqlCommand("SELECT
searchBox.TextChanged COUNT(DISTINCT resident_id) FROM
Dim query As String = "SELECT * FROM resident_information", con)
resident_information WHERE Last_name LIKE Dim count1 =
'%" & searchBox.Text & "%' OR First_name Convert.ToString(cmd.ExecuteScalar)
LIKE '%" & searchBox.Text & "%'" con.Close()
Using con As SqlConnection = New End Sub
SqlConnection("Data Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial Private Sub IconButton1_Click(sender As
Catalog=My_Database;Integrated Object, e As EventArgs)
Security=True") Me.Close()
main_form.Enabled = True
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

main_form.Show() Private Const cGrip = 16


End Sub Private Const cCaption = 32

Private Sub updateBtn_Click(sender As Protected Overrides Sub WndProc(ByRef m


Object, e As EventArgs) Handles As Message)
updateBtn.Click If m.Msg = &H84 Then
Me.Enabled = False Dim pos As Point = New
update_res_form.Show() Point(m.LParam.ToInt32())
End Sub pos = Me.PointToClient(pos)
Private Sub load_data()
Dim cmd As New SqlCommand("SELECT * If pos.Y < cCaption Then
FROM resident_information ORDER BY m.Result = CType(2, IntPtr)
resident_id", conn) Return
Dim da As New SqlDataAdapter End If
da.SelectCommand = cmd
Dim dt As New DataTable If pos.X >= Me.ClientSize.Width - cGrip
dt.Clear() AndAlso pos.Y >= Me.ClientSize.Height - cGrip
da.Fill(dt) Then
show_view.DataSource = dt m.Result = CType(17, IntPtr)
show_view.MultiSelect = True Return
End Sub End If
End If
Private Sub minBtn_Click(sender As Object, e
As EventArgs) Handles minBtn.Click MyBase.WndProc(m)
WindowState = End Sub
FormWindowState.Minimized
End Sub Private Sub Panel_Drag_MouseMove(sender
As Object, e As MouseEventArgs) Handles
Private Sub maxminBtn_Click(sender As Panel_Drag.MouseMove
Object, e As EventArgs) Handles Static lpos As Point
maxminBtn.Click If e.Button =
If WindowState = Windows.Forms.MouseButtons.Left Then
FormWindowState.Normal Then 'move form
Me.Location += New Size(e.X - lpos.X,
WindowState = e.Y - lpos.Y)
FormWindowState.Maximized Else
Else lpos = e.Location
End If
WindowState = End Sub
FormWindowState.Normal Private Sub Form1_Paint(sender As Object, e
Me.Width = 962 As System.Windows.Forms.PaintEventArgs)
Me.Height = 645 Handles Me.Paint
End If ControlPaint.DrawBorder(e.Graphics,
Me.ClientRectangle, Color.FromArgb(169, 93,
End Sub 36), ButtonBorderStyle.Solid)
Private Sub PanelForm_Paint(sender As End Sub
Object, e As
System.Windows.Forms.PaintEventArgs) Private Sub minBtn_Click(sender As Object, e
Handles Me.Paint As EventArgs)
ControlPaint.DrawBorder(e.Graphics, Me.WindowState =
Me.ClientRectangle, Color.Black, FormWindowState.Minimized
ButtonBorderStyle.Solid) End Sub
End Sub
End Class Dim con As New SqlConnection
Dim cmd As SqlCommand
Imports System.Data.SqlClient Private Sub registform_Load(sender As
Imports System.IO Object, e As EventArgs) Handles MyBase.Load
Public Class registform con.ConnectionString = "Data
Source=DESKTOP-
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

NFHHL86\SQLEXPRESS;Initial VALUES
Catalog=My_Database;Integrated ('" + residentidBox.Text + "','" +
Security=True" lnameBox.Text + "','" + fnameBox.Text + "','" +
If con.State = ConnectionState.Open Then MIBox.Text + "','" + ageBox.Text + "'
con.Close() ,'" + addressBox.Text + "','" +
End If monthCBBox.Text + "','" + dayCBBox.Text + "','"
con.Open() + yearBox.Text +
ctzshipBox.Text = "Filipino" "','" + genderCBBOX.Text +
ctzshipBox.Enabled = False "','" + ctzshipBox.Text + "','" + civstatCBBox.Text
residentidBox.Enabled = False + "','" + stats.Text + "'
Me.ResizeRedraw = True )"
End Sub cmd.ExecuteNonQuery()
MessageBox.Show("Submit
Private Sub backBtn_Click(sender As Object, Successfully", "Information",
e As EventArgs) Handles backBtn.Click MessageBoxButtons.OK,
Me.Close() MessageBoxIcon.Question)
resident_infoForm.Enabled = True residentidBox.Text = ""
resident_infoForm.Show() lnameBox.Text = ""
End Sub fnameBox.Text = ""
Private Sub submitBtn_Click(sender As MIBox.Text = ""
Object, e As EventArgs) Handles ageBox.Text = ""
submitBtn.Click addressBox.Text = ""
If residentidBox.Text = "" Or lnameBox.Text monthCBBox.Text = ""
= "" Or fnameBox.Text = "" Or ageBox.Text = "" dayCBBox.Text = ""
Or addressBox.Text = "" Then yearBox.Text = ""
MessageBox.Show("Please Complete genderCBBOX.Text = ""
All.", "Information", MessageBoxButtons.OK, ctzshipBox.Text = ""
MessageBoxIcon.Question) civstatCBBox.Text = ""
Return stats.Text = ""
ElseIf monthCBBox.Text = "" Or Else
dayCBBox.Text = "" Or yearBox.Text = "" Or Return
genderCBBOX.Text = "" Or ctzshipBox.Text = "" End If
Or civstatCBBox.Text = "" Or stats.Text = "" End If
Then
MessageBox.Show("Please Complete
All.", "Information", MessageBoxButtons.OK, End Sub
MessageBoxIcon.Question)
Return Private Sub residentidBox_KeyPress(sender
ElseIf ageBox.Text <= 17 Then As Object, e As KeyPressEventArgs) Handles
MessageBox.Show("Below 18 Years Old residentidBox.KeyPress
is Not Allowed", "Information", If Not Char.IsDigit(e.KeyChar) And Not
MessageBoxButtons.OK, e.KeyChar = "." Then
MessageBoxIcon.Question) e.Handled = True
ageBox.Text = "" End If
Return
Else If e.KeyChar = "." Then
If MessageBox.Show("Check all inputs, if e.Handled = True
information is right ", "NOTICE", End If
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning) = If e.KeyChar = Chr(8) Then
Windows.Forms.DialogResult.Yes Then e.Handled = False
cmd = con.CreateCommand() End If
cmd.CommandType = End Sub
CommandType.Text
cmd.CommandText = "INSERT INTO Private Sub lnameBox_KeyPress(sender As
resident_information(Resident_ID, Last_name, Object, e As KeyPressEventArgs) Handles
First_name, MI, Age, Address, B_Month, lnameBox.KeyPress
B_Days, B_Year, gender, citizenship,
civil_status, Resident_Status)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If Char.IsDigit(e.KeyChar) And Not If e.KeyChar = Chr(8) Then


e.KeyChar = "." Then e.Handled = False
e.Handled = True End If
MessageBox.Show("Invalid Input", End Sub
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning) Private Sub ageBox_KeyPress(sender As
End If Object, e As KeyPressEventArgs) Handles
If Char.IsPunctuation(e.KeyChar) Then ageBox.KeyPress
e.Handled = True If Char.IsLetter(e.KeyChar) And Not
MessageBox.Show("Invalid Input", e.KeyChar = "." Then
"Information", MessageBoxButtons.OK, e.Handled = True
MessageBoxIcon.Warning) MessageBox.Show("Invalid Input.",
End If "Information", MessageBoxButtons.OK,
If e.KeyChar = Chr(8) Then MessageBoxIcon.Warning)
e.Handled = False End If
End If If Char.IsPunctuation(e.KeyChar) Then
End Sub e.Handled = True
MessageBox.Show("Invalid Input.",
Private Sub fnameBox_KeyPress(sender As "Information", MessageBoxButtons.OK,
Object, e As KeyPressEventArgs) Handles MessageBoxIcon.Warning)
fnameBox.KeyPress End If
If Char.IsDigit(e.KeyChar) And Not If ageBox.Text.Length >= 2 Then
e.KeyChar = "." Then e.Handled = True
e.Handled = True End If
MessageBox.Show("Invalid Input", If e.KeyChar = Chr(8) Then
"Information", MessageBoxButtons.OK, e.Handled = False
MessageBoxIcon.Warning) End If
End If End Sub
If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True Private Sub genderCBBOX_KeyPress(sender
MessageBox.Show("Invalid Input", As Object, e As KeyPressEventArgs) Handles
"Information", MessageBoxButtons.OK, genderCBBOX.KeyPress
MessageBoxIcon.Warning) If Char.IsDigit(e.KeyChar) And Not
End If e.KeyChar = "." Then
If e.KeyChar = Chr(8) Then e.Handled = True
e.Handled = False End If
End If If Not Char.IsDigit(e.KeyChar) And Not
End Sub e.KeyChar = "." Then
e.Handled = True
Private Sub MI_KeyPress(sender As Object, End If
e As KeyPressEventArgs) Handles If Char.IsPunctuation(e.KeyChar) Then
MIBox.KeyPress e.Handled = True
If Char.IsDigit(e.KeyChar) And Not End If
e.KeyChar = "." Then End Sub
e.Handled = True
MessageBox.Show("Invalid Input.", Private Sub monthCBBox_KeyPress(sender
"Information", MessageBoxButtons.OK, As Object, e As KeyPressEventArgs) Handles
MessageBoxIcon.Warning) monthCBBox.KeyPress
End If If Char.IsDigit(e.KeyChar) And Not
If Char.IsPunctuation(e.KeyChar) Then e.KeyChar = "." Then
e.Handled = True e.Handled = True
MessageBox.Show("Invalid Input.", End If
"Information", MessageBoxButtons.OK, If Not Char.IsDigit(e.KeyChar) And Not
MessageBoxIcon.Warning) e.KeyChar = "." Then
End If e.Handled = True
If MIBox.Text.Length >= 1 Then End If
e.Handled = True If Char.IsPunctuation(e.KeyChar) Then
End If e.Handled = True
End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End Sub End If


End Sub
Private Sub dayCBBox_KeyPress(sender As
Object, e As KeyPressEventArgs) Handles Private Sub stats_KeyPress(sender As Object,
dayCBBox.KeyPress e As KeyPressEventArgs) Handles
If Char.IsDigit(e.KeyChar) And Not stats.KeyPress
e.KeyChar = "." Then If Not Char.IsDigit(e.KeyChar) And Not
e.Handled = True e.KeyChar = "." Then
End If e.Handled = True
If Not Char.IsDigit(e.KeyChar) And Not End If
e.KeyChar = "." Then If Char.IsDigit(e.KeyChar) And Not
e.Handled = True e.KeyChar = "." Then
End If e.Handled = True
If Char.IsPunctuation(e.KeyChar) Then End If
e.Handled = True If Char.IsPunctuation(e.KeyChar) Then
MessageBox.Show("Invalid Input.", e.Handled = True
"Information", MessageBoxButtons.OK, End If
MessageBoxIcon.Warning) End Sub
End If
End Sub
Private Sub yearBox_KeyPress(sender As Dim numb As String = ""
Object, e As KeyPressEventArgs) Handles Dim rand As Random = New Random()
yearBox.KeyPress
If Char.IsLetter(e.KeyChar) And Not Private Sub GenerateBtn_Click_1(sender As
e.KeyChar = "." Then Object, e As EventArgs) Handles
e.Handled = True GenerateBtn.Click
MessageBox.Show("Invalid Input.", genBtn()
"Information", MessageBoxButtons.OK, End Sub
MessageBoxIcon.Warning) Private Sub genBtn()
End If For y As Integer = 1 To 6
numb = Date.Now.Year
If Char.IsPunctuation(e.KeyChar) Then If y = 6 Then
e.Handled = True numb += ""
MessageBox.Show("Invalid Input.", End If
"Information", MessageBoxButtons.OK, Next
MessageBoxIcon.Warning)
End If For y As Integer = 1 To 6
numb += Convert.ToString(rand.Next(0,
If yearBox.Text.Length >= 4 Then 9))
e.Handled = True Next
End If residentidBox.Text = numb
If e.KeyChar = Chr(8) Then If residentidBox.Text Then
e.Handled = False numb = Nothing
End If End If
End Sub End Sub

Private Sub civstatCBBox_KeyPress(sender Private Sub IconButton1_Click(sender As


As Object, e As KeyPressEventArgs) Handles Object, e As EventArgs) Handles
civstatCBBox.KeyPress IconButton1.Click
If Not Char.IsDigit(e.KeyChar) And Not WindowState =
e.KeyChar = "." Then FormWindowState.Minimized
e.Handled = True End Sub
End If
If Char.IsDigit(e.KeyChar) And Not End Class
e.KeyChar = "." Then
e.Handled = True Imports System.Data.SqlClient
End If Imports System.Data
If Char.IsPunctuation(e.KeyChar) Then Public Class update_res_form
e.Handled = True
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Const cGrip = 16


Private Const cCaption = 32 Me.Resident_informationTableAdapter.Fill(Me.D
ataSet1.resident_information)
Protected Overrides Sub WndProc(ByRef m End Sub
As Message) Private Sub updateBtn_Click(sender As
If m.Msg = &H84 Then Object, e As EventArgs) Handles
Dim pos As Point = New update_res_Btn.Click
Point(m.LParam.ToInt32()) For i As Integer = 0 To
pos = Me.PointToClient(pos) show_view.Rows.Count - 1
Dim cm4 As New SqlCommand("", con)
If pos.Y < cCaption Then cm4.CommandText = "UPDATE
m.Result = CType(2, IntPtr) resident_information SET Last_name='" &
Return show_view.Rows(i).Cells(1).Value & "',
End If First_name='" &
show_view.Rows(i).Cells(2).Value & "',MI='" &
If pos.X >= Me.ClientSize.Width - cGrip show_view.Rows(i).Cells(3).Value & "',Age='" &
AndAlso pos.Y >= Me.ClientSize.Height - cGrip show_view.Rows(i).Cells(4).Value & "'
Then ,Address='" &
m.Result = CType(17, IntPtr) show_view.Rows(i).Cells(5).Value &
Return "',B_Month='" &
End If show_view.Rows(i).Cells(6).Value & "',
End If B_Days='" & show_view.Rows(i).Cells(7).Value
& "'
MyBase.WndProc(m) ,B_Year='" &
End Sub show_view.Rows(i).Cells(8).Value & "',
Gender='" & show_view.Rows(i).Cells(9).Value
Private Sub Panel_Drag_MouseMove(sender & "', Citizenship='" &
As Object, e As MouseEventArgs) Handles show_view.Rows(i).Cells(10).Value & "'
Panel_Drag.MouseMove ,Civil_Status='" &
Static lpos As Point show_view.Rows(i).Cells(11).Value &
If e.Button = "' ,Resident_Status='" &
Windows.Forms.MouseButtons.Left Then show_view.Rows(i).Cells(12).Value &
'move form "'WHERE Resident_ID=" &
Me.Location += New Size(e.X - lpos.X, show_view.Rows(i).Cells(0).Value & ""
e.Y - lpos.Y) con.Open()
Else cm4.ExecuteNonQuery()
lpos = e.Location con.Close()
End If Next
End Sub MessageBox.Show("Rows Updated
Successfully.", "Information",
Private Sub Form1_Paint(sender As Object, e MessageBoxButtons.OK,
As System.Windows.Forms.PaintEventArgs) MessageBoxIcon.Question)
Handles Me.Paint
ControlPaint.DrawBorder(e.Graphics, Me.Resident_informationTableAdapter.Fill(Me.D
Me.ClientRectangle, Color.FromArgb(169, 93, ataSet1.resident_information)
36), ButtonBorderStyle.Solid)
End Sub End Sub

Dim con As New SqlConnection("Data Private Sub BackBtn_Click(sender As Object,


Source=DESKTOP- e As EventArgs) Handles BackBtn.Click
NFHHL86\SQLEXPRESS;Initial Me.Close()
Catalog=My_Database;Integrated resident_infoForm.Enabled = True
Security=True") End Sub
Private Sub update_res_form_Load(sender
As Object, e As EventArgs) Handles Private Sub show_view_DataError(sender As
MyBase.Load Object, e As DataGridViewDataErrorEventArgs)
'TODO: This line of code loads data into Handles show_view.DataError
the 'DataSet1.resident_information' table. You e.Cancel = True
can move, or remove it, as needed. End Sub
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

'keypress for integer'


Private Sub searchBox_TextChanged(sender 'only string allowed'
As Object, e As EventArgs) Handles If Char.IsDigit(e.KeyChar) And Not
searchBox.TextChanged e.KeyChar = "." Then
Dim query As String = "SELECT * FROM e.Handled = True
resident_information WHERE Last_name LIKE End If
'%" & searchBox.Text & "%' OR First_name
LIKE '%" & searchBox.Text & "%'" If Char.IsLetter(e.KeyChar) And Not
Using con As SqlConnection = New e.KeyChar = "." Then
SqlConnection("Data Source=DESKTOP- e.Handled = False
NFHHL86\SQLEXPRESS;Initial End If
Catalog=My_Database;Integrated
Security=True") If Char.IsPunctuation(e.KeyChar) Then
Using cmd As SqlCommand = New e.Handled = True
SqlCommand(query, con) End If
Using da As SqlDataAdapter = New If e.KeyChar = Chr(8) Then
SqlDataAdapter() e.Handled = False
da.SelectCommand = cmd End If
Using dt As New DataTable() End Sub
da.Fill(dt) Private Sub IsDigitForResandAge(ByVal
If dt.Rows.Count > 0 Then sender As Object, ByVal e As
show_view.DataSource = dt KeyPressEventArgs)
Else 'keypress for string'
MessageBox.Show("No 'only integer allowed'
Record Found.", "Information", If Char.IsLetter(e.KeyChar) And Not
MessageBoxButtons.OK, e.KeyChar = "." Then
MessageBoxIcon.Question) e.Handled = True
End If End If
End Using If Char.IsDigit(e.KeyChar) And Not
End Using e.KeyChar = "." Then
End Using e.Handled = False
End Using End If
End Sub If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True
Private Sub End If
show_view_EditingControlShowing(sender As If e.KeyChar = Chr(8) Then
Object, e As e.Handled = False
DataGridViewEditingControlShowingEventArgs) End If
Handles show_view.EditingControlShowing End Sub
If Me.show_view.CurrentCell.ColumnIndex Private Sub IsAddress(ByVal sender As
= 3 Then Object, ByVal e As KeyPressEventArgs)
AddHandler e.Control.KeyPress, 'keypress for integer'
AddressOf IsCharForLandF 'only string allowed'
End If If Char.IsDigit(e.KeyChar) And Not
e.KeyChar = "." Then
If Me.show_view.CurrentCell.ColumnIndex e.Handled = False
= 4 Then End If
AddHandler e.Control.KeyPress,
AddressOf IsDigitForResandAge If Char.IsLetter(e.KeyChar) And Not
End If e.KeyChar = "." Then
e.Handled = False
If Me.show_view.CurrentCell.ColumnIndex End If
= 5 Then
AddHandler e.Control.KeyPress, If Char.IsPunctuation(e.KeyChar) Then
AddressOf IsAddress e.Handled = False
End If End If
End Sub If e.KeyChar = Chr(8) Then
Private Sub IsCharForLandF(ByVal sender e.Handled = False
As Object, ByVal e As KeyPressEventArgs) End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End Sub End If


Private Sub maxminBtn_Click(sender As End If
Object, e As EventArgs) Handles
maxminBtn.Click MyBase.WndProc(m)
If WindowState = End Sub
FormWindowState.Normal Then
Private Sub Panel_Drag_MouseMove(sender
WindowState = As Object, e As MouseEventArgs) Handles
FormWindowState.Maximized Panel_Drag.MouseMove
Else Static lpos As Point
If e.Button =
WindowState = Windows.Forms.MouseButtons.Left Then
FormWindowState.Normal 'move form
Me.Width = 1351 Me.Location += New Size(e.X - lpos.X,
Me.Height = 599 e.Y - lpos.Y)
End If Else
End Sub lpos = e.Location
End If
Private Sub minBtn_Click(sender As Object, e End Sub
As EventArgs) Handles minBtn.Click
WindowState = Private Sub createBtn_Click(sender As
FormWindowState.Minimized Object, e As EventArgs) Handles
End Sub createBtn.Click
End Class Me.Enabled = False
create_indi_resForm.Show()
Imports System.Data.SqlClient End Sub
Imports System.Data
Imports System.Data.DataTable Private Sub IconButton2_Click(sender As
Object, e As EventArgs) Handles
Public Class ctf_indi_form IconButton2.Click
Me.Close()
Private Sub Form1_Paint(sender As Object, e main_form.Show()
As System.Windows.Forms.PaintEventArgs) main_form.Enabled = True
Handles Me.Paint
ControlPaint.DrawBorder(e.Graphics, End Sub
Me.ClientRectangle, Color.FromArgb(169, 93,
36), ButtonBorderStyle.Solid) Private Sub ctf_indi_form_Load(sender As
End Sub Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into
Private Const cGrip = 16 the 'DataSet1.crtf_res_indi' table. You can move,
Private Const cCaption = 32 or remove it, as needed.

Protected Overrides Sub WndProc(ByRef m Me.Crtf_res_indiTableAdapter.Fill(Me.DataSet1.


As Message) crtf_res_indi)
If m.Msg = &H84 Then
Dim pos As Point = New Me.ResizeRedraw = True
Point(m.LParam.ToInt32())
pos = Me.PointToClient(pos) End Sub

If pos.Y < cCaption Then Private Sub refreshBtn_Click(sender As


m.Result = CType(2, IntPtr) Object, e As EventArgs) Handles
Return refreshBtn.Click
End If
Me.Crtf_res_indiTableAdapter.Fill(Me.DataSet1.
If pos.X >= Me.ClientSize.Width - cGrip crtf_res_indi)
AndAlso pos.Y >= Me.ClientSize.Height - cGrip End Sub
Then Dim conn As New SqlConnection("Data
m.Result = CType(17, IntPtr) Source=DESKTOP-
Return NFHHL86\SQLEXPRESS;Initial
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Catalog=My_Database;Integrated MessageBox.Show("No
Security=True") Record Found.", "Information",
MessageBoxButtons.OK,
Private Sub updateBtn_Click(sender As MessageBoxIcon.Question)
Object, e As EventArgs) Handles End If
updateBtn.Click End Using
Me.Enabled = False End Using
updateform.Show() End Using
End Sub End Using
Private Sub printBtn_Click(sender As Object, End Sub
e As EventArgs) Handles printBtn.Click End Class
Me.Enabled = False
print_form.Show() Imports System.Data.SqlClient
End Sub Imports System.Data
Dim table As New DataTable("Table") Public Class create_indi_resForm

Private Sub maxminBtn_Click(sender As Private Sub Form1_Paint(sender As Object, e


Object, e As EventArgs) Handles As System.Windows.Forms.PaintEventArgs)
maxminBtn.Click Handles Me.Paint
If WindowState = ControlPaint.DrawBorder(e.Graphics,
FormWindowState.Normal Then Me.ClientRectangle, Color.FromArgb(169, 93,
36), ButtonBorderStyle.Solid)
WindowState = End Sub
FormWindowState.Maximized Private Property MoveForm As Boolean
Else Private Property MoveForm_MousePosition
As Point
WindowState = Private Sub Panel_Drag_MouseUp(sender As
FormWindowState.Normal Object, e As MouseEventArgs) Handles
End If Panel_Drag.MouseUp
End Sub If e.Button = MouseButtons.Left Then
MoveForm = False
Private Sub minBtn_Click(sender As Object, e Me.Cursor = Cursors.Default
As EventArgs) Handles minBtn.Click End If
WindowState = End Sub
FormWindowState.Minimized Private Sub Panel_Drag_MouseDown(sender
End Sub As Object, e As MouseEventArgs) Handles
Panel_Drag.MouseDown
Private Sub searchBox_TextChanged(sender If e.Button = MouseButtons.Left Then
As Object, e As EventArgs) Handles MoveForm = True
searchBox.TextChanged Me.Cursor = Cursors.Default
Dim query As String = "SELECT * FROM MoveForm_MousePosition = e.Location
crtf_res_indi WHERE Parent_Guardian_Name End If
LIKE '%" & searchBox.Text & "%'" End Sub
Using con As SqlConnection = New
SqlConnection("Data Source=DESKTOP- Private Sub Panel_Drag_MouseMove(sender
NFHHL86\SQLEXPRESS;Initial As Object, e As MouseEventArgs) Handles
Catalog=My_Database;Integrated Panel_Drag.MouseMove
Security=True") If MoveForm Then
Using cmd As SqlCommand = New Me.Location = Me.Location + (e.Location
SqlCommand(query, con) - MoveForm_MousePosition)
Using da As SqlDataAdapter = New End If
SqlDataAdapter() End Sub
da.SelectCommand = cmd Dim conn As New SqlConnection("Data
Using dt As New DataTable() Source=DESKTOP-
da.Fill(dt) NFHHL86\SQLEXPRESS;Initial
If dt.Rows.Count > 0 Then Catalog=My_Database;Integrated
show_view.DataSource = dt Security=True")
Else Dim con As New SqlConnection
Dim cmd As SqlCommand
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub residentidBox.Text =


create_indi_resForm_Load(sender As Object, e show_view.CurrentRow.Cells(0).Value.ToString()
As EventArgs) Handles MyBase.Load lastBox.Text =
'TODO: This line of code loads data into show_view.CurrentRow.Cells(1).Value.ToString()
the 'DataSet1.resident_information' table. You firstBox.Text =
can move, or remove it, as needed. show_view.CurrentRow.Cells(2).Value.ToString()
ageBox.Text =
Me.Resident_informationTableAdapter.Fill(Me.D show_view.CurrentRow.Cells(3).Value.ToString()
ataSet1.resident_information) addressBox.Text =
con.ConnectionString = "Data show_view.CurrentRow.Cells(4).Value.ToString()
Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial End Sub
Catalog=My_Database;Integrated
Security=True" Private Sub submitBtn_Click(sender As
If con.State = ConnectionState.Open Then Object, e As EventArgs) Handles
con.Close() submitBtn.Click
End If Dim con As New SqlConnection("Data
con.Open() Source=DESKTOP-
new_update() NFHHL86\SQLEXPRESS;Initial
residentidBox.Enabled = False Catalog=My_Database;Integrated
End Sub Security=True")
con.Open()
Private Sub new_update() Dim cma As SqlCommand = New
Dim cmd As New SqlCommand("", conn) SqlCommand("SELECT * FROM crtf_res_indi
With cmd WHERE Parent_Guardian_Name =
.Connection = conn @Parent_Guardian_Name", con)
.CommandText = "SELECT Resident_ID,
Last_name, First_name, Age, Address FROM cma.Parameters.Add("@Parent_Guardian_Nam
resident_information" e", SqlDbType.VarChar).Value = lastBox.Text
End With Dim sdadp As SqlDataAdapter = New
SqlDataAdapter(cma)
Dim da As New SqlDataAdapter Dim dta As DataTable = New DataTable()
da.SelectCommand = cmd sdadp.Fill(dta)

Dim dt As New DataTable


dt.Clear() Dim cmd As SqlCommand = New
da.Fill(dt) SqlCommand("SELECT * FROM crtf_res_indi
WHERE Resident_ID= @Resident_ID", con)
show_view.DataSource = dt cmd.Parameters.Add("@Resident_ID",
show_view.AllowUserToAddRows = False SqlDbType.VarChar).Value =
residentidBox.Text
show_view.Columns(0).HeaderText = Dim sda As SqlDataAdapter = New
"Resident_ID" SqlDataAdapter(cmd)
show_view.Columns(1).HeaderText = Dim dt As DataTable = New DataTable()
"Last_name" sda.Fill(dt)
show_view.Columns(2).HeaderText =
"First_name" If residentidBox.Text = "" Or lastBox.Text =
show_view.Columns(3).HeaderText = "" Or ageBox.Text = "" Or
"Age" mentioned_CBBox.Text = "" Or
show_view.Columns(4).HeaderText = addressBox.Text = "" Then
"Address" MessageBox.Show("Please Complete
All.", "Information", MessageBoxButtons.OK,
MessageBoxIcon.Question)
End Sub Return
ElseIf (dta.Rows.Count > 0) Then
Private Sub show_view_CellClick(sender As MessageBox.Show("This Account has
Object, e As DataGridViewCellEventArgs) the same on the database.", "Information",
Handles show_view.CellClick MessageBoxButtons.OK,
MessageBoxIcon.Question)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Return End Sub


ElseIf (dt.Rows.Count > 0) Then
MessageBox.Show("Same Resident ID Private Sub
Try Another.", "Information", parent_guardian_name_KeyPress(sender As
MessageBoxButtons.OK, Object, e As KeyPressEventArgs) Handles
MessageBoxIcon.Question) lastBox.KeyPress
Return If Char.IsDigit(e.KeyChar) And Not
ElseIf monthCBBox.Text = "" Or e.KeyChar = "." Then
nameofreqBox.Text = "" Or dayCBBox.Text = "" e.Handled = True
Or monthCBBox.Text = "" Or yearBox.Text = "" MessageBox.Show("Invalid Input.",
Then "Information", MessageBoxButtons.OK,
MessageBox.Show("Please Complete MessageBoxIcon.Warning)
All.", "Information", MessageBoxButtons.OK, End If
MessageBoxIcon.Question) If Char.IsPunctuation(e.KeyChar) Then
Return e.Handled = True
ElseIf ageBox.Text <= 17 Then MessageBox.Show("Invalid Input.",
MessageBox.Show("Below 18 Years Old "Information", MessageBoxButtons.OK,
is Not Allowed", "Information", MessageBoxIcon.Warning)
MessageBoxButtons.OK, End If
MessageBoxIcon.Question) If e.KeyChar = Chr(8) Then
ageBox.Text = "" e.Handled = False
Return End If
Else End Sub
If MessageBox.Show("Check all inputs, if
information is right ", "NOTICE", Private Sub ageBox_KeyPress(sender As
MessageBoxButtons.YesNo, Object, e As KeyPressEventArgs) Handles
MessageBoxIcon.Warning) = ageBox.KeyPress
Windows.Forms.DialogResult.Yes Then If Not Char.IsDigit(e.KeyChar) And Not
cmd = con.CreateCommand() e.KeyChar = "." Then
cmd.CommandType = e.Handled = True
CommandType.Text MessageBox.Show("Invalid Input.",
cmd.CommandText = "INSERT INTO "Information", MessageBoxButtons.OK,
crtf_res_indi(Resident_ID, MessageBoxIcon.Warning)
Parent_Guardian_Name, Age, mentioned_name, End If
Address, Name_of_requested, Day, Month, If Char.IsPunctuation(e.KeyChar) Then
Year) e.Handled = True
VALUES MessageBox.Show("Invalid Input.",
('" + residentidBox.Text + "','" + "Information", MessageBoxButtons.OK,
(lastBox.Text + " " + firstBox.Text) + "','" + MessageBoxIcon.Warning)
ageBox.Text + "','" + mentioned_CBBox.Text + End If
"','" + addressBox.Text + "','" + If ageBox.Text.Length >= 2 Then
nameofreqBox.Text + "','" + dayCBBox.Text + "', e.Handled = True
'" + monthCBBox.Text + "','" + End If
yearBox.Text + "' If e.KeyChar = Chr(8) Then
)" e.Handled = False
cmd.ExecuteNonQuery() End If
MessageBox.Show("Submit End Sub
Successfully", "Information",
MessageBoxButtons.OK,
MessageBoxIcon.Question)
Me.Close() Private Sub
ctf_indi_form.Enabled = True mentioned_CBBox_KeyPress(sender As Object,
Else e As KeyPressEventArgs) Handles
Return mentioned_CBBox.KeyPress
End If If Char.IsDigit(e.KeyChar) And Not
End If e.KeyChar = "." Then
e.Handled = True
End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If Char.IsLetter(e.KeyChar) And Not


e.KeyChar = "." Then Private Sub month_KeyPress(sender As
e.Handled = True Object, e As KeyPressEventArgs) Handles
End If monthCBBox.KeyPress
If Not Char.IsDigit(e.KeyChar) And Not
If Char.IsPunctuation(e.KeyChar) Then e.KeyChar = "." Then
e.Handled = True e.Handled = True
End If End If
If e.KeyChar = Chr(8) Then
e.Handled = False If Char.IsDigit(e.KeyChar) And Not
End If e.KeyChar = "." Then
End Sub e.Handled = True
End If
Private Sub
name_of_requested_KeyPress(sender As If Char.IsPunctuation(e.KeyChar) Then
Object, e As KeyPressEventArgs) Handles e.Handled = True
nameofreqBox.KeyPress MessageBox.Show("Invalid Input.",
If Char.IsDigit(e.KeyChar) And Not "Information", MessageBoxButtons.OK,
e.KeyChar = "." Then MessageBoxIcon.Warning)
e.Handled = True End If
MessageBox.Show("Invalid Input.",
"Information", MessageBoxButtons.OK, If e.KeyChar = "." Then
MessageBoxIcon.Warning) e.Handled = True
End If End If
If Char.IsPunctuation(e.KeyChar) Then If e.KeyChar = Chr(8) Then
e.Handled = True e.Handled = False
MessageBox.Show("Invalid Input.", End If
"Information", MessageBoxButtons.OK, End Sub
MessageBoxIcon.Warning)
End If Private Sub year_KeyPress(sender As Object,
If e.KeyChar = Chr(8) Then e As KeyPressEventArgs) Handles
e.Handled = False yearBox.KeyPress
End If If Char.IsLetter(e.KeyChar) And Not
End Sub e.KeyChar = "." Then
e.Handled = True
MessageBox.Show("Invalid Input.",
"Information", MessageBoxButtons.OK,
Private Sub day_KeyPress(sender As Object, MessageBoxIcon.Warning)
e As KeyPressEventArgs) Handles End If
dayCBBox.KeyPress If Char.IsPunctuation(e.KeyChar) Then
If Not Char.IsDigit(e.KeyChar) And Not e.Handled = True
e.KeyChar = "." Then MessageBox.Show("Invalid Input.",
e.Handled = True "Information", MessageBoxButtons.OK,
End If MessageBoxIcon.Warning)
End If
If Char.IsDigit(e.KeyChar) And Not
e.KeyChar = "." Then If yearBox.Text.Length >= 4 Then
e.Handled = True e.Handled = True
End If End If
If Char.IsPunctuation(e.KeyChar) Then If e.KeyChar = Chr(8) Then
e.Handled = True e.Handled = False
MessageBox.Show("Invalid Input.", End If
"Information", MessageBoxButtons.OK, End Sub
MessageBoxIcon.Warning) Private Sub IconButton2_Click(sender As
End If Object, e As EventArgs) Handles
If e.KeyChar = Chr(8) Then IconButton2.Click
e.Handled = False Me.Close()
End If ctf_indi_form.Enabled = True
End Sub End Sub
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub updateform_Load(sender As


End Class Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into
Imports System.Data.SqlClient the 'DataSet1.crtf_res_indi' table. You can move,
Imports System.Data or remove it, as needed.
Public Class updateform
Private Const cGrip = 16 Me.Crtf_res_indiTableAdapter.Fill(Me.DataSet1.
Private Const cCaption = 32 crtf_res_indi)
End Sub
Protected Overrides Sub WndProc(ByRef m
As Message) Private Sub show_view_CellClick(sender As
If m.Msg = &H84 Then Object, e As DataGridViewCellEventArgs)
Dim pos As Point = New
Point(m.LParam.ToInt32()) End Sub
pos = Me.PointToClient(pos)
Private Sub updateBtn_Click(sender As
If pos.Y < cCaption Then Object, e As EventArgs) Handles
m.Result = CType(2, IntPtr) updateBtn.Click
Return For i As Integer = 0 To
End If show_view.Rows.Count - 1
Dim cm4 As New SqlCommand("", con)
If pos.X >= Me.ClientSize.Width - cGrip cm4.CommandText = "UPDATE
AndAlso pos.Y >= Me.ClientSize.Height - cGrip crtf_res_indi SET Parent_Guardian_Name='" &
Then show_view.Rows(i).Cells(1).Value & "',
m.Result = CType(17, IntPtr) Age='" &
Return show_view.Rows(i).Cells(2).Value &
End If "',mentioned_name='" &
End If show_view.Rows(i).Cells(3).Value &
"',Address='" &
MyBase.WndProc(m) show_view.Rows(i).Cells(4).Value & "'
End Sub ,Name_of_requested='" &
Private Sub Panel_Drag_MouseMove(sender show_view.Rows(i).Cells(5).Value & "',Day='" &
As Object, e As MouseEventArgs) Handles show_view.Rows(i).Cells(6).Value & "', Month='"
Panel_Drag.MouseMove & show_view.Rows(i).Cells(7).Value & "'
Static lpos As Point ,Year='" &
If e.Button = show_view.Rows(i).Cells(8).Value & "'WHERE
Windows.Forms.MouseButtons.Left Then Resident_ID=" &
'move form show_view.Rows(i).Cells(0).Value & ""
Me.Location += New Size(e.X - lpos.X, con.Open()
e.Y - lpos.Y) cm4.ExecuteNonQuery()
Else con.Close()
lpos = e.Location Next
End If MessageBox.Show("Rows Updated
End Sub Successfully.", "Information",
MessageBoxButtons.OK,
Private Sub Form1_Paint(sender As Object, e MessageBoxIcon.Question)
As System.Windows.Forms.PaintEventArgs) End Sub
Handles Me.Paint
ControlPaint.DrawBorder(e.Graphics, Private Sub show_view_DataError(sender As
Me.ClientRectangle, Color.FromArgb(169, 93, Object, ByVal anError As
36), ButtonBorderStyle.Solid) DataGridViewDataErrorEventArgs) Handles
End Sub show_view.DataError
Dim warn As String = ""
Dim con As New SqlConnection("Data If show_view.CurrentCell.ColumnIndex = 1
Source=DESKTOP- <>
NFHHL86\SQLEXPRESS;Initial DataGridViewDataErrorContexts.CurrentCellCh
Catalog=My_Database;Integrated ange Then
Security=True") MessageBox.Show("We have the same
name, try another name. " + vbCrLf + "or" +
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

vbCrLf + "You commit to erase the name, you AddHandler e.Control.KeyPress,


can't erase the name.", "Information", AddressOf IsDigit
MessageBoxButtons.OK,
MessageBoxIcon.Warning) ElseIf
Return Me.show_view.CurrentCell.ColumnIndex = 3
End If Then
AddHandler e.Control.KeyPress,
End Sub AddressOf IsChar
Private Sub IconButton2_Click(sender As
Object, e As EventArgs) Handles ElseIf
IconButton2.Click Me.show_view.CurrentCell.ColumnIndex = 5
Me.Close() Then
ctf_indi_form.Enabled = True AddHandler e.Control.KeyPress,
End Sub AddressOf IsChar

Private Sub searchBox_TextChanged(sender ElseIf


As Object, e As EventArgs) Handles Me.show_view.CurrentCell.ColumnIndex = 6
searchBox.TextChanged Then
Dim query As String = "SELECT * FROM AddHandler e.Control.KeyPress,
crtf_res_indi WHERE Parent_Guardian_Name AddressOf IsDigit
LIKE '%" & searchBox.Text & "%'" ElseIf
Using con As SqlConnection = New Me.show_view.CurrentCell.ColumnIndex = 7
SqlConnection("Data Source=DESKTOP- Then
NFHHL86\SQLEXPRESS;Initial AddHandler e.Control.KeyPress,
Catalog=My_Database;Integrated AddressOf IsChar
Security=True") ElseIf
Using cmd As SqlCommand = New Me.show_view.CurrentCell.ColumnIndex = 8
SqlCommand(query, con) Then
Using da As SqlDataAdapter = New AddHandler e.Control.KeyPress,
SqlDataAdapter() AddressOf IsDigit
da.SelectCommand = cmd End If
Using dt As New DataTable() End Sub
da.Fill(dt)
If dt.Rows.Count > 0 Then Private Sub IsDigit(ByVal sender As Object,
show_view.DataSource = dt ByVal e As KeyPressEventArgs)
Else 'keypress for string'
MessageBox.Show("No 'only integer allowed'
Record Found.") If Char.IsLetter(e.KeyChar) And Not
End If e.KeyChar = "." Then
End Using e.Handled = True
End Using End If
End Using
End Using If Char.IsDigit(e.KeyChar) And Not
End Sub e.KeyChar = "." Then
e.Handled = False
Private Sub End If
show_view_EditingControlShowing(sender As
Object, e As If Char.IsPunctuation(e.KeyChar) Then
DataGridViewEditingControlShowingEventArgs) e.Handled = True
Handles show_view.EditingControlShowing End If
If e.KeyChar = Chr(8) Then
If Me.show_view.CurrentCell.ColumnIndex e.Handled = False
= 1 Then End If
AddHandler e.Control.KeyPress, End Sub
AddressOf IsChar Private Sub IsChar(ByVal sender As Object,
ElseIf ByVal e As KeyPressEventArgs)
Me.show_view.CurrentCell.ColumnIndex = 2 'keypress for integer'
Then 'only string allowed'
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If Char.IsLetter(e.KeyChar) And Not Using con As SqlConnection = New


e.KeyChar = "." Then SqlConnection("Data Source=DESKTOP-
e.Handled = False NFHHL86\SQLEXPRESS;Initial
End If Catalog=My_Database;Integrated
If Char.IsDigit(e.KeyChar) And Not Security=True")
e.KeyChar = "." Then Using cmd As SqlCommand = New
e.Handled = True SqlCommand(query, con)
End If Using da As SqlDataAdapter = New
If Char.IsPunctuation(e.KeyChar) Then SqlDataAdapter()
e.Handled = True da.SelectCommand = cmd
End If Using dt As New DataTable()
If e.KeyChar = Chr(8) Then da.Fill(dt)
e.Handled = False If dt.Rows.Count > 0 Then
End If show_view.DataSource = dt
End Sub Else
MessageBox.Show("No
Private Sub maxminBtn_Click(sender As Record Found.")
Object, e As EventArgs) Handles End If
maxminBtn.Click End Using
If WindowState = End Using
FormWindowState.Normal Then End Using
End Using
WindowState = End Sub
FormWindowState.Maximized Private Sub Panel_Drag_MouseMove(sender
Else As Object, e As MouseEventArgs) Handles
Panel_Drag.MouseMove
WindowState = Static lpos As Point
FormWindowState.Normal If e.Button =
Me.Width = 1085 Windows.Forms.MouseButtons.Left Then
Me.Height = 622 'move form
End If Me.Location += New Size(e.X - lpos.X,
End Sub e.Y - lpos.Y)
Else
Private Sub minBtn_Click(sender As Object, e lpos = e.Location
As EventArgs) Handles minBtn.Click End If
WindowState = End Sub
FormWindowState.Minimized Private Sub print_form_Load(sender As
End Sub Object, e As EventArgs) Handles MyBase.Load
End Class 'TODO: This line of code loads data into
the 'DataSet1.crtf_res_indi' table. You can move,
Imports System.Data.SqlClient or remove it, as needed.
Imports System.Data
Public Class print_form Me.Crtf_res_indiTableAdapter.Fill(Me.DataSet1.
crtf_res_indi)

Private Sub IconButton2_Click(sender As End Sub


Object, e As EventArgs) Handles
IconButton2.Click Private Sub print_resBtn_Click(sender As
Me.Close() Object, e As EventArgs) Handles
ctf_indi_form.Enabled = True print_resBtn.Click
End Sub
If show_view.SelectedRows.Count > 0
Private Sub SearchBox_TextChanged(sender Then
As Object, e As EventArgs) Handles Dim Resident_ID As String =
searchBox.TextChanged show_view.SelectedRows(0).Cells(0).Value
Dim query As String = "SELECT * FROM Dim Parent_Guardian_Name As String =
crtf_res_indi WHERE Parent_Guardian_Name show_view.SelectedRows(0).Cells(1).Value
LIKE '%" & searchBox.Text & "%'" Dim Age As String =
show_view.SelectedRows(0).Cells(2).Value
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Dim mentioned_name As String = Resident_ID, Parent_Guardian_Name, Age,


show_view.SelectedRows(0).Cells(3).Value mentioned_name, Address,
Dim Address As String = Name_of_requested, Day, Month, Year)
show_view.SelectedRows(0).Cells(4).Value End If
Dim Name_of_requested As String = Me.Enabled = False
show_view.SelectedRows(0).Cells(5).Value Dim report2 As New CrystalReport2
Dim Day As String = report2.SetDataSource(DataSet1)
show_view.SelectedRows(0).Cells(6).Value
Dim Month As String = print_indigency.CrystalReportViewer2.ReportSo
show_view.SelectedRows(0).Cells(7).Value urce = report2
Dim Year As String = print_indigency.Refresh()
show_view.SelectedRows(0).Cells(8).Value print_indigency.Show()
End Sub
Me.DataSet1.crtf_res_indi.Rows.Clear()
Private Sub refreshBtn_Click(sender As
Me.DataSet1.crtf_res_indi.Addcrtf_res_indiRow( Object, e As EventArgs) Handles
Resident_ID, Parent_Guardian_Name, Age, refreshBtn.Click
mentioned_name, Address,
Name_of_requested, Day, Month, Year) Me.Crtf_res_indiTableAdapter.Fill(Me.DataSet1.
End If crtf_res_indi)
Me.Enabled = False End Sub
Dim report1 As New CrystalReport1
report1.SetDataSource(DataSet1) Private Sub Form1_Paint(sender As Object, e
As System.Windows.Forms.PaintEventArgs)
print_residency.CrystalReportViewer1.ReportSo Handles Me.Paint
urce = report1 ControlPaint.DrawBorder(e.Graphics,
Me.ClientRectangle, Color.FromArgb(169, 93,
print_residency.Refresh() 36), ButtonBorderStyle.Solid)
print_residency.Show() End Sub
End Class
End Sub
Imports System.Data.SqlClient
Private Sub print_indiBtn_Click(sender As Imports System.IO
Object, e As EventArgs) Handles Public Class print_residency
print_indiBtn.Click Private Const cGrip = 16
If show_view.SelectedRows.Count > 0 Private Const cCaption = 32
Then
Dim Resident_ID As String = Protected Overrides Sub WndProc(ByRef m
show_view.SelectedRows(0).Cells(0).Value As Message)
Dim Parent_Guardian_Name As String = If m.Msg = &H84 Then
show_view.SelectedRows(0).Cells(1).Value Dim pos As Point = New
Dim Age As String = Point(m.LParam.ToInt32())
show_view.SelectedRows(0).Cells(2).Value pos = Me.PointToClient(pos)
Dim mentioned_name As String =
show_view.SelectedRows(0).Cells(3).Value If pos.Y < cCaption Then
Dim Address As String = m.Result = CType(2, IntPtr)
show_view.SelectedRows(0).Cells(4).Value Return
Dim Name_of_requested As String = End If
show_view.SelectedRows(0).Cells(5).Value
Dim Day As String = If pos.X >= Me.ClientSize.Width - cGrip
show_view.SelectedRows(0).Cells(6).Value AndAlso pos.Y >= Me.ClientSize.Height - cGrip
Dim Month As String = Then
show_view.SelectedRows(0).Cells(7).Value m.Result = CType(17, IntPtr)
Dim Year As String = Return
show_view.SelectedRows(0).Cells(8).Value End If
End If
Me.DataSet1.crtf_res_indi.Rows.Clear()
MyBase.WndProc(m)
Me.DataSet1.crtf_res_indi.Addcrtf_res_indiRow( End Sub
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

clear()
Private Sub Panel_Drag_MouseMove(sender con.ConnectionString = "Data
As Object, e As MouseEventArgs) Handles Source=DESKTOP-
Panel_Drag.MouseMove NFHHL86\SQLEXPRESS;Initial
Static lpos As Point Catalog=My_Database;Integrated
If e.Button = Security=True"
Windows.Forms.MouseButtons.Left Then If con.State = ConnectionState.Open Then
'move form con.Close()
Me.Location += New Size(e.X - lpos.X, End If
e.Y - lpos.Y) con.Open()
Else CrystalReportViewer1.ShowPrintButton =
lpos = e.Location False
End If printnumBox.Enabled = False
End Sub resident_id.Enabled = False
lastnBox.Enabled = False
Private Sub backBtn_Click(sender As Object, firstnBox.Enabled = False
e As EventArgs) Handles closeBtn.Click ageBox.Enabled = False
Me.Close() dateBox.Enabled = False
print_form.Enabled = True timeBox.Enabled = False
printnumBox.Text = "" iss_reportBox.Enabled = False
resident_id.Text = "" iss_reportBox.Text = "Issued Certificate of
lastnBox.Text = "" Residency"
firstnBox.Text = "" dateBox.Text =
ageBox.Text = "" DateTime.Now.ToString("MMMM : dd : yyyy")
dateBox.Text = "" timeBox.Text = TimeOfDay.ToString("hh :
timeBox.Text = "" mm tt")
End Sub End Sub
Dim numb As String = ""
Private Sub maxminBtn_Click(sender As Dim rand As Random = New Random()
Object, e As EventArgs) Handles Private Sub genBtn()
maxminBtn.Click For y As Integer = 1 To 6
numb = Date.Now.Year
If WindowState = If y = 6 Then
FormWindowState.Normal Then numb += "3"
WindowState = End If
FormWindowState.Maximized Next
Else
WindowState = For y As Integer = 1 To 6
FormWindowState.Normal numb += Convert.ToString(rand.Next(0,
Me.Width = 794 9))
Me.Height = 633 Next
End If printnumBox.Text = numb
End Sub If printnumBox.Text Then
numb = Nothing
Private Sub minBtn_Click(sender As Object, e End If
As EventArgs) Handles minBtn.Click End Sub
WindowState =
FormWindowState.Minimized Private Sub GenerateBtn_Click(sender As
End Sub Object, e As EventArgs) Handles
Private Sub clear() GenerateBtn.Click
resident_id.Text = "" genBtn()
lastnBox.Text = "" End Sub
firstnBox.Text = ""
ageBox.Text = "" Dim con As New SqlConnection
dateBox.Text = "" Dim cmd As SqlCommand
timeBox.Text = ""
End Sub Private Sub printBtn_Click(sender As Object,
Private Sub print_residency_Load(sender As e As EventArgs) Handles printBtn.Click
Object, e As EventArgs) Handles MyBase.Load
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Dim crprintdia As PrintDialog = New ,'" + lastnBox.Text + "','" +


PrintDialog() firstnBox.Text + "'
,'" + ageBox.Text + "','" +
If resident_id.Text = "" Or lastnBox.Text = dateBox.Text + "'
"" Or firstnBox.Text = "" Or ageBox.Text = "" Or ,'" + timeBox.Text + "'
dateBox.Text = "" Or timeBox.Text = "" Then )"
MessageBox.Show("Plese Input All cmd.ExecuteNonQuery()
Textbox.", "Information", Me.Close()
MessageBoxButtons.OK, print_form.Enabled = True
MessageBoxIcon.Question) crprintdia.Dispose()
Return ElseIf DialogResult.OK Then
End If crprintdia.Dispose()
Return
If printnumBox.Text = "" Then End If
MessageBox.Show("Please Input Print End Sub
number", "Information", MessageBoxButtons.OK,
MessageBoxIcon.Question) Private Sub seachN_Click(sender As Object,
Return e As EventArgs) Handles seachN.Click
End If Me.Enabled = False
MessageBox.Show("Make Sure the searchname.Show()
Information was right, Before you Print.", End Sub
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Question) Private Sub Form1_Paint(sender As Object, e
If crprintdia.ShowDialog() = As System.Windows.Forms.PaintEventArgs)
DialogResult.OK Then Handles Me.Paint
Dim crReportDocument As ControlPaint.DrawBorder(e.Graphics,
CrystalDecisions.CrystalReports.Engine.Report Me.ClientRectangle, Color.FromArgb(169, 93,
Document = 36), ButtonBorderStyle.Solid)
CType(CrystalReportViewer1.ReportSource, End Sub
CrystalReport1) End Class
Dim nCopy As Integer =
crprintdia.PrinterSettings.Copies Imports System.Data.SqlClient
Dim sPage As Integer = Imports System.IO
crprintdia.PrinterSettings.FromPage Imports System.Crystal
Dim ePage As Integer = Public Class print_indigency
crprintdia.PrinterSettings.ToPage Private Const cGrip = 16
Dim collate As Boolean = Private Const cCaption = 32
crprintdia.PrinterSettings.Collate
Protected Overrides Sub WndProc(ByRef m
crReportDocument.PrintOptions.PrinterName = As Message)
crprintdia.PrinterSettings.PrinterName If m.Msg = &H84 Then
Dim pos As Point = New
crReportDocument.PrintToPrinter(nCopy, Point(m.LParam.ToInt32())
collate, sPage, ePage) pos = Me.PointToClient(pos)

MessageBox.Show("Print Successfully.", If pos.Y < cCaption Then


"Information", MessageBoxButtons.OK, m.Result = CType(2, IntPtr)
MessageBoxIcon.Question) Return
cmd = con.CreateCommand() End If
cmd.CommandType =
CommandType.Text If pos.X >= Me.ClientSize.Width - cGrip
cmd.CommandText = "INSERT INTO AndAlso pos.Y >= Me.ClientSize.Height - cGrip
history_transacts(Print_Number, Issued_Report, Then
Resident_ID, Last_Name, First_Name, Age, m.Result = CType(17, IntPtr)
Date_Issued, Time_Issued) Return
VALUES End If
('" + printnumBox.Text + "','" + End If
iss_reportBox.Text + "','" + resident_id.Text + "'
MyBase.WndProc(m)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End Sub Private Sub print_indigency_Load(sender As


Private Sub minBtn_Click(sender As Object, e Object, e As EventArgs) Handles MyBase.Load
As EventArgs) Handles minBtn.Click clear()
con.ConnectionString = "Data
WindowState = Source=DESKTOP-
FormWindowState.Minimized NFHHL86\SQLEXPRESS;Initial
End Sub Catalog=My_Database;Integrated
Security=True"
Private Sub maxminBtn_Click(sender As If con.State = ConnectionState.Open Then
Object, e As EventArgs) Handles con.Close()
maxminBtn.Click End If
con.Open()
If WindowState = CrystalReportViewer2.ShowPrintButton =
FormWindowState.Normal Then False
printnumBox.Enabled = False
WindowState = resident_id.Enabled = False
FormWindowState.Maximized lastnBox.Enabled = False
Else firstnBox.Enabled = False
ageBox.Enabled = False
WindowState = dateBox.Enabled = False
FormWindowState.Normal timeBox.Enabled = False
Me.Width = 794 iss_reportBox.Enabled = False
Me.Height = 633 iss_reportBox.Text = "Issued Certificate of
End If Indigency"
dateBox.Text =
End Sub DateTime.Now.ToString("MMMM : dd : yyyy")
Private Sub Panel_Drag_MouseMove(sender timeBox.Text = TimeOfDay.ToString("hh :
As Object, e As MouseEventArgs) Handles mm tt")
Panel_Drag.MouseMove End Sub
Static lpos As Point
If e.Button = Dim numb As String = ""
Windows.Forms.MouseButtons.Left Then Dim rand As Random = New Random()
'move form Private Sub genBtn()
Me.Location += New Size(e.X - lpos.X, For y As Integer = 1 To 6
e.Y - lpos.Y) numb = Date.Now.Year
Else If y = 6 Then
lpos = e.Location numb += "4"
End If End If
End Sub Next
Private Sub closeBtn_Click(sender As Object,
e As EventArgs) Handles closeBtn.Click For y As Integer = 1 To 6
Me.Close() numb += Convert.ToString(rand.Next(0,
print_form.Enabled = True 9))
printnumBox.Text = "" Next
resident_id.Text = "" printnumBox.Text = numb
lastnBox.Text = "" If printnumBox.Text Then
firstnBox.Text = "" numb = Nothing
ageBox.Text = "" End If
dateBox.Text = "" End Sub
timeBox.Text = ""
End Sub Private Sub GenerateBtn_Click(sender As
Private Sub clear() Object, e As EventArgs) Handles
resident_id.Text = "" GenerateBtn.Click
lastnBox.Text = "" genBtn()
firstnBox.Text = "" End Sub
ageBox.Text = ""
dateBox.Text = ""
timeBox.Text = "" Dim con As New SqlConnection
End Sub Dim cmd As SqlCommand
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub printBtn_Click(sender As Object, MessageBox.Show("Print Successfully.",


e As EventArgs) Handles printBtn.Click "Information", MessageBoxButtons.OK,
''Dim creport As CrystalReport2 = New MessageBoxIcon.Question)
CrystalReport2() cmd = con.CreateCommand()
Dim crprintdia As PrintDialog = New cmd.CommandType =
PrintDialog() CommandType.Text
cmd.CommandText = "INSERT INTO
Dim fileDialog As New history_transacts(Print_Number, Issued_Report,
Windows.Forms.SaveFileDialog Resident_ID, Last_Name, First_Name, Age,
If resident_id.Text = "" Or lastnBox.Text = Date_Issued, Time_Issued)
"" Or firstnBox.Text = "" Or ageBox.Text = "" Or VALUES
dateBox.Text = "" Or timeBox.Text = "" Then ('" + printnumBox.Text + "','" +
MessageBox.Show("Plese Input All iss_reportBox.Text + "','" + resident_id.Text + "'
Textbox.", "Information", ,'" + lastnBox.Text + "','" +
MessageBoxButtons.OK, firstnBox.Text + "'
MessageBoxIcon.Question) ,'" + ageBox.Text + "','" +
Return dateBox.Text + "'
End If ,'" + timeBox.Text + "'
)"
If printnumBox.Text = "" Then cmd.ExecuteNonQuery()
MessageBox.Show("Please Input Print Me.Close()
number", "Information", MessageBoxButtons.OK, print_form.Enabled = True
MessageBoxIcon.Question) crprintdia.Dispose()
Return
End If ElseIf DialogResult.Cancel Then
MessageBox.Show("Make Sure the crprintdia.Dispose()
Information was right, Before you Print.", Return
"Information", MessageBoxButtons.OK, End If
MessageBoxIcon.Question) End Sub

Dim file As String = Private Sub seachN_Click(sender As Object,


(DateTime.UtcNow.Subtract(new e As EventArgs) Handles seachN.Click
DateTime(1970, 1, 1))).TotalSeconds.ToString() Me.Enabled = False
Dim directory As String = searchname.Show()
Environment.GetFolderPath(Environment.Speci End Sub
alFolder.MyDocuments)
Private Sub Form1_Paint(sender As Object, e
If crprintdia.ShowDialog() = As System.Windows.Forms.PaintEventArgs)
DialogResult.OK Then Handles Me.Paint
Dim crReportDocument As ControlPaint.DrawBorder(e.Graphics,
CrystalDecisions.CrystalReports.Engine.Report Me.ClientRectangle, Color.FromArgb(169, 93,
Document = 36), ButtonBorderStyle.Solid)
CType(CrystalReportViewer2.ReportSource, End Sub
CrystalReport2) End Class
Dim nCopy As Integer =
crprintdia.PrinterSettings.Copies Imports System.Data.SqlClient
Dim sPage As Integer = Imports System.Data
crprintdia.PrinterSettings.FromPage Public Class ctf_brgy
Dim ePage As Integer =
crprintdia.PrinterSettings.ToPage Private Sub Form1_Paint(sender As Object, e
Dim collate As Boolean = As System.Windows.Forms.PaintEventArgs)
crprintdia.PrinterSettings.Collate Handles Me.Paint
ControlPaint.DrawBorder(e.Graphics,
crReportDocument.PrintOptions.PrinterName = Me.ClientRectangle, Color.FromArgb(169, 93,
crprintdia.PrinterSettings.PrinterName 36), ButtonBorderStyle.Solid)
End Sub
crReportDocument.PrintToPrinter(nCopy,
collate, sPage, ePage) Private Const cGrip = 16
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Const cCaption = 32


Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da
Protected Overrides Sub WndProc(ByRef m taSet1.crtf_brgy_clearance)
As Message) 'TODO: This line of code loads data into
If m.Msg = &H84 Then the 'DataSet1.crtf_brgy_clearance' table. You
Dim pos As Point = New can move, or remove it, as needed.
Point(m.LParam.ToInt32())
pos = Me.PointToClient(pos) Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da
taSet1.crtf_brgy_clearance)
If pos.Y < cCaption Then 'TODO: This line of code loads data into
m.Result = CType(2, IntPtr) the 'DataSet1.crtf_brgy_clearance' table. You
Return can move, or remove it, as needed.
End If
Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da
If pos.X >= Me.ClientSize.Width - cGrip taSet1.crtf_brgy_clearance)
AndAlso pos.Y >= Me.ClientSize.Height - cGrip load_data()
Then POCCBBOX()
m.Result = CType(17, IntPtr)
Return End Sub
End If Private Sub POCCBBOX()
End If
End Sub
MyBase.WndProc(m) Dim conn As New SqlConnection("Data
End Sub Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
Private Sub Panel_Drag_MouseMove(sender Catalog=My_Database;Integrated
As Object, e As MouseEventArgs) Handles Security=True")
Panel_Drag.MouseMove Private Sub load_data()
Static lpos As Point Dim cmd As New SqlCommand("SELECT *
If e.Button = FROM crtf_brgy_clearance ORDER BY
Windows.Forms.MouseButtons.Left Then Resident_ID", conn)
'move form Dim da As New SqlDataAdapter
Me.Location += New Size(e.X - lpos.X, da.SelectCommand = cmd
e.Y - lpos.Y) Dim dt As New DataTable
Else dt.Clear()
lpos = e.Location da.Fill(dt)
End If show_view.DataSource = dt
End Sub show_view.MultiSelect = True
End Sub
Private Sub IconButton1_Click(sender As
Object, e As EventArgs) Handles Private Sub refreshBtn_Click(sender As
IconButton2.Click Object, e As EventArgs) Handles
Me.Close() refreshBtn.Click
main_form.Enabled = True
main_form.Show() Dim con As New SqlConnection("Data
End Sub Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
Private Sub createBtn_Click(sender As Catalog=My_Database;Integrated
Object, e As EventArgs) Handles Security=True")
createBtn.Click Dim cmd As New SqlCommand("select *
Me.Enabled = False from crtf_brgy_clearance", con)
create_brgy_form.Show() Dim sda As New SqlDataAdapter(cmd)
End Sub Dim dt As New DataTable
sda.Fill(dt)
Private Sub ctf_brgy_Load(sender As Object, show_view.DataSource = dt
e As EventArgs) Handles MyBase.Load End Sub
'TODO: This line of code loads data into
the 'DataSet1.crtf_brgy_clearance' table. You
can move, or remove it, as needed.
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub searchBox_TextChanged(sender


As Object, e As EventArgs) Handles WindowState =
searchBox.TextChanged FormWindowState.Normal
Dim query As String = "SELECT * FROM Me.Width = 962
crtf_brgy_clearance WHERE Alias_ES LIKE '%" Me.Height = 645
& searchBox.Text & "%'" End If
Using con As SqlConnection = New
SqlConnection("Data Source=DESKTOP- End Sub
NFHHL86\SQLEXPRESS;Initial
Catalog=My_Database;Integrated
Security=True") End Class
Using cmd As SqlCommand = New
SqlCommand(query, con) Imports System.Data.SqlClient
Using da As SqlDataAdapter = New Imports System.Data
SqlDataAdapter() Public Class create_brgy_form
da.SelectCommand = cmd
Using dt As New DataTable() Private Sub Form1_Paint(sender As Object, e
da.Fill(dt) As System.Windows.Forms.PaintEventArgs)
If dt.Rows.Count > 0 Then Handles Me.Paint
show_view.DataSource = dt ControlPaint.DrawBorder(e.Graphics,
Else Me.ClientRectangle, Color.FromArgb(169, 93,
MessageBox.Show("No 36), ButtonBorderStyle.Solid)
Record Found.", "Information", End Sub
MessageBoxButtons.OK, Private Sub Panel_Drag_MouseMove(sender
MessageBoxIcon.Question) As Object, e As MouseEventArgs) Handles
End If Panel_Drag.MouseMove
End Using Static lpos As Point
End Using If e.Button =
End Using Windows.Forms.MouseButtons.Left Then
End Using 'move form
End Sub Me.Location += New Size(e.X - lpos.X,
Private Sub updateBtn_Click(sender As e.Y - lpos.Y)
Object, e As EventArgs) Handles Else
updateBtn.Click lpos = e.Location
Me.Enabled = False End If
update_brgy_form.Show() End Sub
End Sub Dim table As New DataTable("Table")
Dim index As Integer
Private Sub printBtn_Click(sender As Object, Private Sub create_brgy_form_Load(sender
e As EventArgs) Handles printBtn.Click As Object, e As EventArgs) Handles
Me.Enabled = False MyBase.Load
print_brgy_clearance.Show() 'TODO: This line of code loads data into
End Sub the 'DataSet1.resident_information' table. You
can move, or remove it, as needed.
Private Sub minBtn_Click(sender As Object, e
As EventArgs) Handles minBtn.Click Me.Resident_informationTableAdapter.Fill(Me.D
WindowState = ataSet1.resident_information)
FormWindowState.Minimized con.ConnectionString = "Data
End Sub Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
Private Sub maxminBtn_Click(sender As Catalog=My_Database;Integrated
Object, e As EventArgs) Handles Security=True"
maxminBtn.Click If con.State = ConnectionState.Open Then
If WindowState = con.Close()
FormWindowState.Normal Then End If
con.Open()
WindowState = new_update()
FormWindowState.Maximized disable()
Else amountBox.Text = "150"
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End Sub fnameBox.Enabled = False


Dim conn As New SqlConnection("Data MIBox.Enabled = False
Source=DESKTOP- ageBox.Enabled = False
NFHHL86\SQLEXPRESS;Initial addressBox.Enabled = False
Catalog=My_Database;Integrated monthCBBox.Enabled = False
Security=True") dayCBBox.Enabled = False
Dim con As New SqlConnection yearBox.Enabled = False
Dim cmd As SqlCommand ctzshipBox.Enabled = False
civ_stats.Enabled = False
Private Sub new_update() End Sub
Dim cmd As New SqlCommand("", conn)
With cmd
.Connection = conn Private Sub show_view_CellClick(sender As
.CommandText = "SELECT Resident_ID, Object, e As DataGridViewCellEventArgs)
Last_name, First_name, MI, Age, Handles show_view.CellClick
Address, B_Month, B_Days, residentidBox.Text =
B_Year, Citizenship, Civil_Status show_view.CurrentRow.Cells(0).Value.ToString()
FROM resident_information" lnameBox.Text =
End With show_view.CurrentRow.Cells(1).Value.ToString()
fnameBox.Text =
Dim da As New SqlDataAdapter show_view.CurrentRow.Cells(2).Value.ToString()
da.SelectCommand = cmd MIBox.Text =
show_view.CurrentRow.Cells(3).Value.ToString()
Dim dt As New DataTable ageBox.Text =
dt.Clear() show_view.CurrentRow.Cells(4).Value.ToString()
da.Fill(dt) addressBox.Text =
show_view.MultiSelect = False show_view.CurrentRow.Cells(5).Value.ToString()
show_view.DataSource = dt
show_view.AllowUserToAddRows = False monthCBBox.Text =
show_view.Columns(0).HeaderText = show_view.CurrentRow.Cells(6).Value.ToString()
"Resident_ID" dayCBBox.Text =
show_view.Columns(1).HeaderText = show_view.CurrentRow.Cells(7).Value.ToString()
"Last_name" yearBox.Text =
show_view.Columns(2).HeaderText = show_view.CurrentRow.Cells(8).Value.ToString()
"First_name"
ctzshipBox.Text =
show_view.Columns(3).HeaderText = "MI" show_view.CurrentRow.Cells(9).Value.ToString()
civ_stats.Text =
show_view.Columns(4).HeaderText = show_view.CurrentRow.Cells(10).Value.ToStrin
"Age" g()
show_view.Columns(5).HeaderText =
"Address" residentidBox.Enabled = False
show_view.Columns(6).HeaderText = lnameBox.Enabled = False
"B_Month" fnameBox.Enabled = False
show_view.Columns(7).HeaderText = MIBox.Enabled = False
"B_Days" ageBox.Enabled = False
show_view.Columns(8).HeaderText = addressBox.Enabled = False
"B_Year" monthCBBox.Enabled = False
show_view.Columns(9).HeaderText = dayCBBox.Enabled = False
"Citizenship" yearBox.Enabled = False
show_view.Columns(10).HeaderText = ctzshipBox.Enabled = False
"Civil_Status" civ_stats.Enabled = False

End Sub End Sub

Private Sub disable() Private Sub submitBtn_Click(sender As


residentidBox.Enabled = False Object, e As EventArgs) Handles
lnameBox.Enabled = False submitBtn.Click
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

ElseIf iss_on_monthCBB.Text = "" Or


Dim con As SqlConnection = New iss_on_dayCBB.Text = "" Or
SqlConnection("Data Source=DESKTOP- iss_on_yearBox.Text = "" Then
NFHHL86\SQLEXPRESS;Initial MessageBox.Show("Please Complete
Catalog=My_Database;Integrated All.", "Information", MessageBoxButtons.OK,
Security=True") MessageBoxIcon.Question)
con.Open() Return
Dim cmd As SqlCommand = New ElseIf iss_at_monthCBB.Text = "" Or
SqlCommand("SELECT * FROM iss_at_dayCBB.Text = "" Or
crtf_brgy_clearance WHERE Alias_ES = iss_at_yearBox.Text = "" Or rescertnoBox.Text
@Alias_ES", con) = "" Then
cmd.Parameters.Add("@Alias_ES", MessageBox.Show("Please Complete
SqlDbType.VarChar).Value = aliasBox.Text All.", "Information", MessageBoxButtons.OK,
Dim sda As SqlDataAdapter = New MessageBoxIcon.Question)
SqlDataAdapter(cmd) Return
Dim dt As DataTable = New DataTable() ElseIf agency.Text = "" Or idno.Text = "" Or
sda.Fill(dt) or_noBox.Text = "" Or amountBox.Text = ""
Then
Dim cma As SqlCommand = New MessageBox.Show("Please Complete
SqlCommand("SELECT * FROM All.", "Information", MessageBoxButtons.OK,
crtf_brgy_clearance WHERE Resident_ID = MessageBoxIcon.Question)
@Resident_ID", con) Return
cma.Parameters.Add("@Resident_ID", Else
SqlDbType.VarChar).Value = cmd = con.CreateCommand()
residentidBox.Text cmd.CommandType =
Dim sdadp As SqlDataAdapter = New CommandType.Text
SqlDataAdapter(cma) cmd.CommandText = "INSERT INTO
Dim dta As DataTable = New DataTable() crtf_brgy_clearance(Resident_ID,Alias_ES,Last
sdadp.Fill(dta) _name, First_name, MI, Age, Citizenship,
Civil_Status, length_of_stay_on_the_address,
If residentidBox.Text = "" Or lnameBox.Text Address, B_Month, B_Days,
= "" Or fnameBox.Text = "" Or ageBox.Text = "" B_Year,
Or addressBox.Text = "" Then issued_on_month,
MessageBox.Show("Please Complete issued_on_day, issued_on_year,
All.", "Information", MessageBoxButtons.OK, issued_at_month, issued_at_day,
MessageBoxIcon.Question) issued_at_year,
aliasBox.Text = "" Resident_Cert_No, Agency,
Return ID_no, or_no, Amount)
ElseIf (dta.Rows.Count > 0) Then VALUES
MessageBox.Show("This Account has ('" + residentidBox.Text + "','" +
the same on the database.", "Information", aliasBox.Text + "','" + lnameBox.Text + "','" +
MessageBoxButtons.OK, fnameBox.Text + "','" + MIBox.Text + "','" +
MessageBoxIcon.Question) ageBox.Text + "'
Return ,'" + ctzshipBox.Text + "','" +
ElseIf (dt.Rows.Count > 0) Then civ_stats.Text + "','" + len_stay_addBox.Text +
MessageBox.Show("Same Alias Try "','" + addressBox.Text + "','" +
Another.", "Information", monthCBBox.Text + "','" + dayCBBox.Text +
MessageBoxButtons.OK, "','" + yearBox.Text + "','" +
MessageBoxIcon.Question) iss_on_monthCBB.Text +
Return "','" + iss_on_dayCBB.Text + "','" +
ElseIf monthCBBox.Text = "" Or iss_on_yearBox.Text +
dayCBBox.Text = "" Or yearBox.Text = "" Or "','" +
ctzshipBox.Text = "" Or civ_stats.Text = "" Or iss_at_monthCBB.Text + "','" +
len_stay_addBox.Text = "" Then iss_at_dayCBB.Text + "','" +
MessageBox.Show("Please Complete iss_at_yearBox.Text +
All.", "Information", MessageBoxButtons.OK, "','" + rescertnoBox.Text +
MessageBoxIcon.Question) "','" + agency.Text + "','" + idno.Text +
Return "','" + or_noBox.Text + "','" +
amountBox.Text + "'
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

)" e.Handled = False


End If
cmd.ExecuteNonQuery() End Sub
con.Close()
MessageBox.Show("Submit Private Sub rescertnoBox_KeyPress(sender
Successfully", "Information", As Object, e As KeyPressEventArgs) Handles
MessageBoxButtons.OK, rescertnoBox.KeyPress
MessageBoxIcon.Question) If Char.IsLetter(e.KeyChar) And Not
aliasBox.Text = "" e.KeyChar = "." Then
residentidBox.Text = "" e.Handled = True
lnameBox.Text = "" MessageBox.Show("Invalid Input",
fnameBox.Text = "" "Information", MessageBoxButtons.OK,
MIBox.Text = "" MessageBoxIcon.Warning)
ageBox.Text = "" End If
addressBox.Text = "" If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True
monthCBBox.Text = "" MessageBox.Show("Invalid Input",
dayCBBox.Text = "" "Information", MessageBoxButtons.OK,
yearBox.Text = "" MessageBoxIcon.Warning)
ctzshipBox.Text = "" End If
civ_stats.Text = "" If rescertnoBox.Text.Length >= 8 Then
len_stay_addBox.Text = "" e.Handled = True
End If
iss_on_monthCBB.Text = ""
iss_on_dayCBB.Text = "" If e.KeyChar = "." Then
iss_on_yearBox.Text = "" e.Handled = True
End If
iss_at_monthCBB.Text = "" If e.KeyChar = Chr(8) Then
iss_at_dayCBB.Text = "" e.Handled = False
iss_at_yearBox.Text = "" End If
End Sub
rescertnoBox.Text = ""
agency.Text = "" Private Sub agency_KeyPress(sender As
idno.Text = "" Object, e As KeyPressEventArgs) Handles
or_noBox.Text = "" agency.KeyPress
amountBox.Text = "" If Char.IsDigit(e.KeyChar) And Not
End If e.KeyChar = "." Then
End Sub e.Handled = True
MessageBox.Show("Invalid Input",
Private Sub Alias_ES_KeyPress(sender As "Information", MessageBoxButtons.OK,
Object, e As KeyPressEventArgs) Handles MessageBoxIcon.Warning)
aliasBox.KeyPress End If
If Char.IsDigit(e.KeyChar) And Not If Char.IsPunctuation(e.KeyChar) Then
e.KeyChar = "." Then e.Handled = True
e.Handled = True MessageBox.Show("Invalid Input",
MessageBox.Show("Invalid Input", "Information", MessageBoxButtons.OK,
"Information", MessageBoxButtons.OK, MessageBoxIcon.Warning)
MessageBoxIcon.Warning) End If
End If If e.KeyChar = "." Then
If Char.IsPunctuation(e.KeyChar) Then e.Handled = True
e.Handled = True End If
MessageBox.Show("Invalid Input", If e.KeyChar = Chr(8) Then
"Information", MessageBoxButtons.OK, e.Handled = False
MessageBoxIcon.Warning) End If
End If End Sub
If e.KeyChar = "." Then
e.Handled = True Private Sub idno_KeyPress(sender As Object,
End If e As KeyPressEventArgs) Handles
If e.KeyChar = Chr(8) Then idno.KeyPress
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If Char.IsLetter(e.KeyChar) And Not e.Handled = False


e.KeyChar = "." Then End If
e.Handled = True End Sub
MessageBox.Show("Invalid Input",
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning) Private Sub
End If iss_on_monthCBB_KeyPress(sender As Object,
If Char.IsPunctuation(e.KeyChar) Then e As KeyPressEventArgs) Handles
e.Handled = True iss_on_monthCBB.KeyPress
MessageBox.Show("Invalid Input", If Char.IsDigit(e.KeyChar) And Not
"Information", MessageBoxButtons.OK, e.KeyChar = "." Then
MessageBoxIcon.Warning) e.Handled = True
End If End If
If idno.Text.Length >= 8 Then If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True e.Handled = True
End If End If
If e.KeyChar = Chr(8) Then If Not Char.IsDigit(e.KeyChar) And Not
e.Handled = False e.KeyChar = "." Then
End If e.Handled = True
End Sub End If
If e.KeyChar = "." Then
Private Sub or_noBox_KeyPress(sender As e.Handled = True
Object, e As KeyPressEventArgs) Handles End If
or_noBox.KeyPress End Sub
If Not Char.IsDigit(e.KeyChar) And Not
e.KeyChar = "." Then Private Sub
e.Handled = True iss_on_dayCBB_KeyPress(sender As Object, e
End If As KeyPressEventArgs) Handles
If Char.IsPunctuation(e.KeyChar) Then iss_on_dayCBB.KeyPress
e.Handled = True If Char.IsDigit(e.KeyChar) And Not
MessageBox.Show("Invalid Input", e.KeyChar = "." Then
"Information", MessageBoxButtons.OK, e.Handled = True
MessageBoxIcon.Warning) End If
End If If Not Char.IsDigit(e.KeyChar) And Not
If e.KeyChar = "." Then e.KeyChar = "." Then
e.Handled = True e.Handled = True
End If End If
If e.KeyChar = Chr(8) Then If Char.IsPunctuation(e.KeyChar) Then
e.Handled = False e.Handled = True
End If End If
End Sub If e.KeyChar = "." Then
e.Handled = True
Private Sub amountBox_KeyPress(sender As End If
Object, e As KeyPressEventArgs) Handles End Sub
amountBox.KeyPress
If Not Char.IsDigit(e.KeyChar) And Not Private Sub
e.KeyChar = "." Then iss_on_yearBox_KeyPress(sender As Object, e
e.Handled = True As KeyPressEventArgs) Handles
End If iss_on_yearBox.KeyPress
If Char.IsPunctuation(e.KeyChar) Then If Not Char.IsDigit(e.KeyChar) And Not
e.Handled = True e.KeyChar = "." Then
MessageBox.Show("Invalid Input", e.Handled = True
"Information", MessageBoxButtons.OK, End If
MessageBoxIcon.Warning) If e.KeyChar = "." Then
End If e.Handled = True
If e.KeyChar = "." Then End If
e.Handled = True If Char.IsPunctuation(e.KeyChar) Then
End If e.Handled = True
If e.KeyChar = Chr(8) Then End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

If iss_on_yearBox.Text.Length >= 4 Then If Char.IsPunctuation(e.KeyChar) Then


e.Handled = True e.Handled = True
End If End If
If e.KeyChar = Chr(8) Then If iss_at_yearBox.Text.Length >= 4 Then
e.Handled = False e.Handled = True
End If End If
End Sub If e.KeyChar = Chr(8) Then
e.Handled = False
Private Sub End If
iss_at_monthCBB_KeyPress(sender As Object, End Sub
e As KeyPressEventArgs) Handles
iss_at_monthCBB.KeyPress
If Char.IsDigit(e.KeyChar) And Not Private Sub backBtn_Click(sender As Object,
e.KeyChar = "." Then e As EventArgs) Handles backBtn.Click
e.Handled = True Me.Close()
End If Me.Enabled = False
If Not Char.IsDigit(e.KeyChar) And Not ctf_brgy.Show()
e.KeyChar = "." Then ctf_brgy.Enabled = True
e.Handled = True End Sub
End If
If Char.IsPunctuation(e.KeyChar) Then Private Sub searchBox_TextChanged(sender
e.Handled = True As Object, e As EventArgs) Handles
End If searchBox.TextChanged
If e.KeyChar = "." Then Dim query As String = "SELECT * FROM
e.Handled = True resident_information WHERE Last_name LIKE
End If '%" & searchBox.Text & "%' OR First_name
End Sub LIKE '%" & searchBox.Text & "%'"
Using con As SqlConnection = New
Private Sub SqlConnection("Data Source=DESKTOP-
iss_at_dayCBB_KeyPress(sender As Object, e NFHHL86\SQLEXPRESS;Initial
As KeyPressEventArgs) Handles Catalog=My_Database;Integrated
iss_at_dayCBB.KeyPress Security=True")
If Char.IsDigit(e.KeyChar) And Not Using cmd As SqlCommand = New
e.KeyChar = "." Then SqlCommand(query, con)
e.Handled = True Using da As SqlDataAdapter = New
End If SqlDataAdapter()
If Not Char.IsDigit(e.KeyChar) And Not da.SelectCommand = cmd
e.KeyChar = "." Then Using dt As New DataTable()
e.Handled = True da.Fill(dt)
End If If dt.Rows.Count > 0 Then
If Char.IsPunctuation(e.KeyChar) Then show_view.DataSource = dt
e.Handled = True Else
End If MessageBox.Show("No
If e.KeyChar = "." Then Record Found.", "Information",
e.Handled = True MessageBoxButtons.OK,
End If MessageBoxIcon.Question)
End Sub End If
End Using
Private Sub End Using
iss_at_yearBox_KeyPress(sender As Object, e End Using
As KeyPressEventArgs) Handles End Using
iss_at_yearBox.KeyPress End Sub
If Not Char.IsDigit(e.KeyChar) And Not
e.KeyChar = "." Then Private Sub
e.Handled = True len_stay_addBox_KeyPress(sender As Object,
End If e As KeyPressEventArgs) Handles
If e.KeyChar = "." Then len_stay_addBox.KeyPress
e.Handled = True If Char.IsLetter(e.KeyChar) And Not
End If e.KeyChar = "." Then
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

e.Handled = True otherBox.Enabled = False


MessageBox.Show("Invalid Input", End Sub
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning) Private Sub le_rdo_CheckedChanged(sender
End If As Object, e As EventArgs) Handles
If Char.IsPunctuation(e.KeyChar) Then le_rdo.CheckedChanged
e.Handled = True otherBox.Enabled = False
MessageBox.Show("Invalid Input", End Sub
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning) Private Sub
End If oth_rdo_CheckedChanged(sender As Object, e
If len_stay_addBox.Text.Length >= 2 Then As EventArgs) Handles
e.Handled = True oth_rdo.CheckedChanged
End If otherBox.Enabled = True
If e.KeyChar = Chr(8) Then End Sub
e.Handled = False
End If Private Sub print_brgyBtn_Click(sender As
End Sub Object, e As EventArgs) Handles
print_brgy_review.Click
End Class If re_rdo.Checked = False And
le_rdo.Checked = False And oth_rdo.Checked =
Imports System.Data.SqlClient False Then
Imports System.Data MessageBox.Show("Please Select POC")
Public Class print_brgy_clearance Return
Private Sub Form1_Paint(sender As Object, e End If
As System.Windows.Forms.PaintEventArgs) Dim re As String
Handles Me.Paint Dim le As String
ControlPaint.DrawBorder(e.Graphics, Dim oth As String
Me.ClientRectangle, Color.FromArgb(169, 93, If re_rdo.Checked = True Then
36), ButtonBorderStyle.Solid) re = "✓"
End Sub otherBox.Text = ""
Private Sub ElseIf re_rdo.Checked = False Then
print_brgy_clearance_Load(sender As Object, e re = ""
As EventArgs) Handles MyBase.Load End If
'TODO: This line of code loads data into
the 'DataSet1.crtf_brgy_clearance' table. You If le_rdo.Checked = True Then
can move, or remove it, as needed. le = "✓"
otherBox.Text = ""
Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da ElseIf le_rdo.Checked = False Then
taSet1.crtf_brgy_clearance) le = ""
otherBox.Enabled = False End If
End Sub

Private Sub Panel_Drag_MouseMove(sender If oth_rdo.Checked = True Then


As Object, e As MouseEventArgs) Handles
oth = "✓"
Panel_Drag.MouseMove
If otherBox.Text = "" Then
Static lpos As Point
MessageBox.Show("Please Input your
If e.Button =
purpose")
Windows.Forms.MouseButtons.Left Then
Return
'move form
End If
Me.Location += New Size(e.X - lpos.X,
ElseIf oth_rdo.Checked = False Then
e.Y - lpos.Y)
oth = ""
Else
End If
lpos = e.Location
End If
If show_view.SelectedRows.Count > 0
End Sub
Then
Private Sub re_rdo_CheckedChanged(sender
Dim Resident_ID As String =
As Object, e As EventArgs) Handles
show_view.SelectedRows(0).Cells(0).Value
re_rdo.CheckedChanged
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Dim Alias_ES As String = clearanceRow(Resident_ID, Alias_ES,


show_view.SelectedRows(0).Cells(1).Value Last_name, First_name, MI, Age, Citizenship,
Dim Last_name As String = Civil_Status, Address,
show_view.SelectedRows(0).Cells(2).Value
Dim First_name As String = Length_of_stay_on_the_address,
show_view.SelectedRows(0).Cells(3).Value B_Month,
Dim MI As String = B_Days, B_Year, issued_on_month,
show_view.SelectedRows(0).Cells(4).Value issued_on_day, issued_on_year,
Dim Age As String = issued_at_month,
show_view.SelectedRows(0).Cells(5).Value issued_at_day, issued_at_year,
Dim Citizenship As String =
show_view.SelectedRows(0).Cells(6).Value Resident_Cert_No, Agency, ID_No, or_no,
Dim Civil_Status As String = Amount)
show_view.SelectedRows(0).Cells(7).Value End If
Me.Enabled = False
Dim Address As String = Dim report As New CrystalReport3
show_view.SelectedRows(0).Cells(8).Value report.SetDataSource(DataSet1)
report.SetParameterValue(0, re)
Dim Length_of_stay_on_the_address As report.SetParameterValue(1, le)
String = report.SetParameterValue(2, oth)
show_view.SelectedRows(0).Cells(9).Value report.SetParameterValue(3, otherBox.Text)

Dim B_Month As String = print_brgy_rev.CrystalReportViewer3.ReportSou


show_view.SelectedRows(0).Cells(10).Value rce = report
Dim B_Days As String =
show_view.SelectedRows(0).Cells(11).Value print_brgy_rev.CrystalReportViewer3.Zoom(100
Dim B_Year As String = %)
show_view.SelectedRows(0).Cells(12).Value print_brgy_rev.Refresh()
print_brgy_rev.Show()
Dim issued_on_month As String = End Sub
show_view.SelectedRows(0).Cells(13).Value Private Sub backBtn_Click_1(sender As
Dim issued_on_day As String = Object, e As EventArgs) Handles backBtn.Click
show_view.SelectedRows(0).Cells(14).Value Me.Close()
Dim issued_on_year As String = Me.Enabled = False
show_view.SelectedRows(0).Cells(15).Value ctf_brgy.Show()
ctf_brgy.Enabled = True
Dim issued_at_month As String = End Sub
show_view.SelectedRows(0).Cells(16).Value
Dim issued_at_day As String = Private Sub IconButton1_Click(sender As
show_view.SelectedRows(0).Cells(17).Value Object, e As EventArgs) Handles
Dim issued_at_year As String = refreshBtn.Click
show_view.SelectedRows(0).Cells(18).Value
Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da
Dim Resident_Cert_No As String = taSet1.crtf_brgy_clearance)
show_view.SelectedRows(0).Cells(19).Value End Sub
Dim Agency As String =
show_view.SelectedRows(0).Cells(20).Value Private Sub searchBox_TextChanged(sender
Dim ID_No As String = As Object, e As EventArgs) Handles
show_view.SelectedRows(0).Cells(21).Value searchBox.TextChanged
Dim or_no As String = Dim query As String = "SELECT * FROM
show_view.SelectedRows(0).Cells(22).Value crtf_brgy_clearance WHERE Alias_ES LIKE '%"
Dim Amount As String = & searchBox.Text & "%'"
show_view.SelectedRows(0).Cells(23).Value Using con As SqlConnection = New
SqlConnection("Data Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
Catalog=My_Database;Integrated
Me.DataSet1.crtf_brgy_clearance.Rows.Clear() Security=True")
Using cmd As SqlCommand = New
Me.DataSet1.crtf_brgy_clearance.Addcrtf_brgy_ SqlCommand(query, con)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Using da As SqlDataAdapter = New


SqlDataAdapter() If WindowState =
da.SelectCommand = cmd FormWindowState.Normal Then
Using dt As New DataTable()
da.Fill(dt) WindowState =
If dt.Rows.Count > 0 Then FormWindowState.Maximized
show_view.DataSource = dt Else
Else
MessageBox.Show("No WindowState =
Record Found.", "Information", FormWindowState.Normal
MessageBoxButtons.OK, Me.Width = 794
MessageBoxIcon.Question) Me.Height = 633
End If End If
End Using
End Using End Sub
End Using Private Sub Panel_Drag_MouseMove(sender
End Using As Object, e As MouseEventArgs) Handles
End Sub Panel_Drag.MouseMove
End Class Static lpos As Point
If e.Button =
Imports System.Data.SqlClient Windows.Forms.MouseButtons.Left Then
Imports System.IO 'move form
Imports System.Crystal Me.Location += New Size(e.X - lpos.X,
Public Class print_brgy_rev e.Y - lpos.Y)
Private Const cGrip = 16 Else
Private Const cCaption = 32 lpos = e.Location
End If
Protected Overrides Sub WndProc(ByRef m End Sub
As Message) Private Sub closeBtn_Click(sender As Object,
If m.Msg = &H84 Then e As EventArgs) Handles closeBtn.Click
Dim pos As Point = New Me.Close()
Point(m.LParam.ToInt32()) print_brgy_clearance.Enabled = True
pos = Me.PointToClient(pos) printnumBox.Text = ""
resident_id.Text = ""
If pos.Y < cCaption Then lastnBox.Text = ""
m.Result = CType(2, IntPtr) firstnBox.Text = ""
Return ageBox.Text = ""
End If dateBox.Text = ""
timeBox.Text = ""
If pos.X >= Me.ClientSize.Width - cGrip End Sub
AndAlso pos.Y >= Me.ClientSize.Height - cGrip Private Sub clear()
Then resident_id.Text = ""
m.Result = CType(17, IntPtr) lastnBox.Text = ""
Return firstnBox.Text = ""
End If ageBox.Text = ""
End If dateBox.Text = ""
timeBox.Text = ""
MyBase.WndProc(m) End Sub
End Sub Private Sub seachN_Click(sender As Object,
Private Sub minBtn_Click(sender As Object, e e As EventArgs) Handles seachN.Click
As EventArgs) Handles minBtn.Click Me.Enabled = False
searchname.Show()
WindowState = End Sub
FormWindowState.Minimized Dim con As New SqlConnection
End Sub Dim cmd As SqlCommand
Private Sub print_brgy_rev_Load(sender As
Private Sub maxminBtn_Click(sender As Object, e As EventArgs) Handles MyBase.Load
Object, e As EventArgs) Handles clear()
maxminBtn.Click
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

con.ConnectionString = "Data MessageBoxButtons.OK,


Source=DESKTOP- MessageBoxIcon.Question)
NFHHL86\SQLEXPRESS;Initial Return
Catalog=My_Database;Integrated End If
Security=True"
If con.State = ConnectionState.Open Then If printnumBox.Text = "" Then
con.Close() MessageBox.Show("Please Input Print
End If number", "Information", MessageBoxButtons.OK,
con.Open() MessageBoxIcon.Question)
CrystalReportViewer3.ShowPrintButton = Return
False End If
printnumBox.Enabled = False
resident_id.Enabled = False MessageBox.Show("Make Sure the
lastnBox.Enabled = False Information was right, Before you Print.",
firstnBox.Enabled = False "Information", MessageBoxButtons.OK,
ageBox.Enabled = False MessageBoxIcon.Question)
dateBox.Enabled = False
timeBox.Enabled = False If crprintdia.ShowDialog() =
iss_reportBox.Enabled = False DialogResult.OK Then
iss_reportBox.Text = "Issued Certificate of Dim crReportDocument As
Barangay" CrystalDecisions.CrystalReports.Engine.Report
dateBox.Text = Document =
DateTime.Now.ToString("MMMM : dd : yyyy") CType(CrystalReportViewer3.ReportSource,
timeBox.Text = TimeOfDay.ToString("hh : CrystalReport3)
mm tt") Dim nCopy As Integer =
End Sub crprintdia.PrinterSettings.Copies
Dim sPage As Integer =
Dim numb As String = "" crprintdia.PrinterSettings.FromPage
Dim rand As Random = New Random() Dim ePage As Integer =
Private Sub genBtn() crprintdia.PrinterSettings.ToPage
For y As Integer = 1 To 6 Dim collate As Boolean =
numb = Date.Now.Year crprintdia.PrinterSettings.Collate
If y = 6 Then
numb += "5" crReportDocument.PrintOptions.PrinterName =
End If crprintdia.PrinterSettings.PrinterName
Next crReportDocument.PrintToPrinter(nCopy,
collate, sPage, ePage)
For y As Integer = 1 To 6
numb += Convert.ToString(rand.Next(0, MessageBox.Show("Print Successfully.",
9)) "Information", MessageBoxButtons.OK,
Next MessageBoxIcon.Question)
printnumBox.Text = numb cmd = con.CreateCommand()
If printnumBox.Text Then cmd.CommandType =
numb = Nothing CommandType.Text
End If cmd.CommandText = "INSERT INTO
End Sub history_transacts(Print_Number, Issued_Report,
Resident_ID, Last_Name, First_Name, Age,
Private Sub printBtn_Click(sender As Object, Date_Issued, Time_Issued)
e As EventArgs) Handles printBtn.Click VALUES
Dim crprintdia As PrintDialog = New ('" + printnumBox.Text + "','" +
PrintDialog() iss_reportBox.Text + "','" + resident_id.Text + "'
Dim saveprintdia As PrintDialog = New ,'" + lastnBox.Text + "','" +
PrintDialog() firstnBox.Text + "'
If resident_id.Text = "" Or lastnBox.Text = ,'" + ageBox.Text + "','" +
"" Or firstnBox.Text = "" Or ageBox.Text = "" Or dateBox.Text + "'
dateBox.Text = "" Or timeBox.Text = "" Then ,'" + timeBox.Text + "'
MessageBox.Show("Plese Input All )"
Textbox.", "Information", cmd.ExecuteNonQuery()
Me.Close()
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

print_brgy_clearance.Enabled = True Me.Location += New Size(e.X - lpos.X,


crprintdia.Dispose() e.Y - lpos.Y)
ElseIf DialogResult.Cancel Then Else
crprintdia.Dispose() lpos = e.Location
Return End If
End If End Sub
End Sub
Private Sub Form1_Paint(sender As Object, e
Private Sub GenerateBtn_Click(sender As As System.Windows.Forms.PaintEventArgs)
Object, e As EventArgs) Handles Handles Me.Paint
GenerateBtn.Click ControlPaint.DrawBorder(e.Graphics,
genBtn() Me.ClientRectangle, Color.FromArgb(169, 93,
End Sub 36), ButtonBorderStyle.Solid)
End Sub
Private Sub Form1_Paint(sender As Object, e
As System.Windows.Forms.PaintEventArgs)
Handles Me.Paint Dim con As New SqlConnection("Data
ControlPaint.DrawBorder(e.Graphics, Source=DESKTOP-
Me.ClientRectangle, Color.FromArgb(169, 93, NFHHL86\SQLEXPRESS;Initial
36), ButtonBorderStyle.Solid) Catalog=My_Database;Integrated
End Sub Security=True")
End Class Private Sub update_brgy_form_Load(sender
As Object, e As EventArgs) Handles
Imports System.Data.SqlClient MyBase.Load
Imports System.Data 'TODO: This line of code loads data into
Public Class update_brgy_form the 'DataSet1.crtf_brgy_clearance' table. You
Private Const cGrip = 16 can move, or remove it, as needed.
Private Const cCaption = 32
Me.Crtf_brgy_clearanceTableAdapter.Fill(Me.Da
Protected Overrides Sub WndProc(ByRef m taSet1.crtf_brgy_clearance)
As Message)
If m.Msg = &H84 Then End Sub
Dim pos As Point = New Private Sub show_view_DataError(sender As
Point(m.LParam.ToInt32()) Object, e As DataGridViewDataErrorEventArgs)
pos = Me.PointToClient(pos) Handles show_view.DataError
e.Cancel = True
If pos.Y < cCaption Then End Sub
m.Result = CType(2, IntPtr) Private Sub update_res_Btn_Click(sender As
Return Object, e As EventArgs) Handles
End If update_res_Btn.Click
For i As Integer = 0 To
If pos.X >= Me.ClientSize.Width - cGrip show_view.Rows.Count - 1
AndAlso pos.Y >= Me.ClientSize.Height - cGrip Dim cm4 As New SqlCommand("", con)
Then cm4.CommandText = "UPDATE
m.Result = CType(17, IntPtr) crtf_brgy_clearance SET Alias_ES='" &
Return show_view.Rows(i).Cells(1).Value & "'
End If ,Last_name='" &
End If show_view.Rows(i).Cells(2).Value &
"',First_name='" &
MyBase.WndProc(m) show_view.Rows(i).Cells(3).Value & "',MI='" &
End Sub show_view.Rows(i).Cells(4).Value & "'
Private Sub Panel_Drag_MouseMove(sender ,Age='" &
As Object, e As MouseEventArgs) Handles show_view.Rows(i).Cells(5).Value &
Panel_Drag.MouseMove "',Citizenship='" &
Static lpos As Point show_view.Rows(i).Cells(6).Value &
If e.Button = "',Civil_Status='" &
Windows.Forms.MouseButtons.Left Then show_view.Rows(i).Cells(7).Value & "'
'move form ,Length_of_stay_on_the_address='" &
show_view.Rows(i).Cells(8).Value & "'
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

,Address='" & If Me.show_view.CurrentCell.ColumnIndex


show_view.Rows(i).Cells(9).Value & = 8 Then
"',B_Month='" & AddHandler e.Control.KeyPress,
show_view.Rows(i).Cells(10).Value & AddressOf IsDigit
"',B_Days='" &
show_view.Rows(i).Cells(11).Value & "' ElseIf
,B_Year='" & Me.show_view.CurrentCell.ColumnIndex = 15
show_view.Rows(i).Cells(12).Value & "' Then
AddHandler e.Control.KeyPress,
, issued_on_month='" & AddressOf IsDigit
show_view.Rows(i).Cells(13).Value & "',
issued_on_day='" & ElseIf
show_view.Rows(i).Cells(14).Value & Me.show_view.CurrentCell.ColumnIndex = 17
"',issued_on_year='" & Then
show_view.Rows(i).Cells(15).Value & "' AddHandler e.Control.KeyPress,
, issued_at_month='" & AddressOf IsDigit
show_view.Rows(i).Cells(16).Value & "',
issued_at_day='" & ElseIf
show_view.Rows(i).Cells(17).Value & Me.show_view.CurrentCell.ColumnIndex = 18
"',issued_at_year='" & Then
show_view.Rows(i).Cells(18).Value & "' AddHandler e.Control.KeyPress,
, Resident_Cert_No='" & AddressOf IsDigit
show_view.Rows(i).Cells(19).Value & "'
, Agency='" & ElseIf
show_view.Rows(i).Cells(20).Value & "', Me.show_view.CurrentCell.ColumnIndex = 19
ID_No='" & show_view.Rows(i).Cells(21).Value Then
& "', or_no='" & AddHandler e.Control.KeyPress,
show_view.Rows(i).Cells(22).Value & AddressOf IsDigit
"', Amount='" &
show_view.Rows(i).Cells(23).Value & ElseIf
"'WHERE Resident_ID=" & Me.show_view.CurrentCell.ColumnIndex = 20
show_view.Rows(i).Cells(0).Value & "" Then
con.Open() AddHandler e.Control.KeyPress,
cm4.ExecuteNonQuery() AddressOf IsChar
con.Close() ElseIf
Next Me.show_view.CurrentCell.ColumnIndex = 21
MessageBox.Show("Rows Updated Then
Successfully.", "Information", AddHandler e.Control.KeyPress,
MessageBoxButtons.OK, AddressOf IsDigit
MessageBoxIcon.Question) ElseIf
Me.show_view.CurrentCell.ColumnIndex = 22
End Sub Then
AddHandler e.Control.KeyPress,
Private Sub IconButton2_Click(sender As AddressOf IsDigit
Object, e As EventArgs) Handles End If
IconButton2.Click
Me.Close() End Sub
Me.Enabled = False
ctf_brgy.Enabled = True Private Sub IsDigit(ByVal sender As Object,
ctf_brgy.Show() ByVal e As KeyPressEventArgs)
End Sub 'keypress for string'
'only integer allowed'
Private Sub If Char.IsLetter(e.KeyChar) And Not
show_view_EditingControlShowing(sender As e.KeyChar = "." Then
Object, e As e.Handled = True
DataGridViewEditingControlShowingEventArgs) End If
Handles show_view.EditingControlShowing If Char.IsDigit(e.KeyChar) And Not
e.KeyChar = "." Then
e.Handled = False
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End If End Sub


If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True Private Sub maxminBtn_Click(sender As
End If Object, e As EventArgs) Handles
If e.KeyChar = Chr(8) Then maxminBtn.Click
e.Handled = False If WindowState =
End If FormWindowState.Normal Then
End Sub
Private Sub IsChar(ByVal sender As Object, WindowState =
ByVal e As KeyPressEventArgs) FormWindowState.Maximized
'keypress for integer' Else
'only string allowed'
If Char.IsDigit(e.KeyChar) And Not WindowState =
e.KeyChar = "." Then FormWindowState.Normal
e.Handled = True Me.Width = 991
End If Me.Height = 589
If Char.IsLetter(e.KeyChar) And Not End If
e.KeyChar = "." Then End Sub
e.Handled = False
End If Private Sub minBtn_Click(sender As Object, e
If Char.IsPunctuation(e.KeyChar) Then As EventArgs) Handles minBtn.Click
e.Handled = True WindowState =
End If FormWindowState.Minimized
If e.KeyChar = Chr(8) Then End Sub
e.Handled = False End Class
End If
End Sub Imports System.Data.SqlClient
Imports System.Data
Private Sub searchBox_TextChanged(sender Imports System.Data.DataTable
As Object, e As EventArgs) Handles Public Class searchname
searchBox.TextChanged Private Sub Panel_Drag_MouseMove(sender
Dim query As String = "SELECT * FROM As Object, e As MouseEventArgs) Handles
crtf_brgy_clearance WHERE Last_name LIKE Panel_Drag.MouseMove
'%" & searchBox.Text & "%' OR First_name Static lpos As Point
LIKE '%" & searchBox.Text & "%'" If e.Button =
Using con As SqlConnection = New Windows.Forms.MouseButtons.Left Then
SqlConnection("Data Source=DESKTOP- 'move form
NFHHL86\SQLEXPRESS;Initial Me.Location += New Size(e.X - lpos.X,
Catalog=My_Database;Integrated e.Y - lpos.Y)
Security=True") Else
Using cmd As SqlCommand = New lpos = e.Location
SqlCommand(query, con) End If
Using da As SqlDataAdapter = New End Sub
SqlDataAdapter()
da.SelectCommand = cmd Private Sub Form1_Paint(sender As Object, e
Using dt As New DataTable() As System.Windows.Forms.PaintEventArgs)
da.Fill(dt) Handles Me.Paint
If dt.Rows.Count > 0 Then ControlPaint.DrawBorder(e.Graphics,
show_view.DataSource = dt Me.ClientRectangle, Color.FromArgb(169, 93,
Else 36), ButtonBorderStyle.Solid)
MessageBox.Show("No End Sub
Record Found.", "Information",
MessageBoxButtons.OK, Private Sub searchname_Load(sender As
MessageBoxIcon.Question) Object, e As EventArgs) Handles MyBase.Load
End If 'TODO: This line of code loads data into
End Using the 'DataSet1.resident_information' table. You
End Using can move, or remove it, as needed.
End Using
End Using
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Me.Resident_informationTableAdapter.Fill(Me.D Private Sub closeBtn_Click(sender As Object,


ataSet1.resident_information) e As EventArgs) Handles closeBtn.Click
Me.Close()
End Sub print_residency.Enabled = True
print_indigency.Enabled = True
Private Sub selectBtn_Click(sender As Object, print_brgy_rev.Enabled = True
e As EventArgs) Handles selectBtn.Click End Sub
MessageBox.Show("Make Sure the name
is right.", "Information", MessageBoxButtons.OK, Private Sub searchbox_TextChanged(sender
MessageBoxIcon.Question) As Object, e As EventArgs) Handles
If show_view.SelectedRows.Count > 0 searchbox.TextChanged
Then Dim query As String = "SELECT * FROM
print_indigency.resident_id.Text = resident_information WHERE Last_name LIKE
show_view.SelectedRows(0).Cells(0).Value.ToS '%" & searchbox.Text & "%' OR First_name
tring LIKE '%" & searchbox.Text & "%'"
print_indigency.lastnBox.Text = Using con As SqlConnection = New
show_view.SelectedRows(0).Cells(1).Value.ToS SqlConnection("Data Source=DESKTOP-
tring NFHHL86\SQLEXPRESS;Initial
print_indigency.firstnBox.Text = Catalog=My_Database;Integrated
show_view.SelectedRows(0).Cells(2).Value.ToS Security=True")
tring Using cmd As SqlCommand = New
print_indigency.ageBox.Text = SqlCommand(query, con)
show_view.SelectedRows(0).Cells(4).Value.ToS Using da As SqlDataAdapter = New
tring SqlDataAdapter()
End If da.SelectCommand = cmd
Using dt As New DataTable()
If show_view.SelectedRows.Count > 0 da.Fill(dt)
Then If dt.Rows.Count > 0 Then
print_residency.resident_id.Text = show_view.DataSource = dt
show_view.SelectedRows(0).Cells(0).Value.ToS Else
tring MessageBox.Show("No
print_residency.lastnBox.Text = Information Found.", "Information",
show_view.SelectedRows(0).Cells(1).Value.ToS MessageBoxButtons.OK,
tring MessageBoxIcon.Question)
print_residency.firstnBox.Text = End If
show_view.SelectedRows(0).Cells(2).Value.ToS End Using
tring End Using
print_residency.ageBox.Text = End Using
show_view.SelectedRows(0).Cells(4).Value.ToS End Using
tring End Sub
End If End Class

If show_view.SelectedRows.Count > 0 Imports System.Data.SqlClient


Then Imports System.Data
print_brgy_rev.resident_id.Text = Public Class image_form
show_view.SelectedRows(0).Cells(0).Value.ToS Private Sub Form_Paint(sender As Object, e
tring As System.Windows.Forms.PaintEventArgs)
print_brgy_rev.lastnBox.Text = Handles Me.Paint
show_view.SelectedRows(0).Cells(1).Value.ToS ControlPaint.DrawBorder(e.Graphics,
tring Me.ClientRectangle, Color.FromArgb(169, 93,
print_brgy_rev.firstnBox.Text = 36), ButtonBorderStyle.Solid)
show_view.SelectedRows(0).Cells(2).Value.ToS End Sub
tring
print_brgy_rev.ageBox.Text = Private Const cGrip = 16
show_view.SelectedRows(0).Cells(4).Value.ToS Private Const cCaption = 32
tring Protected Overrides Sub WndProc(ByRef m
End If As Message)
End Sub If m.Msg = &H84 Then
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Dim pos As Point = New MessageBoxButtons.OK,


Point(m.LParam.ToInt32()) MessageBoxIcon.Question)
pos = Me.PointToClient(pos) End If
End Using
If pos.Y < cCaption Then End Using
m.Result = CType(2, IntPtr) End Using
Return End Using
End If End Sub

If pos.X >= Me.ClientSize.Width - cGrip Private Sub backBtn_Click(sender As Object,


AndAlso pos.Y >= Me.ClientSize.Height - cGrip e As EventArgs) Handles backBtn.Click
Then Me.Close()
m.Result = CType(17, IntPtr) main_form.Show()
Return main_form.Enabled = True
End If End Sub
End If
Private Sub minBtn_Click(sender As Object, e
MyBase.WndProc(m) As EventArgs) Handles minBtn.Click
End Sub WindowState =
FormWindowState.Minimized
Private Sub Panel_Drag_MouseMove(sender End Sub
As Object, e As MouseEventArgs) Handles
Panel_Drag.MouseMove Private Sub maxminBtn_Click(sender As
Static lpos As Point Object, e As EventArgs) Handles
If e.Button = maxminBtn.Click
Windows.Forms.MouseButtons.Left Then If WindowState =
'move form FormWindowState.Normal Then
Me.Location += New Size(e.X - lpos.X,
e.Y - lpos.Y) WindowState =
Else FormWindowState.Maximized
lpos = e.Location Else
End If
End Sub WindowState =
FormWindowState.Normal
Private Sub searchBox_TextChanged(sender Me.Width = 922
As Object, e As EventArgs) Handles Me.Height = 625
searchBox.TextChanged End If

Dim query As String = "SELECT * FROM End Sub


imagelist WHERE Last_Name LIKE '%" &
searchBox.Text & "%' OR First_Name LIKE '%" Private Sub registresBtn_Click(sender As
& searchBox.Text & "%'" Object, e As EventArgs) Handles
Using con As SqlConnection = New registresBtn.Click
SqlConnection("Data Source=DESKTOP- Me.Hide()
NFHHL86\SQLEXPRESS;Initial Me.Enabled = False
Catalog=My_Database;Integrated create_image_list.Show()
Security=True") End Sub
Using cmd As SqlCommand = New Private Sub BindDataList()
SqlCommand(query, con) Dim con As New SqlConnection("Data
Using da As SqlDataAdapter = New Source=DESKTOP-
SqlDataAdapter() NFHHL86\SQLEXPRESS;Initial
da.SelectCommand = cmd Catalog=My_Database;Integrated
Using dt As New DataTable() Security=True")
da.Fill(dt) con.Open()
If dt.Rows.Count > 0 Then Dim cmd As New SqlCommand("select *
show_view.DataSource = dt from imagelist", con)
Else Dim sda As New SqlDataAdapter(cmd)
MessageBox.Show("No Dim dt As New DataTable
Record Found.", "Information", sda.Fill(dt)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

show_view.DataSource = dt If con.State = ConnectionState.Open Then


For i = 0 To show_view.Rows.Count - 1 con.Close()
Dim r As DataGridViewRow = End If
show_view.Rows(i) con.Open()
r.Height = 100 'TODO: This line of code loads data into
Dim imgc As New the 'DataSet1.resident_information' table. You
DataGridViewImageColumn() can move, or remove it, as needed.
imgc = show_view.Columns("photo")
imgc.ImageLayout = Me.Resident_informationTableAdapter.Fill(Me.D
DataGridViewImageCellLayout.Stretch ataSet1.resident_information)
Next imageidBox.Enabled = False
con.Close() residentidBox.Enabled = False
End Sub lnameBox.Enabled = False
fnameBox.Enabled = False
Private Sub refreshBtn_Click(sender As End Sub
Object, e As EventArgs) Handles
refreshBtn.Click Private Sub captu_Click(sender As Object, e
BindDataList() As EventArgs) Handles capt.Click
End Sub MessageBox.Show("Please Stand by your
webcam.")
Private Sub image_form_Load(sender As Me.Enabled = False
Object, e As EventArgs) Handles MyBase.Load capture_form.Show()
BindDataList() End Sub
End Sub
End Class Private Sub show_view_CellClick(sender As
Object, e As DataGridViewCellEventArgs)
Imports System.Data Handles show_view.CellClick
Imports System.Data.SqlClient residentidBox.Text =
Imports System.IO show_view.CurrentRow.Cells(0).Value.ToString()
Public Class create_image_list lnameBox.Text =
Private Sub Panel_Drag_MouseMove(sender show_view.CurrentRow.Cells(1).Value.ToString()
As Object, e As MouseEventArgs) Handles fnameBox.Text =
Panel_Drag.MouseMove show_view.CurrentRow.Cells(2).Value.ToString()
Static lpos As Point End Sub
If e.Button =
Windows.Forms.MouseButtons.Left Then Private Sub submitBtn_Click(sender As
'move form Object, e As EventArgs) Handles
Me.Location += New Size(e.X - lpos.X, submitBtn.Click
e.Y - lpos.Y) Dim con As New SqlConnection("Data
Else Source=DESKTOP-
lpos = e.Location NFHHL86\SQLEXPRESS;Initial
End If Catalog=My_Database;Integrated
End Sub Security=True")
Private Sub backBtn_Click(sender As Object, con.Open()
e As EventArgs) Handles backBtn.Click Dim cmd4 As SqlCommand = New
Me.Close() SqlCommand("SELECT * FROM imagelist
image_form.Show() WHERE Resident_ID= @Resident_ID", con)
image_form.Enabled = True cmd4.Parameters.Add("@Resident_ID",
End Sub SqlDbType.VarChar).Value =
Dim con As New SqlConnection residentidBox.Text
Dim cmd As SqlCommand Dim sda As SqlDataAdapter = New
Private Sub create_image_list_Load(sender SqlDataAdapter(cmd4)
As Object, e As EventArgs) Handles Dim dt As DataTable = New DataTable()
MyBase.Load sda.Fill(dt)
con.ConnectionString = "Data
Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial If PictureBox3.Image Is Nothing Then
Catalog=My_Database;Integrated MessageBox.Show("No Picture.", "Save",
Security=True" MessageBoxButtons.OK)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

ElseIf residentidBox.Text = "" Then For y As Integer = 1 To 6


MessageBox.Show("Empty, Fill in.", numb = Date.Now.Year
"Save", MessageBoxButtons.OK) If y = 6 Then
ElseIf (dt.Rows.Count > 0) Then numb += ""
MessageBox.Show("This Account has End If
the same on the database.", "Information", Next
MessageBoxButtons.OK,
MessageBoxIcon.Question) For y As Integer = 1 To 6
Return numb += Convert.ToString(rand.Next(0,
Else 9))
Dim query As String = "INSERT INTO Next
imagelist(Image_ID,Resident_ID, Last_Name, imageidBox.Text = numb
First_Name ,photo) VALUES(@Image_ID, If imageidBox.Text Then
@Resident_ID, @Last_Name, numb = Nothing
@First_Name,@photo)" End If
Dim cmd As New SqlCommand(query, End Sub
con) End Class

cmd.Parameters.AddWithValue("@Image_ID", Imports AForge


imageidBox.Text) Imports AForge.Video
Imports AForge.Video.DirectShow
cmd.Parameters.AddWithValue("@Resident_ID", Imports System.IO
residentidBox.Text) Public Class capture_form
Dim CAMERA As VideoCaptureDevice
cmd.Parameters.AddWithValue("@Last_Name", Dim bmp As Bitmap
lnameBox.Text) Dim Cap As String = "Capture"
Private Sub capture_form_Load(sender As
cmd.Parameters.AddWithValue("@First_Name", Object, e As EventArgs) Handles MyBase.Load
fnameBox.Text) getBtn.Enabled = False
Dim ms As New MemoryStream() Dim CAMARAS As
PictureBox3.Image.Save(ms, VideoCaptureDeviceForm = New
System.Drawing.Imaging.ImageFormat.Png) VideoCaptureDeviceForm()
Dim data As Byte() = ms.GetBuffer() If CAMARAS.ShowDialog() =
Dim p As New SqlParameter("@photo", DialogResult.OK Then
SqlDbType.Image) CAMERA = CAMARAS.VideoDevice
p.Value = data AddHandler CAMERA.NewFrame, New
cmd.Parameters.Add(p) NewFrameEventHandler(AddressOf Captured)
cmd.ExecuteNonQuery() CAMERA.Start()
MessageBox.Show("Image Save Else
Successfully.", "Save", MessageBoxButtons.OK) Me.Close()
imageidBox.Text = "" create_image_list.Enabled = True
residentidBox.Text = "" create_image_list.Show()
lnameBox.Text = "" End If
fnameBox.Text = "" End Sub
PictureBox3.Image = Nothing Private Sub Captured(sender As Object,
con.Close() eventArgs As NewFrameEventArgs)
End If bmp =
End Sub DirectCast(eventArgs.Frame.Clone(), Bitmap)
PictureBox1.Image =
Dim numb As String = "" DirectCast(eventArgs.Frame.Clone(), Bitmap)
Dim rand As Random = New Random() End Sub

Private Sub GenerateBtn_Click(sender As Private Sub capture_image_Click(sender As


Object, e As EventArgs) Handles Object, e As EventArgs) Handles captBtn.Click
GenerateBtn.Click PictureBox2.Image = PictureBox1.Image
genBtn() getBtn.Enabled = True
End Sub End Sub

Private Sub genBtn()


POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

Private Sub getBtn_Click(sender As Object, e


As EventArgs) Handles getBtn.Click Private Sub janrd_CheckedChanged(sender
Me.Close() As Object, e As EventArgs) Handles
getBtn.Enabled = False janrd.CheckedChanged
create_image_list.Enabled = True If janrd.Checked = True Then
create_image_list.PictureBox3.Image = listlbl.Text = "List of January"
PictureBox2.Image Dim cmd As New SqlCommand("select *
create_image_list.Show() from history_transacts WHERE Date_Issued
End Sub LIKE 'January%'", con)
Dim sda As New SqlDataAdapter(cmd)
Private Sub backBtn_Click(sender As Object, Dim dt As New DataTable
e As EventArgs) Handles backBtn.Click sda.Fill(dt)
Me.Close() show_view.DataSource = dt
create_image_list.Enabled = True End If
End Sub End Sub
End Class
Private Sub febrd_CheckedChanged(sender
Imports System.Data.SqlClient As Object, e As EventArgs) Handles
Imports System.Data febrd.CheckedChanged
Public Class history_transacts If febrd.Checked = True Then
Dim cmd As SqlCommand listlbl.Text = "List of February"
Dim con As New SqlConnection("Data Dim cmd As New SqlCommand("select *
Source=DESKTOP- from history_transacts WHERE Date_Issued
NFHHL86\SQLEXPRESS;Initial LIKE 'February%'", con)
Catalog=My_Database;Integrated Dim sda As New SqlDataAdapter(cmd)
Security=True") Dim dt As New DataTable
Private Sub history_transacts_Load(sender sda.Fill(dt)
As Object, e As EventArgs) Handles show_view.DataSource = dt
MyBase.Load End If
'TODO: This line of code loads data into End Sub
the 'DataSet1.history_transacts' table. You can
move, or remove it, as needed. Private Sub marrd_CheckedChanged(sender
As Object, e As EventArgs) Handles
Me.History_transactsTableAdapter.Fill(Me.Data marrd.CheckedChanged
Set1.history_transacts) If marrd.Checked = True Then
listlbl.Text = "List of March"
con.ConnectionString = "Data Dim cmd As New SqlCommand("select *
Source=DESKTOP- from history_transacts WHERE Date_Issued
NFHHL86\SQLEXPRESS;Initial LIKE 'March%'", con)
Catalog=My_Database;Integrated Dim sda As New SqlDataAdapter(cmd)
Security=True" Dim dt As New DataTable
If con.State = ConnectionState.Open Then sda.Fill(dt)
con.Close() show_view.DataSource = dt
End If End If
End Sub End Sub

Private Sub allrd_CheckedChanged(sender Private Sub aprrd_CheckedChanged(sender


As Object, e As EventArgs) Handles As Object, e As EventArgs) Handles
allrd.CheckedChanged aprrd.CheckedChanged
If allrd.Checked = True Then If aprrd.Checked = True Then
listlbl.Text = "List of All Reports" listlbl.Text = "List of April"
Dim cmd As New SqlCommand("select * Dim cmd As New SqlCommand("select *
from history_transacts", con) from history_transacts WHERE Date_Issued
Dim sda As New SqlDataAdapter(cmd) LIKE 'April%'", con)
Dim dt As New DataTable Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt) Dim dt As New DataTable
show_view.DataSource = dt sda.Fill(dt)
End If show_view.DataSource = dt
End Sub End If
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End Sub End If


End Sub
Private Sub mayrd_CheckedChanged(sender
As Object, e As EventArgs) Handles Private Sub septrd_CheckedChanged(sender
mayrd.CheckedChanged As Object, e As EventArgs) Handles
If mayrd.Checked = True Then septrd.CheckedChanged
listlbl.Text = "List of May" If septrd.Checked = True Then
Dim cmd As New SqlCommand("select * listlbl.Text = "List of September"
from history_transacts WHERE Date_Issued Dim cmd As New SqlCommand("select *
LIKE 'May%'", con) from history_transacts WHERE Date_Issued
Dim sda As New SqlDataAdapter(cmd) LIKE 'September%'", con)
Dim dt As New DataTable Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt) Dim dt As New DataTable
show_view.DataSource = dt sda.Fill(dt)
End If show_view.DataSource = dt
End Sub End If
End Sub
Private Sub junrd_CheckedChanged(sender
As Object, e As EventArgs) Handles Private Sub octrd_CheckedChanged(sender
junrd.CheckedChanged As Object, e As EventArgs) Handles
If junrd.Checked = True Then octrd.CheckedChanged
listlbl.Text = "List of June" If octrd.Checked = True Then
Dim cmd As New SqlCommand("select * listlbl.Text = "List of October"
from history_transacts WHERE Date_Issued Dim cmd As New SqlCommand("select *
LIKE 'June%'", con) from history_transacts WHERE Date_Issued
Dim sda As New SqlDataAdapter(cmd) LIKE 'October%'", con)
Dim dt As New DataTable Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt) Dim dt As New DataTable
show_view.DataSource = dt sda.Fill(dt)
End If show_view.DataSource = dt
End Sub End If
End Sub
Private Sub julrd_CheckedChanged(sender
As Object, e As EventArgs) Handles Private Sub novrd_CheckedChanged(sender
julrd.CheckedChanged As Object, e As EventArgs) Handles
If julrd.Checked = True Then novrd.CheckedChanged
listlbl.Text = "List of July" If novrd.Checked = True Then
Dim cmd As New SqlCommand("select * listlbl.Text = "List of November"
from history_transacts WHERE Date_Issued Dim cmd As New SqlCommand("select *
LIKE 'July%'", con) from history_transacts WHERE Date_Issued
Dim sda As New SqlDataAdapter(cmd) LIKE 'November%'", con)
Dim dt As New DataTable Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt) Dim dt As New DataTable
show_view.DataSource = dt sda.Fill(dt)
End If show_view.DataSource = dt
End Sub End If
End Sub
Private Sub augrd_CheckedChanged(sender
As Object, e As EventArgs) Handles Private Sub decrd_CheckedChanged(sender
augrd.CheckedChanged As Object, e As EventArgs) Handles
If augrd.Checked = True Then decrd.CheckedChanged
listlbl.Text = "List of August" If decrd.Checked = True Then
Dim cmd As New SqlCommand("select * listlbl.Text = "List of December"
from history_transacts WHERE Date_Issued Dim cmd As New SqlCommand("select *
LIKE 'August%'", con) from history_transacts WHERE Date_Issued
Dim sda As New SqlDataAdapter(cmd) LIKE 'December%'", con)
Dim dt As New DataTable Dim sda As New SqlDataAdapter(cmd)
sda.Fill(dt) Dim dt As New DataTable
show_view.DataSource = dt sda.Fill(dt)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

show_view.DataSource = dt If m.Msg = &H84 Then


End If Dim pos As Point = New
End Sub Point(m.LParam.ToInt32())
pos = Me.PointToClient(pos)
Private Sub backBtn_Click(sender As Object,
e As EventArgs) Handles backBtn.Click If pos.Y < cCaption Then
main_form.Show() m.Result = CType(2, IntPtr)
Me.Hide() Return
End Sub End If

Private Sub maxminBtn_Click(sender As If pos.X >= Me.ClientSize.Width - cGrip


Object, e As EventArgs) Handles AndAlso pos.Y >= Me.ClientSize.Height - cGrip
maxminBtn.Click Then
If WindowState = m.Result = CType(17, IntPtr)
FormWindowState.Normal Then Return
WindowState = End If
FormWindowState.Maximized End If
Else
WindowState = MyBase.WndProc(m)
FormWindowState.Normal
Me.Width = 952 End Sub
Me.Height = 590 Private Sub Panel_Drag_MouseMove(sender
End If As Object, e As MouseEventArgs) Handles
End Sub Panel_Drag.MouseMove
Static lpos As Point
Private Sub minBtn_Click(sender As Object, e If e.Button =
As EventArgs) Handles minBtn.Click Windows.Forms.MouseButtons.Left Then
WindowState = 'move form
FormWindowState.Minimized Me.Location += New Size(e.X - lpos.X,
End Sub e.Y - lpos.Y)
Else
Private Sub Form_Paint(sender As Object, e lpos = e.Location
As System.Windows.Forms.PaintEventArgs) End If
Handles Me.Paint End Sub
ControlPaint.DrawBorder(e.Graphics,
Me.ClientRectangle, Color.FromArgb(169, 93, Private Sub year_s_TextChanged(sender As
36), ButtonBorderStyle.Solid) Object, e As EventArgs) Handles
End Sub searchBox.TextChanged
Private Const cGrip = 16 Dim query As String = "SELECT * FROM
Private Const cCaption = 32 history_transacts WHERE Date_Issued LIKE
Protected Overrides Sub WndProc(ByRef m '%" & searchBox.Text & "%'"
As Message)
Using con As SqlConnection = New
SqlConnection("Data Source=DESKTOP-
NFHHL86\SQLEXPRESS;Initial
Catalog=My_Database;Integrated Security=True")
Using cmd As SqlCommand = New
SqlCommand(query, con)
Using da As SqlDataAdapter = New
SqlDataAdapter()
da.SelectCommand = cmd
Using dt As New DataTable()
da.Fill(dt)
If dt.Rows.Count > 0 Then
show_view.DataSource = dt
Else
MessageBox.Show("No Year
Found.", "Information", MessageBoxButtons.OK,
MessageBoxIcon.Question)
POLYTECHNIC UNIVERSITY OF THE PHILIPPINES

End If
End Using
End Using
End Using
End Using
End Sub
Private Sub searchBox_KeyPress(sender As
Object, e As KeyPressEventArgs) Handles
searchBox.KeyPress
If Char.IsLetter(e.KeyChar) And Not
e.KeyChar = "." Then
e.Handled = True
MessageBox.Show("Invalid Input.",
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning)
End If

If Char.IsPunctuation(e.KeyChar) Then
e.Handled = True
MessageBox.Show("Invalid Input.",
"Information", MessageBoxButtons.OK,
MessageBoxIcon.Warning)
End If

If searchBox.Text.Length >= 4 Then


e.Handled = True
End If
If e.KeyChar = Chr(8) Then
e.Handled = False
End If
End Sub
End Class

You might also like