Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 92

A Prison Management System with Radio Frequency Identification

(RFID) Security for Inmates’ Visitors

A Capstone Project Presented to The Faculty of the


Information Technology Division
La Concepcion College

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

By:

Marvin Balingbing
Bryan Kenneth Balitos
Charles Leonard Ong
Marriz Palcat
John Christian Romasanta

March 2020
ii

CERTIFICATION OF ORIGINALITY

We hereby certify that this thesis is our own and work and that to the best of our knowledge
and belief, it contains no material previously written or published by another person or organization
nor any material which has been accepted for award of any other degree or diploma from a university
or institution of higher learning, except where due acknowledgement is made thereof.
Furthermore, we declare that the intellectual content of this thesis is the product of our work
although we have received assistance from others on the manner of organization, presentation,
language and style.

Balingbing, Marvin
Balitos, Bryan
Ong, Charles Leonard
Palcat, Marriz
Romasanta, John Christian

Attested by:
VIKTOR ANGELO R. DIMALANTA
Adviser

Date: March 14, 2020

APPROVAL SHEET
iii

This thesis entitled, A Prison Management System with Radio Frequency Identification(RFID)
Security for Inmate Visitors prepared and submitted by Group 3 in partial fulfillment of the
requirements for the Degree, Bachelor of Science In Information Systems has examined and
recommended for Oral Examination.

Evaluation Committee

VIKTOR ANGELO R. DIMALANTA, MSIT

Adviser

MARY ROSE COLUMBRES MA. LOURDES ELEAZAR

Chair Member

GLENN P. SALADERO

Member

APPROVAL

Approved by the Panel on Oral Examination on March 14, 2020 with the grade of ________.

MARY ROSE COLUMBRES MA. LOURDES ELEAZAR

Chair Member

GLENN P. SALADERO

Member

Accepted as a partial fulfillment of the requirements for the Degree,

Bachelor of Science in Information Systems


iv

ACKNOWLEDGEMENTS

Special people who cared enough to extend help had made this research possible. The

researchers are expressing the most profound appreciation and sincerest gratitude to the

following that helped and contributed much to the realization of this research work:

MR. VIKTOR ANGELO DIMALANTA, Thesis adviser, for his support, genuine,

concern and unselfish efforts extended to the researchers, not just in this undertaking but all

throughout the study.

MR. GLENN SALADERO, member, Panel of Examiners, for his genuine concern and

unremitting support which inspired the researchers to complete the study.

MS. MA. LOURDES ELEAZAR, member, Panel of Examiners, for sharing her

expertise in the field of research, which contributed immensely in the enrichment of the study.

MS. MARY ROSE COLUMBRES, chairperson, Panel of Examiners, for the

constructive that had improved the contents of this study.

Above all, to the ALMIGHTY GOD, for his loving, kindness, making all things

possible.
v

March 02, 2020

Rochelle Salazar
Communication Arts Division
3rd Campus, La Concepcion College

Subject: Request to Edit and Proofread Pre-Oral Research Manuscript Chapters 1,2 and 3

Dear Ma’am,

We, the researchers from the IT/IS Division, are conducting a study entitled “A Prison Management
System with Radio Frequency Identification (RFID) Security for Inmate Visitors”. As part of
their requirement, we are tasked to consult a grammarian to edit and proofread our research
manuscript.

In this regard, we would like to seek your expertise to improve our paper by way of checking for

grammatical errors and formatting.

Sincerely yours,

Marvin Balingbing
Bryan Kenneth Balitos
Charles Leonard Ong
Marriz Palcat
John Christian Romasanta

Noted: Conformed:

Luis V. Santiago Rochelle Salazar


OIC Grammarian
IT/IS Division Communication Arts Division
vi

ABSTRACT

Title : A Prison Management System with Radio Frequency

Identification (RFID) Security for Inmates Visitors

Researchers : Marvin Balingbing

Bryan Kenneth Balitos

Charles Leonard Ong

Marriz Palcat

John Christian Romasanta

Degree : Bachelor of Science in Information Systems

Institution : La Concepcion College Inc.

Year : 2020

Adviser : Viktor Angelo R Dimalanta, MSIT

The study aims to develop an automated prison management system for the Jail that provides

information of inmates and visitors. To determine the significance, learn ability, data were gathered

through interviews, surveys and questionnaire forms. The respondents or client were the employees

and visitors. Gathered data were analyzed and improved in order to understand easily the procedure of

prison management with RFID security for inmate visitors.

The Prison Management System with RFID Security for Inmate Visitor aims to help the

visitors for security purposes and to provide reliable information for the visitors, and handle visitor’s

information.

Researches methods are generalized and established ways of approaching research question

and used to collect and analyze the data required to address the research questions and to test the

hypothesized relationship develop in the study.


vii

TABLE OF CONTENTS

Page

COPYRIGHT PAGE i

TITLE PAGE ii

APPROVAL SHEET iii

ACKNOWLEDGEMENT iv

CERTIFICATION OF EDITING v

ABSTRACT vi

TABLE OF CONTENTS vii

CHAPTER 1

THE PROBLEM AND ITS SETTING

Introduction 11

Background of the Study 12

Theoretical Framework 12

Conceptual Framework 13

Statement of the Problem 14

Scope and Limitations 15

Significance of the Study 16

Definition of Terms 17

CHAPTER 2

REVIEW OF RELATED LITERATURE

Emerging Problems Related in RFID Security 18

Introduction to Prison and Prison Management System 19

Future Trends in RFID 29

Synthesis about Reviewed Literature and Studies 20


CHAPTER 3

RESEARCH METHODOLOGY

Research Design 21

Source of Data

21

Sampling Techniques 22

Research Instrument 22

Statistical Tool 23

Data Generation Procedure 23

Ethical Considerations 23

Data Case Analysis 24

System Development 25

System Architecture 26

Process Flow Diagram 27

CHAPTER 4

PRESENTATION, ANALYSIS AND INTERPRETATION OF DATA


How Useful is to a Radio Frequency Identification (RFID) Security

for Inmate Visitors 28

How’s your satisfaction in using the develop system in terms of security 29

Level of Acceptance 30

How will you rate the efficiency of the system 31

CHAPTR 5

SUMMARY, CONCLUSION AND RECOMMENDATION

Summary 33

Conclusion 34
9

Recommendations 34

Appendix 1 Survey Questionnaire 35

Appendix 2 User Manual/ Screenshots of System 36

Appendix 3 Biographical Statement 89

Appendix 4 References 91

LIST OF FIGURES

Figure 1: Conceptual Framework 12

Figure 2: System Development Life Cycle 24

Figure 3: System Architecture 25

Figure 4: Data Flow Diagram level 0 26

Figure 5: Data Flow Diagram level 2 26

Figure 6: How Useful a Radio Frequency Identification (RFID) Security 28

Figure 7: Satisfaction in using the develop system in terms of security 29

Figure 8: The Respondents in terms of Accuracy 30

Figure 9: Rate of the efficiency of the system 31

Figure 10: Home Page 36

Figure 11: Log In 36

Figure 12: Administration Log In 37

Figure 13: User Log In 37

Figure 14: Admin Panel 38

Figure 15: Add User 38

Figure 16: Update Administration 39

Figure 17: Add Jail Guard 39


10

Figure 18: Logout 40

Figure 19: Data Entry 40

Figure 20: Transaction 41

Figure 21: Summary of Inmates 41

Figure 22: Reports 42

Figure 23: Statistics 42

Figure 24: Visitor Registration 43

Figure 25: Visitor Log In 43

Figure 26: Visitor List 44

Figure 27: Visitor Statistics 44

LIST OF TABLES

Table 1: Average Weighted Mean How Useful to have a Radio Frequency Identification (RFID)
Security for Inmate Visitors 27

Table 2: Average Weighted Mean How’s your satisfaction in using the develop system in terms of
security 28

Table 3: Level of Acceptance Average Interpretation 29

Table 4: Average Weighted Mean how will you rate the efficiency of the system 30
11

CHAPTER 1

The Problem and It’s Background

Introduction

Nowadays, people are living in an information age department upon digital information.
Digital information is electronic information, the result of computer processing. Every type of job
relies upon getting information from others. Computers offer the efficient processing and information
storage. Technology is innovating year after year. When you look around your city or even your
house, there is a technology. Technology is everywhere. The high demand in technology results in
programs that are in need to be developed or innovated. Technology can help your business grow and
wither.

Technology has important roles in community. It affects the culture, efficiency and
relationships of a community. Both tangible and intangible benefits will help you to make the security
and produce the result of visitor demand. It has an ability to have some good relationship between the
companies and visitors.

Prison Management System is an automated system. It is a secure system to modernize record


maintenance which facilities electronic processing and the management of such activity and to provide
higher level on compliance and faster service with lower cost and high efficiency. It enhances the
transparent implementation and management of inmate data.

The use of radio frequency identification as an effective means of security information has
expanded the security services. Technology is growing rapidly across many different industries. In
security services that track the movements of chip through a network of radio-enabled scanning
devices. An integrated circuit for modulating and demodulating radio signals and perform other
functions. An antenna for receiving and transmitting the signal.

The project will help to organize the process of storing information. It will keep the
Administration more content and will make the people happier. It will help the employees to
minimize time in retrieving data information regarding the inmates and visitors.
12

Background of the Study

There are common errors in using manual process and these are the four (4) most common
security problems of the inmate and visitor: Loss of records, don’t have accurate information, no
security. The proliferation of contrabands in jail facilities is a perennial problem that the Bureau of Jail
Management and Penology is confronting since its inception. Contrabands in the hands of inmates
jeopardize jail security and hamper rehabilitation programs.

These problems can be resolve using the right management system, which investigate the
visitor’s information and assure that the information was managed correctly. Selecting management
system can be difficult especially with regards to the various features that systems provide. There are
things to consider in deciding the accurate management system that is appropriate to the visitors need
and specifications and most importantly, the system must provide accurate information for the inmates
and visitors.

The proposed project is A Prison Management System with Radio Frequency Identification
(RFID) Security for Inmate Visitors that aims to help the employees regarding the process of
managing, checking, generating reports and recording of inmates and visitors files in less time
consuming and to provide better service in generating security and identify of the inmate’s visitors.

Theoretical Framework

Theory of Prison Management

Traditionally, the organizational effectiveness of prisons has been seen in terms of control,
rather than rehabilitation of inmates. Consequently, control-oriented organizational models have been
presumed to be the most effective. Historical and contemporary prison management models are
discussed. It is suggested that control-oriented models have had an inhibitory effect on the
performance of other organizational goals of prison, notably those rehabilitation and treatment.
Implications of control-oriented organizational models for the management of personnel working in
the prison are examined as are the potential impacts of such models on the delivery of rehabilitation
services by private-sector providers.
13

Theory of RFID Security

The development of this technology was immediately followed by the implementation of RFID
technology in various business fields. RFID technology increase efficiency and accuracy in carrying
out daily activities, especially in the business field. On the other hand the implementation of RFID
technology which has recently been applied for the security of the inmate and visitors to prevent some
security problems.

Conceptual Framework

The conceptual framework used in this study is the Input- Process Output model. In the IPO
model, a process is viewed as a series of boxes (the process elements) connected to its inputs and
outputs elements. Information of material objects flow through a series of activities based on the
required set of rules. Process diagrams are often used to represent the process flow, what goes in the
input; what causes or changes in the process; and what comes out in the output.

The IPO provides the general guide and structure for the direction of study.

INPUT PROCESS OUTPUT

 Information Gathering  Checking Information


 Software Designing the Graphical
Visual Basic User Interface  To fully developed
 System Encoding Prison Management
 Hardware
System with RFID for
Admin  Testing Implementation
Inmates Visitors
Server Maintenance
 Database
SQL

FEEDBACK

Figure 1. Conceptual Framework


14

Figure 2 shows the Input, Process and Output. The proponents used analytical tool to make
conceptual distinctions and organized idea.

Input

Data gathering and all other hardware devices such as the PC or personal computer and its
components, and the software were used in developing the system. Visual Studio was used as general-
purpose programming language and XAMPP, for open- source cross platform web server solution
stack package. Microsoft Word was utilized for the documentation and Microsoft Visio, for the
creation professional diagrams and flowchart.

Process

The process composed of designing the Graphical User Interface (GUI) and developing, testing
the system to make sure that the product is actually solved and the researchers may interact to find the
bud and glitch, implementation and maintaining the system and fix bugs if something appears.

Output

The output is a fully developed Prison Management System with RFID Security for Inmate
visitor.

Feedback

A feedback about the elements or phases of the conceptual framework was also done.

Statement of the Problem

With the use of a prison management system with RFID security for inmate’s visitors, the
company will be able to overcome the numerous disadvantages and limits of the manual process and
enhance the capability to monitor the inmate visitors that help make prison management with RFID
security effective.

Time consumption

Retrieving records from the logbook and/or places file can take some time.
15

Accuracy

Written records can be inaccurate at times and can cause errors when retrieving data. Such
errors are caused by handwriting, misspelling and falsification of data.

Safety and Security

Physical records can be unsafe because they can degrade overtime. And there is no back-up for
the lost information.

Efficiency

Finding the right folder might take several minutes, in some cases, records are disorganized
which affects management of files.

Therefore, researchers proposed A Prison Management System with RFID Security for Inmate
Visitors in order to minimize the workload compared to the utilization of the manual prison
management systems for inmate visitor that the Jail is using.

Scope and Limitations

Scope

The proponents of the offline-based system can access and manage the inmates, visitors etc. It
lessens the workload of the employees.

Specifically,

Radio Frequency Identification (RFID)

`The system will contain tracking information or having a unique identification code. This
feature is one of the best features because of the security of inmates to their visitors.

Information Management

The process of information must be accurate and must be distribute to the visitors both inside
and outside. The area must work with agility. The information or data of the visitor is organized and
can easily retrieve by the admin. Time and effort will be saved if the information is managed correctly.
16

Report Generation

The Admin can print the reports such as the master list of Inmates in each jail. Reports are
compiled for the current and future decision making by the company.

Limitations

 It is LAN based only which means it cannot be accessed online.

General Objectives

This study aims to proposed system to provide quick processing of data, minimize manual
checking of inmate visitors record, monitor previous inmate visitor’s data and generate essential
reports that will ensure convenience, preciseness, faster and easier manipulation and access of data to
give a higher quality of management.

Specific Objectives

 To develop a system that will help improve the security of visitors and prison management
system.
 To monitor the security of the visitors.
 To save and store inmate and visitors record for easier management and security.
 To provide a summary of the inmate visitors and inmate.

Significance of the Study

The study is deemed beneficial to the following:

Administration

For they don’t need to hire programmers to work on their system and it will lead abating the
Jail expenses.

Visitors

It easier for them to keep track of their records and be satisfied with the accuracy of the
information for them productive and efficient
17

Researchers

For them to have springboard for further studies.

Definition of Terms

The following terminologies are carefully chosen according to its content and define as follow;

Admin refers to someone who can make changes on a computer that will affect other users of the
computer.

Computer refers to electronic device that performs processes, calculates and operates based on
instructions provided by software. It has the ability to store, retrieve, and process data.

Database refers to pertains to a collection of records or information which is stored in a computer in a


systematic way, so that a computer program can consult it to answer questions.

Information refers to facts provided or learned about something or someone. In computing, it is the
processed data stored or transmitted by a computer.

Intangible refers to unable to be touched or grasped; not having physical presence. It is difficult or
impossible to define or understand; vague and abstract.

Multi-user refers by more than one user.

Prison refers to building which people are legally held as punishment for a crime they have committed
or while awaiting trial.

Survey refers to technique to ask questions to people to gather information through a questionnaire. It
also used to ask questions to the company about their problem. And in order to provide a solution to
their problem of the researcher.

System refers to set of connected things or parts forming a complex whole, in particular. In
computing, it is a group of related hardware units or programs or both, especially when dedicated to a
single application.

Tangible refers to these are things that can be touched or grasped. It means clear and definite; or real.
In computers, examples of tangible parts are the monitors, keyboards, mouse, speakers and many
more.
18

Technology refers to purposeful application of knowledge, skills and experiences in using resources
to create products or system to meet human needs.

CHAPTER 2

REVIEW OF RELATED LITERATURE

This chapter presents the synthesis of related literature and studies of different researchers and
philosophical aspects both local and foreign.

Emerging Problems Related in RFID Security

They all have to visit the inmate for the ubiquitous services. But what are the common causes
of the problem with using RFID as a security. According to Thamilarasu and Sridhar, there are four
(4) most common RFID problems encountered by the visitors.

First is Reverse Engineering like most products, RFID tags and readers can be reverse
engineered; however, it would take a lot of knowledge about the protocols and features to be
successful. Hackers would take a part of chips in order to find out how it works in order to receive the
data from IC.

A Denial of Service attack is the broad concept of an RFID security failure that is associated
with an attack. These attacks are usually physical attacks like jamming the system with noise
interference, blocking radio signals, or even removing or disabling RFID tags.

Technically two specific events, cloning and spoofing are usually done back to back. Cloning
is duplicating data from a pre- existing tag while spooning is then using the cloned tag to gain access
to a secured area. The hacker has to know the data on the tag to clone it, this type of attack is mainly
seen in access or assets management operation.

In RFID card, there are some people not afford to buy the RFID card because of the lack of the
capacity to produced of money. There’s a little possibility that the RFID will be convenient to the
visitor to use the RFID card.
19

Introduction to Prison and Prison Management System

As stated by Hutcherson D. and Hauner A., (2016). “Prison is the main interaction between
visitor and inmate.” In Hutcherson the dynamics of an inmate social with their corresponding policy
implication for prison management. These deprivations consist the pain of imprisonments and strip of
inmates of their personal self worth. Hauner said given the inherent prison conditions, inmates develop
a variety of coping mechanisms to recover their sense of problem-solving nature.

According to Bello Z. (2015) prison management gives information to the while prisoners, it is
the collection of register cases for each prisoner entering the prison for automated release diary
generator. A good prison management should be automated, because it enhances the administrative
and experience to design, develop and implement a prison management system for prison defense and
security.

In spite of the benefits of the use of the computer to provide timely and accurate information,
which is absent in most prison, it is not problem arises as how computer can be utilize that is
programmed to achieve desire result. The prison is a very large yard where prisoners, warders and
other prisons staff reside.

According to Olunsanya and Ogoba O., of Bells University of Technology (2015) prison staffs
like any other human will always latest technology in the field so as to reduce stress encountered in
their fields.

Future Trends

Identifying the trends can helps the jail provide good quality in visitors, inmate and also
provide accurate process in the minimum possible time. Trends may help the jail to have a strategy
and it helps the jail to know the visitor’s needs.

In the review of Aziz, there were 3 emerging RFID trends namely.

1. Innovative Manufacturing will create durable and versatile tags.

Advancements in printed electronics have helped create new extremely thin, flexible FID tags
that can now be combined with printed sensors, printed batteries, thin-film photovoltaic solar cells,
and other technologies. With new electronic printing and conductive ink technologies, companies
could conceivably print their own chip less RFID tags on site.
20

2. New Antenna design could increase range.

The key to good tag performance is the antenna design. It’s the antenna that helps determine
where and how a tag can be used, and how it will perform. Over the few years, expect to see new
antennas and in lays as the competition for RFID antenna design heats up.

3. Increased memory will create smart tags

Building intelligence into the tags and by extension. The assets being tags is another key
activity. Expect tags with more memory at a lower cost to enable these “smart assets” applications.
High value assets will be an early application for this technology, as the cost of those assets will make
it easier to amortize the increased cost of the more robust tags.

Synthesis about Reviewed Literature and Studies

Nowadays technology changes people life. People could easily participate in some activities
and they believe that technology has some negative impact or social relationship. Currently, people are
able to perform certain things with ease and faster than before.

According to Ofgem (2015) Prison System a place for the confinement and punishment of
persons convicted of crimes, especially felonies. A state or condition of confinement or restriction.
Any place of confinement or seeming confinement. To confine in or as if in a prison.

According to Biller E., (2016) for a time it seemed that radio frequency identification
technology would be relegated to its well-known roles including retail theft prevention and using
implanted chips. Smart tags help digital productivity due to their task automation potential.

With the help of the past studies that were made regarding prison management system, the
proponents came up an idea of having a prison management system with RFID security that will have
a security for the visitors. The jail guard of each jail will also benefit from the proposed system
because it will lessen the workload and will help them become more productive.
21

CHAPTER 3

RESEARCH METHODOLOGY

This chapter presents the method of the research, population, sample size, sampling technique,
description of respondents, and data gathering procedures

Research Design

There are different methods in conducting a research. It is a strategy that describes how the
proponents approach the investigation for the research. The proponents presented an overview of the
means used to undertake the thesis research. Proponents use research methodology. First, the
proponents conduct in a location or a situation where the project is fit for investigation. The
proponents need this project to be undertaken in a big company. The second is a point in time or in
what period will research take place. Third is when the proponents choose which individuals, groups
or events they will examine. In this case, the proponents must consider the employee, respondents and
the company. The last is how the proponents should take the approach research and determine the
methods to use and analyze the data. This question is often harder to answer.

The proponents need to consider the amount of time in conducting the research. There are
different ideas and techniques that may be used. The proponents used survey questionnaire and
interview method in conducting the study. In survey method, the proponents described the responses
given by the respondents.

The questionnaire must be clear and easy to comprehend so that the respondents can
understand well. The interview will act as a follow-up on the procedures and rules of the company. In
this study, the proponents will develop a Prison Management System with RFID Security for Inmates
Visitors that will help both jail guard of the Jail and the visitors.

Sources of Data

Data gathering will be done through primary and secondary sources. Primary sources of data will
include the employees of the City Jail specifically the one who knows the process of visiting the
inmates, and the admin. Visitor of the City Jail will also be included as primary data source for they
are one of the possible users of the system.
22

Secondary sources of data will mainly consists of published files, technical documents, and,
reliable sources and forums focusing on the problems related to security of inmates visitors and the
suggested ways to solve those problems.

Secondary sources of data will help to cross-check the official information, learn about the
technical details, and past technologies concerning inmates’ visitors.

Sampling Techniques

Purposive Sampling

It is a non-probability sample that is selected based on characteristics of a population and the


objective of the study. Another term is a sampling technique in which researchers on his or her own
judgment when choosing member of population to participate in the study.

Research Instrument

The research instrument that will be used in this study is the survey questionnaire and
interview. It will be utilized for data collection and forgathering responses from the respondents or
research informants on the developed system.

The survey and interview instruments will help the proponents ingathering the information.

Interview. The proponents will use an interview questionnaire to gather information that will
solve the current problem of the company, investigate the problem and formulate a solution. The
interview will enable the proponents to gain valuable insight and an in-depth explanation about the
problem. This is an interaction in which oral questions will be posed by the interviewer to elicit oral
response from the interviewee. The proponents will use focus interview. It will focus on the
respondents’ subjective responses and experiences on the subject matter to elicit more information.

Questionnaire/Survey. It is data collection instrument most used in normative surveys. It is a


list of written questions related to the study intended for submission of a number of respondents. It
aims to acquire strong answers and opinions of the respondents towards the proposed study. It is
systematically prepared document or form with a set of questions deliberately designed to elicit
responses from respondents or research informally for the purpose of collecting data.

In preparing the questionnaire, proponents will do library search, talk to knowledgeable


people, master guidelines, write, edit, pretest the questionnaire. All directions will be made using clear
23

correct grammar, questions make all unequivocal, and biased questions, objectify the respondents,
relate all questions will be relevant to the topic under study with categories for approximate answer
and questions that avoid disclosure of embarrassing information. The proponents will also explain
difficult questions, state all questions affirmatively and make the respondents.

Statistical Tools

This research will apply the frequency of visitors and employee, to present the demographic
profile of the respondents. The formula is;

% = f/N x 100

Data Gathering Procedure

The study required the proponents to undergo some methods of research in a way that will be
effective in developing the system. The proponents will consider the objectives to be able to determine
the best method to be used in this research that aims to solve a specific problem.

The methods that the proponents will use in gathering and collecting information are survey
questionnaire and interview through possible clients or users. The respondents of the study are the
visitors of the inmates and the employees of the City Jail.

The proponents will distribute survey questionnaires within the city jail premises and to the
visitors to gather the data needed for the study. Once accomplished, the proponents will analyze and
interpret the data gathered. They will have a follow-up interview on the procedures and rules of the
company. The interview is expected to enlighten the proponents on how things should be done.

Ethical Considerations

The proponents will ask permission from the respondents by informing them that they will be
part of the study and must be give their ideas or opinions that can help to accomplish the study.

The proponents should take the responsibility to protect the respondents from any which might
cause them physical discomfort, emotional stress, humiliation, embarrassment or any other situation
that puts the respondent or participant at a disadvantage.
24

The proponents will take Republic Act no. 10173 in consideration as “An act protecting
individual personal information in information and communications systems in the government and
the private sector, creating for this purpose a national privacy commission, and for other purposes.”
Section 2 (Declaration of Policy- it is a policy of the state to protect the fundamental human right of
privacy, of communication while ensuring free flow of information to promote innovation and growth.
The state recognizes the vital role of information and communications technology in nation-building
and its inherent obligation to ensure that personal information in information and communications
systems in the government and in the private sector are secured and protected). And Section 3
(Information and Communications System refers to a system for generating, sending, receiving,
storing or otherwise processing electronic data messages or electronic documents and includes the
computer system or other similar device by or which data is recorded, transmitted or stored and any
procedure related to the recording, transmission or storage of electronic data, electronic message, or
electronic document.) it says that the participants have the rights to file a case to the proponent if ever
the proponent violated any rights of the participant in their agreement.

Data Case Analysis

Case study brings the proponents to understand a complex issue or an object and can add
strength to what is already known through previous research. It emphasizes detailed contextual
analysis of a limited number of events or conditions and their relationships. Proponents follow the six
(6) steps in case study research.

Determining and Defining the Research Questions. The proponents focuses on the study by
forming questions about the situation or problem to be studied and determining the objectives of the
study.

Selecting the Cases and Determining Data Gathering and Analysis Techniques. The
proponents will determine what approach to be used in selecting single or multiple real-life cases in
examining an in-depth and which instruments and data gathering approach to use. The proponents will
determine whether to study cases which are unique in some way.

Preparing to collect data. Case study research generates amount of data from multiple
sources. The proponents prepare databases to assist with categorizing, sorting, storing, and retrieving
data for analysis.
25

Collecting Data in the Field. The proponents must collect and store multiple sources of
evidence comprehensive and systematically. The proponents will carefully observe the object of the
case study and identify causal factors associated with the observed phenomenon.

Evaluating and Analyzing the Data. The proponents will examine the raw data using
interpretations in order to find linkages between the research object and the outcomes with the
reference to the originals research questions.

Preparing the Report. Exemplary case studies report the data in a way that transforms a
complex issue into one that can be understood, allowing the reader to question and examine the study
and gain an understanding independent of the proponents. Proponents pay attention in displaying
enough evidence to give the reader confidence that all avenues have been explored, clearly
communicating the boundaries of the case, and giving special attention to conflicting propositions.

System Development

The proponents used Rapid Application Development (RAD) as the System Development Life
Cycle (SDLC). It is based on prototyping and iterative development with no specific planning
involved. With Rapid Application Development, the proponents are able to reduce the planning time,
and emphasize the prototype iterations to accurately measure progress and communicate in real time
on changes and other issues. This results to greater efficiency, faster development, and effective
communication.

Figure 2: System Development Life Cycle

Planning Requirements. This is the first phase of Rapid Application Development. In this
phase, the proponents will define the problem, gather necessary information and analyze the
requirements needed for the project.
26

User Design. In this phase, the developer designs the prototype. The proponents to meet the
needs of the company.

Rapid Construction. In this phase, the prototypes will be taken from the design phase and
convert into working model. This phase is important because the client gives input throughout the
process and can suggest alterations, changes, or even new ideas that can help solve problems as they
arise.

Cutover. This is the last phase where the finished system will be implemented. It includes data
conversion, testing, and changeover to the new system, as well as user training.

System Architecture

The prison management with radio frequency identification security is an application that
focuses on the management of the inmate’s visitor. It also manages and organizes the procedures in
collecting the information records, encoding and checking the information of the visitors.

Figure 3: System Architecture

Figure 3, shows the process of the proposed system in Jail. The Jail Guard will get the visitor’s
Information to be verified. The Admin will encode.
27

Process Flow Diagram

Figure 4: Data Flow Diagram level 0

Figure 4 shows two processes, one external entity and one data store. Prison Management
System process is shown in the context of data flow diagram. Based on the diagram the visitors require
giving a personal detail. Data store gives information to the visitors. The visitor needs to have a RFID
card. Then proceeds data store and it confirms the visitor.

Figure 5: Data Flow Diagram level 2


28

Figure 5, shows the Admin Process Flow. The admin will log in to know the existing system,
followed by managing, checking and recording of information. It generates to the data store and
collects information and saves to database.

CHAPTER 4

Presentation, Analysis and Interpretation of Data

This chapter presents, analyze and interprets the gathered from 30 respondents, the user
and employee of BJMP City Jail of City of San Jose Del Monte Bulacan in determining the factors
affecting in the proposed system.

How Useful is to a Radio Frequency Identification (RFID) Security for Inmate Visitors

Table 1 In this table shows the number of respondents says that having a Radio Frequency
Identification (RFID) Security for Inmate Visitors is very useful, based on the average of weighted
mean which is have a total shows how they agree about the proposed system.

Respondents Weighted Mean Verbal Interpretation


Employees 4.6 Very Useful
Visitors 4.5 Very Useful
Average Weighted Mean 4.53 Very Useful

Table 1: Average Weighted Mean How Useful to have a Radio Frequency Identification (RFID)
Security for Inmate Visitors
29

Figure 6 is the graph of respondents agreed in the proposed system. As you can see, both
visitors and employee say that the proposed system is very useful.

Figure 6: How Useful a Radio Frequency Identification (RFID) Security for Inmate Visitors

How’s your satisfaction in using the develop system in terms of security

Table 2 shows the number of respondents in satisfaction in using the develop system in terms
of security. The overall weighted mean of satisfaction in using the develop system in terms of security
3.5. This means the respondents are “satisfied” using the develop system in terms of security.

Respondents Weighted Mean Verbal Interpretation


Employees 4.2 Very Satisfied
Visitors 4.1 Very Satisfied
Average Weighted Mean 4.57 Very Satisfied

Table 2: Average Weighted Mean How’s your satisfaction in using the develop system in terms
of security

Below is the Graph of Respondents in satisfaction in using the develop system in terms of
security. As you can see the respondents are satisfied in using the develop system in terms of security.
30

Figure 7: Satisfaction in using the develop system in terms of security

Level of Acceptance

Table 3 it shows the level of acceptance in terms of accuracy.

Respondents Weighted Mean Verbal Interpretation


Employees 3.6 Satisfied
Visitors 3.5 Satisfied
Average Weighted Mean 4.73 Satisfied

Table 3: Level of Acceptance Average Interpretation

Below is the graph in term of accuracy. It shows how respondents give an opinion in the
proposed system.
31

Figure 8: The Respondents in terms of Accuracy

Figure 8 show that the number of respondents says that the proposed Prison Management
System with Radio Frequency Identification (RFID) Security is accurate. There are 55% respondents
says that the proposed Prison Management System with Radio Frequency Identification (RFID)
Security is useful to the user.

How will you rate the efficiency of the system

Table 4 shows the number of the respondents of rate of the efficiency of the system, as you can
see the average weighted mean is

Respondents Weighted Mean Verbal Interpretation


Employees 3.2 Very Efficient
Visitors 3.1 Very Efficient
Average Weighted Mean 4.77 Very Efficient

Table 4: Average Weighted Mean how will you rate the efficiency of the system

Below is the graph of Respondents of rate of the efficiency of the system. It shows that the rate
is efficient for the respondents.
32

Figure 9: Rate of the efficiency of the system

Recommendations for the possible improvement of the developed system

The table shows the ranking for the possible recommendation for the improvement of
developed system. The rank 1 is the face recognition, followed by rank 2 which is the web based and
lastly the mobile application which is rank 3.

Recommendations Rank
Web Based 2
Mobile Application 3
Face Recognition 1

Table 5: The Ranking of recommendations for the possible improvement of the system

Below is the graph of Respondents of Recommendations for the possible improvement of the
developed system.

Figure 9: Rate for recommendations for the possible improvement of the developed system

CHAPTER 5

SUMMARY, CONCLUSION AND RECOMMENDATION


33

This chapter presents the summary findings; the conclusions made and the recommendations
offered.

Summary

Based on the data gathered, the proponents have come up with following findings:

1. The overall weighted mean of How Useful is to a Radio Frequency Identification (RFID) Security
for Inmate Visitors 4.53 and interpreted as “very useful”. According to the survey, there are, 76.67%
very useful to have Radio Frequency Identification (RFID) security and 16.66% useful to have Radio
Frequency Identification (RFID) security from different respondents.

2. Respondents of having a security in develop system had an average mean of 4.57”very satisfied”
and also interpreted as “very satisfied”. There are 30% respondents satisfied of having a security in
develop system. 70% satisfied in having a security in develop system,. It means out of 30 respondents
there are 21 respondents who are satisfied of having a security in develop system.

3. Level of acceptance of the respondents in terms of the proposed system. Accuracy = with the
average of 75% respondents says it very satisfied and 25% respondents says satisfied, the overall or
average of verbal interpretation is “very satisfied”.

4. How will you rate the efficiency of the system had an average weighted mean of 4.77 and
interpreted as “very efficient”, 60% in employee says that rate the efficiency of the system is efficient
to the visitors and 40% says it most efficient. In visitor, 60.57% says it very efficient, 39.43% most
efficient. In overall there are 56.67% says that it’s very efficient, 36.67% says it’s most efficient.

5. The Recommendations for possible improvement of the developed system got the highest rank is
“Face Recognition” of 21 respondents 2nd rank is “Web Based” of 5 respondents and 3rd is “Mobile
Application” of 4 respondents.

Conclusions

This study was conducted in BJMP City Jail of San Jose Del Monte with thirty respondents.
Survey and interview methods we use in the study. The proponents used a checklist-questionnaire
method to reveal the relationship of the variable. The special problem was conducted to determine the
factors regarding security of the inmate visitors.
34

After administering the questionnaire, the proponent used in weighted mean and rank to
determine the extent of the respondents in terms of regularly visiting the inmate, RFID Security for
Inmate Visitors and level of acceptance in terms of accuracy, efficiency and user-friendliness.

1. Based on the survey, the proposed system can help the respondents less hassle in terms of

2. Many of the respondents say that the RFID Security for Inmate Visitors is very useful. The process
of their visiting is very reliable to the inmates. The proposed systems help the visitors to use the RFID
card for the security purposes only.

3. The proposed system is useful for the respondents both employee and visitors. It was not difficult to
use for the employee because it was secured and easy to find the files of the inmate and visitors.

4. The proposed system is easy to learn, use and understand for the employee. Based on the
respondents the proposed system is very useful in terms of accuracy, efficiency and user-friendliness.
The proposed system is more important in our future to develop and to expand the thinking of people.

As you can see the conducting survey some of the respondents have a good feedback n the
proposed system it will be more helpful to check the security of the visitors and at the same time it can
help also the employee to do their task fast and less human error.

Recommendation

Some of the respondents give their suggestions that can help the system what to improve and
what can do to make the system more useful and helpful in the future.

1. Effective monitoring and reporting services.

2. Generate notification.

3. The RFID is convenience and reliable

Appendix 1

Survey Questionnaire

Name: ______________________________ Occupation_______________

Instruction: Please put a (√) mark on the box that describes your answer.

1. How useful is to have a Radio Frequency Identification (RFID) security for inmate visitors?
35

Very Useful Barely Useful

Useful Not Useful

Somewhat Useful

2. How’s your satisfaction in using the develop system in terms of security?

Very Satisfied Barely Satisfied

Satisfied Unsatisfied

Somewhat Satisfied

3. What was your level of acceptance in terms of accuracy?

Very Satisfied Barely Satisfied

Satisfied Unsatisfied

Somewhat Satisfied

4. How will you rate the efficiency of the system?

Very Efficient Less Efficient

Most Efficient Not Efficient

Efficient

5. What are your recommendations for the possible improvement of the developed system?

[ ] Web based

[ ] Mobile App

[ ] Face Recognition

[ ] Others...______________________

Appendix 2

User Manual/Screenshots of the System

Home Page

This is the first thing that the user and the admin will see whenever he/she access the system.
The home page includes the logo of the system. The user and admin can also manipulate the log In.
36

Figure 10: Home Page

Login Page

In this page, the user and admin can log in using his/her respective username and password in
order to access the system. The user and admin are categorized by Admin and Users.

Figure 11: Log In

Administration Log In

It shows the log in form of Administration.


37

Figure 12: Administration Log In

User Log In

It shows the log in form of User.

Figure 13: User log in

Admin Panel

These panel you will access all such as Jail guard and more. The admin includes adding some
user.
38

Figure 14: Admin Panel

Add User

These features you can create or add a user to have access to the system. These includes load,
save, update and delete to add another user.

Figure 15: Add


User

Update Administration

Figure 13 shows on how to update an admin user.


39

Figure 16: Add Admin

Add Jail Guard

In this page, the admin can also have an access on creating some jail guard account
information. The

Figure 17: Add Jail Guard

Logout

This figure shows how to logout and change another user accounts.
40

Figure 18: Logout

Data Entry

These features can create information of the inmates; just fill up all the information provided.
The data entry includes load, save, add new, update and delete.

Figure 19: Data Entry

Transaction

In this page, these features assign for verification of information that you entry in data entry,
after that you will finalized in what cell you will go to put the profile of the inmate. You will see the
41

whole details of the inmate such as started prison, in charge of jail guard, status of inmate, and having
a search engine for finding the inmate fast.

Figure 20: Transaction

Summary of Inmate

It shows the whole list and number of total of inmates.

Figure 21: Summary of Inmate

Reports

It shows the whole reports of the inmates, you can print, export as pdf, Microsoft word and
Microsoft access.
42

Figure 22: Reports

Statistics

This figure shows the statistics of how many days of imprisonment per case.

Figure 23: Statistics

Visitors Registration

In this part you will create an information of visitor in order to have a Radio Frequency
Identification card. These includes load, save, add new, update and delete.
43

Figure 24: Visitor Registration

Visitors Log In

In this part you will see the full details when you tap your Radio Frequency Identification card,
your time in and out, double shift only morning and noon.

Figure 25: Visitors Log In

Visitors List

It shows the whole list of visitors.


44

Figure 26: Visitor List

Visitor Statistics

It shows the age and gender of the visitors.

Figure 27: Visitor Statistics

Codes
Imports System.Data.OleDb
Imports System.IO
Module Module1
45

Public conn As OleDb.OleDbConnection = Myconnection()


Public cmd As New OleDb.OleDbCommand
Public sql, query As String
Public da As New OleDb.OleDbDataAdapter
Dim DbReader As OleDb.OleDbDataReader
Public dt As New DataTable
Public result As Integer
Public user As String
Public user1 As String
Public attempt As Integer = 0

Public Sub data(ByVal user As String)

Try

Dim maxrows As Integer


Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(user, conn)
Dim dtt As New DataTable
Dim ds As New DataSet

da.Fill(dtt)

maxrows = dtt.Rows.Count

If maxrows > 0 Then


MsgBox("Welcome! " & dtt.Rows(0).Item(1) & " " & dtt.Rows(0).Item(2))
mainform.MenuStrip1.Enabled = True
LogInForm.Close()
mainform.Show()
mainform.LOGOUTBTN.Show()
mainform.UpdateInfoToolStripMenuItem.Enabled = False
mainform.MainMenuStrip.Show()
mainform.lbladmin.Hide()
mainform.exitbtn.Hide()
mainform.USER.Show()
mainform.LOGINBTN.Hide()

Else
Dim warning As String = "Warning!" & vbNewLine & vbNewLine + _
"You have only 3 attempt, then after, the" + vbNewLine + _
"System will shutdown."

If (LogInForm.txtUsername.Text = "") And (LogInForm.txtPassword.Text = "") Then


attempt = attempt + 1
MsgBox("Please input username and password!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Exclamation, "Sorry! " & _
"Used attempt " & attempt)
ElseIf (LogInForm.txtUsername.Text = "") Then
attempt = attempt + 1
MsgBox("Please input your username!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Information, "Sorry! " & _
"Used attempt " & attempt)
ElseIf (LogInForm.txtPassword.Text = "") Then
attempt = attempt + 1
MsgBox("Please input password!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Information, "Sorry! " & _
"Used attempt " & attempt)

Else
attempt = attempt +
MsgBox("Oops! --> " & LogInForm.txtUsername.Text & "" + vbNewLine + vbNewLine + _
"The username or password you entered" + vbNewLine + _
46

"is not valid or the account is Deleted." + vbNewLine + _


"Please call an assistance or try again", MsgBoxStyle.Exclamation, "Invalid")

Dim strName = LogInForm.txtUsername.Text


Dim strPass = LogInForm.txtPassword.Text
End If
LogInForm.txtUsername.Focus()
LogInForm.txtUsername.Clear()
LogInForm.txtPassword.Clear()

End If
If attempt = 3 Then
MsgBox("Application is shutting down ...", MsgBoxStyle.Critical, "GoodBye!")
LogInForm.Close()
End If

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

End Sub

Public Sub data1(ByVal user1 As String)


Try

Dim maxrows As Integer


Dim da As OleDb.OleDbDataAdapter = New OleDb.OleDbDataAdapter(user1, conn)
Dim dtt As New DataTable
da.Fill(dtt)
maxrows = dtt.Rows.Count

If maxrows > 0 Then


MsgBox("Welcome! " & dtt.Rows(0).Item(1) & " " & dtt.Rows(0).Item(2))
mainform.MenuStrip1.Enabled = True
LogInForm.Close()
mainform.Show()
mainform.LOGOUTBTN.Show()
mainform.UpdateInfoToolStripMenuItem.Enabled = True
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.exitbtn.Hide()
mainform.LOGINBTN.Visible = False
mainform.USER.Hide()

Else
Dim warning As String = "Warning!" & vbNewLine & vbNewLine + _
"You have only 3 attempt, then after, the" + vbNewLine + _
"System will shutdown."

If (LogInForm.txtUsername1.Text = "") And (LogInForm.txtPassword1.Text = "") Then


attempt = attempt + 1
MsgBox("Please input username and password!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Exclamation, "Sorry! " & _
"Used attempt " & attempt)
ElseIf (LogInForm.txtUsername1.Text = "") Then
attempt = attempt + 1
MsgBox("Please input your username!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Information, "Sorry! " & _
"Used attempt " & attempt)
ElseIf (LogInForm.txtPassword1.Text = "") Then
attempt = attempt + 1
MsgBox("Please input password!" & vbNewLine & vbNewLine + _
warning, MsgBoxStyle.Information, "Sorry! " & _
"Used attempt " & attempt)
47

Else
attempt = attempt +
MsgBox("Oops! --> " & LogInForm.txtUsername1.Text & "" + vbNewLine + vbNewLine + _
"The username or password you entered" + vbNewLine + _
"is not valid or the account is Deleted." + vbNewLine + _
"Please call an assistance or try again", MsgBoxStyle.Exclamation, "Invalid")

Dim strName = LogInForm.txtUsername1.Text


Dim strPass = LogInForm.txtPassword1.Text
End If
LogInForm.txtUsername1.Focus()
LogInForm.txtUsername1.Clear()
LogInForm.txtPassword1.Clear()

End If
If attempt = 3 Then
MsgBox("Application is shutting down ...", MsgBoxStyle.Critical, "GoodBye!")
LogInForm.Close()
End If

Catch ex As Exception
MsgBox(ex.Message)

End Try

End Sub
Public Function Myconnection() As OleDb.OleDbConnection
Return New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\dbfinalsystemJMS.accdb")
End Function
End Module

Public Class AddingInmates


Dim myconnection As String = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\dbfinalsystemJMS.accdb")
Dim arrImage As Byte()

Shared Property DataSource As DataTable

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


Handles btnload.Click

dt = New DataTable
Try
sql = "SELECT * FROM tbladdinmates"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtglistvisitors.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try

End Sub
48

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


Handles btnsave.Click

Try

Dim mstream As New System.IO.MemoryStream


PictureBox1.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
arrImage = mstream.GetBuffer
Dim filesize As UInt32
filesize = mstream.Length
mstream.Close()
conn.ConnectionString = myconnection
conn.Open()

sql = "Insert Into


tbladdinmates(CASENUMBER,CASENAME,FULLNAME,DATEBIRTH,AGE,GENDER,ADDRESS,STATUS,studimg)" & _
"Values
(@CASENUMBER,@CASENAME,@FULLNAME,@DATEBIRTH,@AGE,@GENDER,@ADDRESS,@STATUS,@studimg)"

cmd.Connection = conn
cmd.CommandText = sql
cmd.Parameters.AddWithValue("@CASENUMBER", txtcaseno.Text)
cmd.Parameters.AddWithValue("@CASENAME", txtcasename.Text)
cmd.Parameters.AddWithValue("@FULLNAME", txtfullname.Text)
cmd.Parameters.AddWithValue("@DATEBIRTH", DateTimePicker1.Text)
cmd.Parameters.AddWithValue("@AGE", txtage.Text)
cmd.Parameters.AddWithValue("@GENDER", Label12.Text)
cmd.Parameters.AddWithValue("@ADDRESS", txtaddress.Text)
cmd.Parameters.AddWithValue("@STATUS", cmbstatus.Text)
cmd.Parameters.AddWithValue("@studimg", arrImage)

Dim R As Integer
R = cmd.ExecuteNonQuery
If R > 0 Then
conn.Close()
MsgBox("NEW INMATES HAS BEEN SAVED")
Call btninmload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
PictureBox1.Image = Nothing
Else
MsgBox("NO INMATES HAS BEEN SAVED")

End If
da.Dispose()
conn.Close()

Catch ex As Exception

For Each Item As Control In GroupBox1.Controls


If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If

Next
49

Finally
conn.Close()
End Try

End Sub

Private Sub radinmmale_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles radmale.CheckedChanged
If radmale.Checked = True Then
Label12.Text = "Male"

ElseIf radfemale.Checked = True Then


Label12.Text = "Female"
End If
End Sub

Private Sub radinmfemale_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles radfemale.CheckedChanged
If radfemale.Checked = True Then
Label12.Text = "Female"

ElseIf radmale.Checked = True Then


Label12.Text = "Male"
End If
End Sub

Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click

conn.Open()
Try

sql = "UPDATE tbladdinmates SET CASENUMBER='" & txtcaseno.Text & "',CASENAME='" &
txtcasename.Text & "',FULLNAME='" & txtfullname.Text & "', AGE='" & txtage.Text & "',GENDER='" &
Label12.Text & "',ADDRESS='" & txtaddress.Text & "',STATUS='" & cmbstatus.Text & "',DATEBIRTH='" &
DateTimePicker1.Text & "' WHERE ID=" & Me.Text

With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW INMATES HAS BEEN UPDATED!")
conn.Close()
Call btninmload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
PictureBox1.Image = Nothing
Else
MsgBox("NO INMATES HASS BEEN UPDATED!")
End If

Catch ex As Exception
50

For Each Item As Control In GroupBox1.Controls


If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If

Next

Finally
conn.Close()
End Try
End Sub

Private Sub dtglistinmates_DataSourceChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles dtglistvisitors.DataSourceChanged
dtglistvisitors.Columns("ID").Visible = False
End Sub
Private Sub dtglistinmates_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs)
Handles dtglistvisitors.DoubleClick
Me.Text = dtglistvisitors.CurrentRow.Cells("ID").Value.ToString
txtcaseno.Text = dtglistvisitors.CurrentRow.Cells("CASENUMBER").Value.ToString
txtcasename.Text = dtglistvisitors.CurrentRow.Cells("CASENAME").Value.ToString
txtfullname.Text = dtglistvisitors.CurrentRow.Cells("FULLNAME").Value.ToString
txtage.Text = dtglistvisitors.CurrentRow.Cells("AGE").Value.ToString
radmale.Checked = "Male" = dtglistvisitors.CurrentRow.Cells("GENDER").Value.ToString
radfemale.Checked = "Female" = dtglistvisitors.CurrentRow.Cells("GENDER").Value.ToString
txtaddress.Text = dtglistvisitors.CurrentRow.Cells("ADDRESS").Value.ToString
cmbstatus.Text = dtglistvisitors.CurrentRow.Cells("STATUS").Value.ToString
DateTimePicker1.Text = dtglistvisitors.CurrentRow.Cells("DATEBIRTH").Value.ToString
Dim arrImage As Byte()
arrImage = dtglistvisitors.CurrentRow.Cells("studimg").Value
Dim mstream As New System.IO.MemoryStream(arrImage)
PictureBox1.Image = Image.FromStream(mstream)

End Sub

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


Handles btndelete.Click

Try
sql = "Delete * FROM tbladdinmates where ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("INMATES RECORD HAS BEEN DELETED!")
conn.Close()
Call btninmload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
DateTimePicker1.Text = Nothing
PictureBox1.Image = Nothing
51

Else
MsgBox("NO INMATES RECORD HAS BEEN DELETED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If

Next

Finally
conn.Close()

End Try
End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles DateTimePicker1.ValueChanged
Dim d1, d2 As Date
Dim days, months, years As Long

d1 = DateTimePicker1.Value.ToShortDateString
d2 = Now.ToShortDateString

years = Year(d1)
months = Month(d2) - months
days = d1.Day

years = Year(d2) - years


months = Month(d2) - months
days = d2.Day - days

If Math.Sign(days) = -1 Then
days = 30 - Math.Abs(days)
months = months - 1

End If

If Math.Sign(months) = -1 Then
months = 12 = -Math.Abs(months)
years = years - 1
End If
txtage.Text = years.ToString
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click

OpenFileDialog1.Title = "Select to updload"


OpenFileDialog1.ShowDialog()

PictureBox1.ImageLocation = OpenFileDialog1.FileName.ToString
PictureBox1.Visible = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button2.Click
52

txtcaseno.Clear()
txtcasename.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
DateTimePicker1.Text = Nothing
PictureBox1.Image = Nothing
txtcaseno.Focus()
End Sub

Private Sub txtsearchname_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtsearchname.TextChanged
dt = New DataTable
Try
sql = "SELECT * FROM tbladdinmates where FULLNAME like '%" & txtsearchname.Text & "%'"
'If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

da.SelectCommand = cmd
da.Fill(dt)
dtglistvisitors.DataSource = dt

Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()

End Try
End Sub

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


Handles MyBase.Load
Me.TbladdinmatesTableAdapter.Fill(Me.DbfinalsystemJMSDataSet9.tbladdinmates)

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
mainform.USER.Hide()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
53

mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.LOGOUTBTN.Show()
mainform.USER.Show()
End If
End Sub
End Class

Public Class addjailguards

Private Sub btnload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnload.Click
dt = New DataTable
Try
sql = "SELECT * FROM tbladdjailguards"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtgjailguards.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try
End Sub

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnsave.Click

Try
sql = "INSERT INTO
tbladdjailguards(CONTACTNO,FULLNAME,ADDRESS,DATEOFBIRTH,AGE,GENDER,STATUS) VALUES ('" &
txtidno.Text & "','" & txtfullname.Text & "','" & txtaddress.Text & "','" & dtpdateofbirth.Text &
"','" & txtage.Text & "','" & Label8.Text & "','" & cmbstatus.Text & "')"

conn.Open()

With cmd
.CommandText = sql
.Connection = conn
End With
result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW JAIL GUARDS HAS BEEN SAVED!")
conn.Close()
Call btnload_Click(sender, e)
txtidno.Clear()
txtfullname.Clear()
dtpdateofbirth.Text = Nothing
txtaddress.Clear()
txtage.Clear()
radfemale.Checked = Nothing
radmale.Checked = Nothing
cmbstatus.Text = Nothing
Else
54

MsgBox("NO JAIL GUARDS HAS BEEN SAVED!")


End If
Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS!")
Exit Sub
End If
Next

Finally
conn.Close()
End Try

End Sub

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


Handles radmale.CheckedChanged
If radmale.Checked = True Then
Label8.Text = "Male"

ElseIf radfemale.Checked = True Then


Label8.Text = "Female"
End If
End Sub

Private Sub radfemale_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles radfemale.CheckedChanged
If radfemale.Checked = True Then
Label8.Text = "Female"

ElseIf radmale.Checked = True Then


Label8.Text = "Male"
End If
End Sub

Private Sub dtpdateofbirth_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles dtpdateofbirth.ValueChanged
Dim d1, d2 As Date
Dim days, months, years As Long

d1 = dtpdateofbirth.Value.ToShortDateString
d2 = Now.ToShortDateString

years = Year(d1)
months = Month(d2) - months
days = d1.Day

years = Year(d2) - years


months = Month(d2) - months
days = d2.Day - days

If Math.Sign(days) = -1 Then
days = 30 - Math.Abs(days)
months = months - 1

End If

If Math.Sign(months) = -1 Then
months = 12 = -Math.Abs(months)
years = years - 1
End If
txtage.Text = years.ToString
55

End Sub

Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click
Try
sql = "UPDATE tbladdjailguards SET CONTACTNO='" & txtidno.Text & "',FULLNAME='" &
txtfullname.Text & "',ADDRESS='" & txtaddress.Text & "',DATEOFBIRTH='" & dtpdateofbirth.Text &
"',AGE='" & txtage.Text & "',GENDER='" & Label8.Text & "',STATUS='" & cmbstatus.Text & "' WHERE
IDNUMBER=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW JAIL GUARDS HAS BEEN UPDATED!")
conn.Close()
Call btnload_Click(sender, e)
txtidno.Clear()
txtfullname.Clear()
txtaddress.Clear()
dtpdateofbirth.Text = Nothing
txtage.Clear()
radfemale.Checked = Nothing
radmale.Checked = Nothing
cmbstatus.Text = Nothing
Else
MsgBox("NO JAIL GUARDS HAS BEEN UPDATED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If
Next

Finally
conn.Close()

End Try
End Sub

Private Sub dtgjailguards_DataSourceChanged(ByVal sender As Object, ByVal e As


System.EventArgs)
dtgjailguards.Columns("IDNUMBER").Visible = False
End Sub

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


Handles dtgjailguards.DoubleClick
Me.Text = dtgjailguards.CurrentRow.Cells("IDNUMBER").Value.ToString
txtidno.Text = dtgjailguards.CurrentRow.Cells("CONTACTNO").Value.ToString
txtfullname.Text = dtgjailguards.CurrentRow.Cells("FULLNAME").Value.ToString
txtaddress.Text = dtgjailguards.CurrentRow.Cells("ADDRESS").Value.ToString
dtpdateofbirth.Text = dtgjailguards.CurrentRow.Cells("DATEOFBIRTH").Value.ToString
txtage.Text = dtgjailguards.CurrentRow.Cells("AGE").Value.ToString
radmale.Checked = "Male" = dtgjailguards.CurrentRow.Cells("GENDER").Value.ToString
radfemale.Checked = "Female" = dtgjailguards.CurrentRow.Cells("GENDER").Value.ToString
cmbstatus.Text = dtgjailguards.CurrentRow.Cells("STATUS").Value.ToString
End Sub
56

Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btndelete.Click
Try
sql = "Delete * FROM tbladdjailguards where IDNUMBER=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("JailGuards record has been deleted!")
conn.Close()
Call btnload_Click(sender, e)
txtidno.Clear()
txtfullname.Clear()
txtaddress.Clear()
dtpdateofbirth.Text = Nothing
txtage.Clear()
radfemale.Checked = Nothing
radmale.Checked = Nothing
cmbstatus.Text = Nothing
Else
MsgBox("JAIL GUARD RECORD HAS BEEN DELETED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If
Next

Finally
conn.Close()
End Try
End Sub

Private Sub btnaddnew_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnaddnew.Click
txtidno.Clear()
txtfullname.Clear()
txtaddress.Clear()
dtpdateofbirth.Text = Nothing
txtage.Clear()
radfemale.Checked = Nothing
radmale.Checked = Nothing
cmbstatus.Text = Nothing
txtfullname.Focus()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
57

mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.LOGOUTBTN.Show()
End If
End Sub

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


Handles MyBase.Load
mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub
End Class

Public Class Adduser

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnload.Click
dt = New DataTable
Try
sql = "SELECT * FROM tbluser"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtguser.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnsave.Click
Try
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS")
Exit Sub
End If

Next

sql = "INSERT INTO tbluser(fname,lname,username,p_password) VALUES ('" & txtfname.Text


& "','" & txtlname.Text & "','" & txtusername.Text & "','" & txtpassword.Text & "')"

conn.Open()

With cmd
58

.CommandText = sql
.Connection = conn
End With
result = cmd.ExecuteNonQuery

If result > 0 Then

MsgBox("NEW USER ACCOUNT HAS BEEN SAVED!")


conn.Close()
Call Button1_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()

Else
MsgBox("NO USER ACCOUNT HAS BEEN SAVED!")
End If
Catch ex As Exception

Finally
conn.Close()
End Try

End Sub

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click

Try
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If

Next

sql = "UPDATE tbluser SET fname='" & txtfname.Text & "',lname='" & txtlname.Text &
"',username='" & txtusername.Text & "',p_password='" & txtpassword.Text & "' WHERE ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW USER ACCOUNT HAS BEEN UPDATED!")
conn.Close()
Call Button1_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
Else
MsgBox("NO USER ACCOUNT HAS BEEN UPDATED!")
End If

Catch ex As Exception
MsgBox(ex.Message)

Finally
59

conn.Close()

End Try
End Sub

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


Handles dtguser.DoubleClick
Me.Text = dtguser.CurrentRow.Cells("ID").Value.ToString
txtfname.Text = dtguser.CurrentRow.Cells("fname").Value.ToString
txtlname.Text = dtguser.CurrentRow.Cells("lname").Value.ToString
txtusername.Text = dtguser.CurrentRow.Cells("username").Value.ToString
txtpassword.Text = dtguser.CurrentRow.Cells("p_password").Value.ToString
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button4.Click

Try
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If

Next
sql = "Delete * FROM tbluser where ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("User Account record has been deleted!")
conn.Close()
Call Button1_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
Else
MsgBox("NO USER ACCOUNT HAS BEEN DELETED!")
End If

Catch ex As Exception

Finally
conn.Close()
End Try
End Sub

Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btncreate.Click
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
txtfname.Focus()
End Sub
60

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles chkshowpassword.CheckedChanged

If chkshowpassword.Checked = True Then


txtpassword.UseSystemPasswordChar = False
ElseIf chkshowpassword.Checked = False Then
txtpassword.UseSystemPasswordChar = True
End If
End Sub
Private Sub Adduser_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles
MyBase.Load

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.LOGOUTBTN.Show()
End If
End Sub
End Class

Public Class InmatesReport

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


Handles MyBase.Load

Me.tbltransactioninmatesTableAdapter.Fill(Me.DataSetReportInmates.tbltransactioninmates)

Me.ReportViewer1.RefreshReport()

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub
61

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
End If
End Sub

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


Handles ReportViewer1.Load

End Sub
End Class

Public Class inmatesSummary

Public Sub FilterData(ByVal txtsearchname As String)

End Sub

Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)
If CheckBox1.Checked = True Then
CheckBox2.Checked = False
CheckBox3.Checked = False
CheckBox4.Checked = False
CheckBox5.Checked = False
End If

End Sub

Private Sub CheckBox2_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)
If CheckBox2.Checked = True Then
CheckBox1.Checked = False
CheckBox3.Checked = False
CheckBox4.Checked = False
CheckBox5.Checked = False
End If
End Sub

Private Sub CheckBox3_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)
62

If CheckBox3.Checked = True Then


CheckBox2.Checked = False
CheckBox1.Checked = False
CheckBox4.Checked = False
CheckBox5.Checked = False
End If
End Sub

Private Sub CheckBox4_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)
If CheckBox4.Checked = True Then
CheckBox2.Checked = False
CheckBox3.Checked = False
CheckBox1.Checked = False
CheckBox5.Checked = False
End If
End Sub

Private Sub CheckBox5_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs)
If CheckBox5.Checked = True Then
CheckBox2.Checked = False
CheckBox3.Checked = False
CheckBox4.Checked = False
CheckBox1.Checked = False
End If
End Sub

Private Sub cells_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()

Me.TbltransactioninmatesTableAdapter1.Fill(Me.DbfinalsystemJMSDataSet8.tbltransactioninmates)

Timer1.Start()
dt = New DataTable
Try
sql = "SELECT CELL_NUMBER as [CELL
NUMBER],FULLNAME,CASENUMBER,CASENAME,AGE,DATEBIRTH,GENDER,ADDRESS,STATUS,DATE_ENTERED AS [DATE
ENTERED],JAILGUARD,CRIMSTATUS,NO_OF_YEARS AS [NO OF YEARS] FROM tbltransactioninmates"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtgcells.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try
End Sub
63

Private Sub txtsearchname_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtsearchname.TextChanged
dt = New DataTable
Try
sql = "SELECT * FROM tbltransactioninmates where FULLNAME like '%" &
txtsearchname.Text & "%'"

'If conn.State = ConnectionState.Open Then conn.Close()


conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

da.SelectCommand = cmd
da.Fill(dt)
dtgcells.DataSource = dt

Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()

End Try
End Sub

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


Timer1.Tick
Dim count As Integer
count = TbltransactioninmatesBindingSource.Count
Label1.Text = "TOTAL NUMBER OF INMATES : " + count.ToString
End Sub

Private Sub dtgcells_CellContentClick(ByVal sender As System.Object, ByVal e As


System.Windows.Forms.DataGridViewCellEventArgs) Handles dtgcells.CellContentClick
FilterData("")
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
End If
End Sub
64

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

End Sub
End Class

Imports System.Data.OleDb

Public Class LogInForm


Dim strConnection As String

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button2.Click

Try
user = "SELECT * FROM tbluser WHERE username ='" & txtUsername.Text & "' and p_password
='" & txtPassword.Text & "'"
data(user)
Me.Show()

Catch ex As Exception
Adduser.Enabled = False

End Try

End Sub

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

Me.Close()

End Sub

Private Sub TextBox3_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles txtPassword.KeyDown
If e.KeyCode = Keys.Enter Then
Button2_Click(Nothing, Nothing)
Else
Exit Sub
End If
e.SuppressKeyPress = True

End Sub

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


Handles txtPassword.TextChanged
txtPassword.UseSystemPasswordChar = True
End Sub

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


Me.Close()
End Sub

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


Me.Close()
End Sub

Private Sub Button3_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button3.Click
65

Try
user1 = "SELECT * FROM tbluseradmin WHERE username ='" & txtUsername1.Text & "' and
p_password ='" & txtPassword1.Text & "'"
data1(user1)
Me.Show()
Catch ex As Exception
userAdmin.Enabled = True
End Try

End Sub

Private Sub Button1_Click_2(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click
Panel3.Show()
Panel2.Hide()
txtUsername.Text = ""
txtPassword.Text = ""
PictureBox2.Show()
PictureBox1.Hide()
PictureBox3.Hide()

End Sub

Private Sub LogInForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
Timer1.Enabled = True
Panel1.Hide()
Panel2.Hide()
PictureBox1.Hide()
PictureBox3.Hide()

End Sub

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

Button7.Enabled = False
Button5.Hide()
Button7.Show()
Button2.Show()
txtUsername.Show()
txtPassword.Show()
Button3.Hide()
txtUsername1.Hide()
txtPassword1.Hide()

End Sub

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

Button7.Enabled = False
Button7.Hide()
Button2.Hide()
txtUsername.Hide()
txtPassword.Hide()
Button5.Show()
Button1.Show()
Button3.Show()
txtUsername1.Show()
txtPassword1.Show()
Button5.Enabled = False

End Sub
66

Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button9.Click
Panel1.Show()
Panel2.Hide()
Panel3.Hide()
PictureBox2.Hide()
PictureBox3.Hide()
PictureBox1.Show()
txtUsername1.Focus()
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button4.Click
Panel1.Hide()
Panel2.Show()
Panel3.Hide()
PictureBox1.Hide()
PictureBox2.Hide()
PictureBox3.Show()
txtUsername.Focus()
End Sub

Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button10.Click
Panel3.Show()
Panel1.Hide()
txtPassword1.Text = ""
txtUsername1.Text = ""
PictureBox1.Hide()
PictureBox2.Show()
End Sub

Private Sub Button6_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You really want to exit the application?", "Exit",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Application.ExitThread()
End If

End Sub

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


Timer1.Tick
lbldate.Text = Date.Now.ToString("dd MMM yyyy hh:mm:ss tt")
End Sub

Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As


System.Windows.Forms.KeyEventArgs) Handles txtPassword1.KeyDown
If e.KeyCode = Keys.Enter Then
Button3_Click_1(Nothing, Nothing)
Else
Exit Sub
End If
e.SuppressKeyPress = True

End Sub

End Class
67

Imports System.Globalization
Public Class mainform

Private Sub InmatesToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles InmatesToolStripMenuItem.Click
AddingInmates.Show()
End Sub

Private Sub InmatesToolStripMenuItem2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles InmatesToolStripMenuItem2.Click
transactioninmates.Show()
End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


LOGINBTN.Click
Me.Hide()
LogInForm.Show()
If LOGINBTN.Text = "LOGIN" Then
LOGINBTN.Text = "LOGIN"

Else
MenuStrip1.Enabled = False
End If

End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


LOGOUTBTN.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You really want to Logout?", "Logout",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
MsgBox("Account Has Been Log Out!")
LOGOUTBTN.Hide()
LOGINBTN.Show()
MenuStrip1.Hide()
lbladmin.Text = ""
exitbtn.Show()
USER.Hide()
End If

End Sub

Private Sub mainform_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
LOGINBTN.Show()
LOGOUTBTN.Hide()
MenuStrip1.Hide()
LOGOUTBTN.Hide()
lbladmin.Hide()
USER.Hide()
Timer1.Enabled = True
Dim dt As String = ""
Dim dtraw As String = ""
Dim dtefinfo As DateTimeFormatInfo
Dim dtstyle As String = "MMMM,dd,yyyy"
Dim dtaraw As String = "dddd"
dtefinfo = DateTimeFormatInfo.InvariantInfo
dt = DateTime.Now.ToString(dtstyle, dtefinfo)
dtraw = DateTime.Now.ToString(dtaraw, dtefinfo)
68

Label2.Text = dt
Label3.Text = dtraw
End Sub

Private Sub InmatesToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles InmatesToolStripMenuItem1.Click
Adduser.Show()
End Sub

Private Sub ViewRecordsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ViewRecordsToolStripMenuItem.Click
inmatesSummary.Show()
End Sub

Private Sub Visitors2ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Visitors2ToolStripMenuItem.Click
visitorsRegistration.Show()
End Sub

Private Sub Visitors2ToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Visitors2ToolStripMenuItem1.Click
visitorsRfid.Show()
End Sub

Private Sub RecordsOfVisitorsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles RecordsOfVisitorsToolStripMenuItem.Click
visitorssummary.Show()
End Sub

Private Sub InmatesReportToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles InmatesReportToolStripMenuItem.Click
InmatesReport.Show()
End Sub

Private Sub ReportsToolStripMenuItem1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles ReportsToolStripMenuItem1.Click
reportforVisitors.Show()
End Sub

Private Sub AToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles AToolStripMenuItem.Click
userAdmin.Show()
End Sub

Private Sub CvToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles CvToolStripMenuItem.Click
statistics.Show()
End Sub

Private Sub exitbtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


exitbtn.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You really want to exit the application?", "Exit",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Application.ExitThread()
End If

End Sub
69

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


Timer1.Tick
lbldate.Text = Date.Now.ToString("hh:mm:ss tt")
End Sub
Private Sub AddJailGuardsToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles AddJailGuardsToolStripMenuItem.Click
addjailguards.Show()
End Sub
End Class

Public Class statistics


Public Function Myconnection() As OleDb.OleDbConnection
Return New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\dbfinalsystemJMS.accdb")
End Function

Private Sub statistics_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
Dim DbReader As OleDb.OleDbDataReader

Try

conn.Open()

query = "SELECT * FROM tbltransactioninmates"


cmd = New OleDb.OleDbCommand(query, conn)
DbReader = cmd.ExecuteReader
While DbReader.Read

Chart1.ChartAreas(0).AxisX.TitleFont = New Font("Oswald", 18.0F, FontStyle.Regular,


GraphicsUnit.Pixel)
Chart1.ChartAreas(0).AxisX.Title = "CASE NAME"

Chart1.ChartAreas(0).AxisY.TitleFont = New Font("Oswald", 18.0F, FontStyle.Regular,


GraphicsUnit.Pixel)
Chart1.ChartAreas(0).AxisY.Title = "AGE OF INMATES"

Chart1.Series("Case_vs_Age").Points.AddXY(DbReader("CASENAME"), DbReader("AGE"))

End While

conn.Close()

Catch ex As Exception
MsgBox(ex.Message)

End Try

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
70

dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",


MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
End If
End Sub

End Class

Public Class transactioninmates

Dim myconnection As String = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &


Application.StartupPath & "\dbfinalsystemJMS.accdb")
Dim arrImage As Byte()
Friend Shared DataSource As DataTable

Private Sub btnload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnload.Click
dt = New DataTable
Try
sql = "SELECT * FROM tbltransactioninmates"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtglisttransactioninmates.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try
End Sub

Private Sub cmbfullname_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles cmbfullname.SelectedIndexChanged
conn.Open()
Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdinmates WHERE FULLNAME ='" &
cmbfullname.Text & "'", conn)
Dim DbReader As OleDb.OleDbDataReader
DbReader = cmd.ExecuteReader
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Try
71

cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdinmates WHERE FULLNAME ='" &


cmbfullname.Text & "'", conn)
Dim DbReader As OleDb.OleDbDataReader
Dim arrImage() As Byte
DbReader = cmd.ExecuteReader
While DbReader.Read
txtcaseno.Text = DbReader("CASENUMBER")
txtcasename.Text = DbReader("CASENAME")
txtage.Text = DbReader("AGE")
radmale.Checked = "Male" = DbReader("GENDER")
radfemale.Checked = "Female" = DbReader("GENDER")
txtaddress.Text = DbReader("ADDRESS")
cmbstatus.Text = DbReader("STATUS")
dtpbirthdate.Text = DbReader("DATEBIRTH")
arrImage = DbReader("studimg")

Dim mstream As New System.IO.MemoryStream(arrImage)


PictureBox1.Image = Image.FromStream(mstream)
cmbcellno.Text = Nothing
cmbjailguard.Text = Nothing
cmbtimevisit.Text = Nothing
dtpentereddate.Text = Nothing
txtnoofyears.Clear()
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

conn.Close()

End Sub

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


Handles MyBase.Load
conn.Open()

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdinmates", conn)
Dim DbReader As OleDb.OleDbDataReader

DbReader = cmd.ExecuteReader
While DbReader.Read
cmbfullname.Items.Add(DbReader("FULLNAME").ToString)
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdjailguards", conn)
Dim DbReader As OleDb.OleDbDataReader

DbReader = cmd.ExecuteReader
While DbReader.Read
cmbjailguard.Items.Add(DbReader("FULLNAME").ToString)
End While
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
72

conn.Close()

End Sub

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnsave.Click
Try
Dim mstream As New System.IO.MemoryStream
PictureBox1.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
arrImage = mstream.GetBuffer
Dim filesize As UInt32
filesize = mstream.Length
mstream.Close()
conn.ConnectionString = myconnection
conn.Open()
sql = "Insert Into
tbltransactioninmates(CASENUMBER,CASENAME,FULLNAME,DATEBIRTH,AGE,GENDER,ADDRESS,STATUS,CELL_NUMBER,
DATE_ENTERED,JAILGUARD,CRIMSTATUS,NO_OF_YEARS,studimg)" & _
"Values
(@CASENUMBER,@CASENAME,@FULLNAME,@DATEBIRTH,@AGE,@GENDER,@ADDRESS,@STATUS,@CELL_NUMBER,@DATE_ENTERE
D,@JAILGUARD,@CRIMSTATUS,@NO_OF_YEARS,@studimg)"
cmd.Connection = conn
cmd.CommandText = sql
cmd.Parameters.AddWithValue("@CASENUMBER", txtcaseno.Text)
cmd.Parameters.AddWithValue("@CASENAME", txtcasename.Text)
cmd.Parameters.AddWithValue("@FULLNAME", cmbfullname.Text)
cmd.Parameters.AddWithValue("@DATEBIRTH", dtpbirthdate.Text)
cmd.Parameters.AddWithValue("@AGE", txtage.Text)
cmd.Parameters.AddWithValue("@GENDER", Label13.Text)
cmd.Parameters.AddWithValue("@ADDRESS", txtaddress.Text)
cmd.Parameters.AddWithValue("@STATUS", cmbstatus.Text)
cmd.Parameters.AddWithValue("@CELL_NUMBER", cmbcellno.Text)
cmd.Parameters.AddWithValue("@DATE_ENTERED", dtpentereddate.Text)
cmd.Parameters.AddWithValue("@JAILGUARD", cmbjailguard.Text)
cmd.Parameters.AddWithValue("@CRIMSTATUS", cmbtimevisit.Text)
cmd.Parameters.AddWithValue("@NO_OF_YEARS", txtnoofyears.Text)
cmd.Parameters.AddWithValue("@studimg", arrImage)

Dim R As Integer
R = cmd.ExecuteNonQuery
If R > 0 Then
MsgBox("NEW INMATES HAS BEEN SAVED")
conn.Close()
Call btnload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
cmbfullname.Text = Nothing
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
dtpentereddate.Text = Nothing
dtpbirthdate.Text = Nothing
cmbjailguard.Text = Nothing
cmbtimevisit.Text = Nothing
cmbcellno.Text = Nothing
txtnoofyears.Clear()
PictureBox1.Image = Nothing
Else
MsgBox("NO INMATES HAS BEEN SAVED")

End If
da.Dispose()
73

conn.Close()

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS!")
Exit Sub
End If
Next

End Try

End Sub

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


Handles radmale.CheckedChanged
If radmale.Checked = True Then
Label13.Text = "Male"

ElseIf radfemale.Checked = True Then


Label13.Text = "Female"
End If
End Sub

Private Sub radfemale_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles radfemale.CheckedChanged
If radfemale.Checked = True Then
Label13.Text = "Female"

ElseIf radmale.Checked = True Then


Label13.Text = "Male"
End If
End Sub

Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click
Try
sql = "UPDATE tbltransactioninmates SET CASENUMBER='" & txtcaseno.Text & "',CASENAME='"
& txtcasename.Text & "',CELL_NUMBER='" & cmbcellno.Text & "',DATE_ENTERED='" & dtpentereddate.Text
& "',FULLNAME='" & cmbfullname.Text & "', AGE='" & txtage.Text & "',GENDER='" & Label13.Text &
"',ADDRESS='" & txtaddress.Text & "',STATUS='" & cmbstatus.Text & "',JAILGUARD='" & txtcaseno.Text
& "',CRIMSTATUS='" & cmbtimevisit.Text & "',NO_OF_YEARS='" & txtnoofyears.Text & "' WHERE ID=" &
Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW RECORD HAS BEEN UPDATED!")
conn.Close()
Call btnload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
cmbfullname.Text = Nothing
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
dtpentereddate.Text = Nothing
dtpbirthdate.Text = Nothing
74

cmbjailguard.Text = Nothing
cmbtimevisit.Text = Nothing
cmbcellno.Text = Nothing
txtnoofyears.Clear()
PictureBox1.Image = Nothing
Else
MsgBox("NO RECORD HASS BEEN UPDATED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If
Next
MsgBox("")
Finally
conn.Close()

End Try
End Sub

Private Sub dtglisttransactioninmates_DataSourceChanged(ByVal sender As Object, ByVal e As


System.EventArgs) Handles dtglisttransactioninmates.DataSourceChanged
dtglisttransactioninmates.Columns("ID").Visible = False
End Sub
Private Sub dtglisttransactioninmates_DoubleClick(ByVal sender As Object, ByVal e As
System.EventArgs) Handles dtglisttransactioninmates.DoubleClick
Me.Text = dtglisttransactioninmates.CurrentRow.Cells("ID").Value.ToString
txtcaseno.Text = dtglisttransactioninmates.CurrentRow.Cells("CASENUMBER").Value.ToString
txtcasename.Text = dtglisttransactioninmates.CurrentRow.Cells("CASENAME").Value.ToString
cmbfullname.Text = dtglisttransactioninmates.CurrentRow.Cells("FULLNAME").Value.ToString
txtage.Text = dtglisttransactioninmates.CurrentRow.Cells("AGE").Value.ToString
radmale.Checked = "Male" =
dtglisttransactioninmates.CurrentRow.Cells("GENDER").Value.ToString
radfemale.Checked = "Female" =
dtglisttransactioninmates.CurrentRow.Cells("GENDER").Value.ToString
txtaddress.Text = dtglisttransactioninmates.CurrentRow.Cells("ADDRESS").Value.ToString
cmbstatus.Text = dtglisttransactioninmates.CurrentRow.Cells("STATUS").Value.ToString
cmbcellno.Text = dtglisttransactioninmates.CurrentRow.Cells("CELL_NUMBER").Value.ToString
dtpentereddate.Text =
dtglisttransactioninmates.CurrentRow.Cells("DATE_ENTERED").Value.ToString
cmbjailguard.Text = dtglisttransactioninmates.CurrentRow.Cells("JAILGUARD").Value.ToString
cmbtimevisit.Text = dtglisttransactioninmates.CurrentRow.Cells("CRIMSTATUS").Value.ToString
txtnoofyears.Text =
dtglisttransactioninmates.CurrentRow.Cells("NO_OF_YEARS").Value.ToString
dtpbirthdate.Text = dtglisttransactioninmates.CurrentRow.Cells("DATEBIRTH").Value.ToString
End Sub

Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btndelete.Click
Try
sql = "Delete * FROM tbltransactioninmates where ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("Inmates record has been deleted!")
conn.Close()
75

Call btnload_Click(sender, e)
txtcaseno.Clear()
txtcasename.Clear()
cmbfullname.Text = Nothing
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
dtpentereddate.Text = Nothing
cmbjailguard.Text = Nothing
cmbtimevisit.Text = Nothing
cmbcellno.Text = Nothing
txtnoofyears.Clear()
PictureBox1.Image = Nothing
Else
MsgBox("Inmates record has been deleted!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox3.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If
Next
MsgBox("")
Finally
conn.Close()

End Try
End Sub

Private Sub txtsearchname_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtsearchname.TextChanged
dt = New DataTable
Try
sql = "(SELECT * FROM tbltransactioninmates where FULLNAME like '%" &
txtsearchname.Text & "%')"
'If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

da.SelectCommand = cmd
da.Fill(dt)
dtglisttransactioninmates.DataSource = dt

Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click

txtcaseno.Clear()
txtcasename.Clear()
76

cmbfullname.Text = Nothing
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
dtpentereddate.Text = Nothing
cmbjailguard.Text = Nothing
cmbtimevisit.Text = Nothing
cmbcellno.Text = Nothing
txtnoofyears.Clear()
PictureBox1.Image = Nothing
cmbfullname.Focus()
End Sub

Private Sub cmbjailguard_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles cmbjailguard.SelectedIndexChanged
conn.Open()
Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdjailguards WHERE FULLNAME='" &
cmbfullname.Text & "'", conn)
Dim DbReader As OleDb.OleDbDataReader
DbReader = cmd.ExecuteReader
Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS")
Exit Sub
End If
Next
MsgBox("")
End Try
conn.Close()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.USER.Hide()
End If
End Sub

End Class

Public Class userAdmin

Private Sub btnload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnload.Click
dt = New DataTable
77

Try
sql = "SELECT * FROM tbluseradmin"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtguser.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try
End Sub

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnsave.Click
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS")
Exit Sub
End If

Next

Try
sql = "INSERT INTO tbluseradmin(fname,lname,username,p_password) VALUES ('" &
txtfname.Text & "','" & txtlname.Text & "','" & txtusername.Text & "','" & txtpassword.Text & "')"

conn.Open()

With cmd
.CommandText = sql
.Connection = conn
End With
result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW USER ACCOUNT HAS BEEN SAVED!")
conn.Close()
Call btnload_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()

Else
MsgBox("NO USER ACCOUNT HAS BEEN SAVED!")
End If
Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS")
Exit Sub
End If

Next
MsgBox("")

Finally
conn.Close()
End Try
78

End Sub

Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click

Try
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE AND FILL UP ALL FIELDS !")
Exit Sub
End If

Next

sql = "UPDATE tbluseradmin SET fname='" & txtfname.Text & "',lname='" & txtlname.Text &
"',username='" & txtusername.Text & "',p_password='" & txtpassword.Text & "' WHERE ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW USER ACCOUNT HAS BEEN UPDATED!")
conn.Close()
Call btnload_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
Else
MsgBox("NO USER ACCOUNT HAS BEEN UPDATED!")
End If

Catch ex As Exception

Finally
conn.Close()

End Try
End Sub

Private Sub dtguser_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles


dtguser.DoubleClick
Me.Text = dtguser.CurrentRow.Cells("ID").Value.ToString
txtfname.Text = dtguser.CurrentRow.Cells("fname").Value.ToString
txtlname.Text = dtguser.CurrentRow.Cells("lname").Value.ToString
txtusername.Text = dtguser.CurrentRow.Cells("username").Value.ToString
txtpassword.Text = dtguser.CurrentRow.Cells("p_password").Value.ToString
End Sub

Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button4.Click

Try
sql = "Delete * FROM tbluserAdmin where ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
79

End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("User Account record has been deleted!")
conn.Close()
Call btnload_Click(sender, e)
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
Else
MsgBox("User Account record has been deleted!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If

Next
MsgBox("")
Finally
conn.Close()

End Try
End Sub

Private Sub btncreate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btncreate.Click
txtfname.Clear()
txtlname.Clear()
txtusername.Clear()
txtpassword.Clear()
txtfname.Focus()
End Sub

Private Sub chkshowpassword_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles chkshowpassword.CheckedChanged
If chkshowpassword.Checked = True Then
txtpassword.UseSystemPasswordChar = False
ElseIf chkshowpassword.Checked = False Then
txtpassword.UseSystemPasswordChar = True
End If
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
80

mainform.Label1.Show()
mainform.LOGINBTN.Hide()
End If
End Sub

Private Sub userAdmin_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub
End Class

Public Class visitorsRegistration

Dim myconnection As String = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &


Application.StartupPath & "\dbfinalsystemJMS.accdb")
Dim arrImage As Byte()

Private Sub btnload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnload.Click

dt = New DataTable
Try
sql = "SELECT * FROM tbladdvisitors2"
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With
da.SelectCommand = cmd
da.Fill(dt)
dtglistvisitors2.DataSource = dt
Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try

End Sub

Private Sub btnsave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnsave.Click

Try
Dim mstream As New System.IO.MemoryStream
PictureBox1.Image.Save(mstream, System.Drawing.Imaging.ImageFormat.Jpeg)
arrImage = mstream.GetBuffer
Dim filesize As UInt32
filesize = mstream.Length
mstream.Close()
conn.ConnectionString = myconnection
conn.Open()
sql = "Insert Into
tbladdvisitors2(RFIDTAG,PERSONTOVISIT,FULLNAME,DATEBIRTH,AGE,GENDER,ADDRESS,STATUS,studimg,CONTACTN
O)" & _
81

"Values
(@RFIDTAG,@PERSONTOVISIT,@FULLNAME,@DATEBIRTH,@AGE,@GENDER,@ADDRESS,@STATUS,@studimg,@CONTACTNO)"
cmd.Connection = conn
cmd.CommandText = sql

cmd.Parameters.AddWithValue("@RFIDTAG", txtrfid.Text)
cmd.Parameters.AddWithValue("@PERSONTOVISIT", txtperson.Text)
cmd.Parameters.AddWithValue("@FULLNAME", txtfullname.Text)
cmd.Parameters.AddWithValue("@DATEBIRTH", DateTimePicker1.Text)
cmd.Parameters.AddWithValue("@AGE", txtage.Text)
cmd.Parameters.AddWithValue("@GENDER", Label12.Text)
cmd.Parameters.AddWithValue("@ADDRESS", txtaddress.Text)
cmd.Parameters.AddWithValue("@STATUS", cmbstatus.Text)
cmd.Parameters.AddWithValue("@studimg", arrImage)
cmd.Parameters.AddWithValue("@CONTACTNO", txtcontact.Text)

Dim R As Integer
R = cmd.ExecuteNonQuery
If R > 0 Then
MsgBox("NEW VISITORS HAS BEEN SAVED")
conn.Close()
Call btnload_Click(sender, e)

txtrfid.Clear()
txtperson.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
PictureBox1.Image = Nothing
txtcontact.Clear()
Else
MsgBox("NO VISITORS HAS BEEN SAVED")

End If
da.Dispose()
conn.Close()

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("FILL UP ALL FIELDS")
Exit Sub
End If

Next
MsgBox("")
End Try
End Sub

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


Handles radmale.CheckedChanged
If radmale.Checked = True Then
Label12.Text = "Male"

ElseIf radfemale.Checked = True Then


Label12.Text = "Female"
End If

End Sub
82

Private Sub radfemale_CheckedChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles radfemale.CheckedChanged
If radfemale.Checked = True Then
Label12.Text = "Female"

ElseIf radmale.Checked = True Then


Label12.Text = "Male"
End If

End Sub

Private Sub btnupdate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btnupdate.Click
Try
sql = "UPDATE tbladdvisitors2 SET RFIDTAG='" & txtrfid.Text & "',FULLNAME='" &
txtfullname.Text & "',PERSONTOVISIT='" & txtperson.Text & "', AGE='" & txtage.Text & "',GENDER='" &
Label12.Text & "',ADDRESS='" & txtaddress.Text & "',STATUS='" & cmbstatus.Text & "',DATEBIRTH='" &
DateTimePicker1.Text & "',CONTACTNO='" & txtcontact.Text & "' WHERE ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("NEW VISITORS HAS BEEN UPDATED!")
conn.Close()
Call btnload_Click(sender, e)

txtrfid.Clear()
txtperson.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
txtcontact.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
PictureBox1.Image = Nothing
txtcontact.Clear()
Else
MsgBox("NO VISITORS HAS BEEN UPDATED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO UPDATE!")
Exit Sub
End If

Next
Finally
conn.Close()

End Try

End Sub
83

Private Sub dtglistvisitors2_DataSourceChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles dtglistvisitors2.DataSourceChanged
dtglistvisitors2.Columns("ID").Visible = False
End Sub

Private Sub dtglistvisitors2_DoubleClick(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles dtglistvisitors2.DoubleClick
Me.Text = dtglistvisitors2.CurrentRow.Cells("ID").Value.ToString

txtrfid.Text = dtglistvisitors2.CurrentRow.Cells("RFIDTAG").Value.ToString
txtperson.Text = dtglistvisitors2.CurrentRow.Cells("PERSONTOVISIT").Value.ToString
txtfullname.Text = dtglistvisitors2.CurrentRow.Cells("FULLNAME").Value.ToString
txtage.Text = dtglistvisitors2.CurrentRow.Cells("AGE").Value.ToString
radmale.Checked = "Male" = dtglistvisitors2.CurrentRow.Cells("GENDER").Value.ToString
radfemale.Checked = "Female" = dtglistvisitors2.CurrentRow.Cells("GENDER").Value.ToString
txtaddress.Text = dtglistvisitors2.CurrentRow.Cells("ADDRESS").Value.ToString
cmbstatus.Text = dtglistvisitors2.CurrentRow.Cells("STATUS").Value.ToString
DateTimePicker1.Text = dtglistvisitors2.CurrentRow.Cells("DATEBIRTH").Value.ToString
txtcontact.Text = dtglistvisitors2.CurrentRow.Cells("CONTACTNO").Value.ToString
Dim arrImage As Byte()
arrImage = dtglistvisitors2.CurrentRow.Cells("studimg").Value
Dim mstream As New System.IO.MemoryStream(arrImage)
PictureBox1.Image = Image.FromStream(mstream)

End Sub

Private Sub btndelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


btndelete.Click
Try
sql = "Delete * FROM tbladdvisitors2 where ID=" & Me.Text
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

result = cmd.ExecuteNonQuery
If result > 0 Then
MsgBox("VISITORS RECORD HAS BEEN DELETED!")
conn.Close()
Call btnload_Click(sender, e)

txtrfid.Clear()
txtperson.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
DateTimePicker1.Text = Nothing
PictureBox1.Image = Nothing
txtcontact.Clear()
Else
MsgBox("NO VISITORS RECORD HAS BEEN DELETED!")
End If

Catch ex As Exception
For Each Item As Control In GroupBox1.Controls
If Item.Text = Nothing Then
MsgBox("SELECT A DATA TO DELETE!")
Exit Sub
End If
84

Next
Finally
conn.Close()
End Try
End Sub

Private Sub DateTimePicker1_ValueChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles DateTimePicker1.ValueChanged
Dim d1, d2 As Date
Dim days, months, years As Long

d1 = DateTimePicker1.Value.ToShortDateString
d2 = Now.ToShortDateString

years = Year(d1)
months = Month(d2) - months
days = d1.Day

years = Year(d2) - years


months = Month(d2) - months
days = d2.Day - days

If Math.Sign(days) = -1 Then
days = 30 - Math.Abs(days)
months = months - 1

End If

If Math.Sign(months) = -1 Then
months = 12 = -Math.Abs(months)
years = years - 1
End If
txtage.Text = years.ToString
End Sub

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

OpenFileDialog1.Title = "Select to updload"


OpenFileDialog1.ShowDialog()

PictureBox1.ImageLocation = OpenFileDialog1.FileName.ToString
PictureBox1.Visible = True
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button2.Click
txtrfid.Clear()
txtperson.Clear()
txtfullname.Clear()
txtaddress.Clear()
txtage.Clear()
txtcontact.Clear()
cmbstatus.Text = Nothing
radmale.Checked = Nothing
radfemale.Checked = Nothing
Me.Text = Nothing
DateTimePicker1.Text = Nothing
PictureBox1.Image = Nothing
txtrfid.Focus()

End Sub
85

Private Sub txtsearchname_TextChanged(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles txtsearchname.TextChanged
dt = New DataTable
Try
sql = "(SELECT * FROM tbladdvisitors2 where FULLNAME like '%" & txtsearchname.Text &
"%')"
'If conn.State = ConnectionState.Open Then conn.Close()
conn.Open()
With cmd
.CommandText = sql
.Connection = conn
End With

da.SelectCommand = cmd
da.Fill(dt)
dtglistvisitors2.DataSource = dt

Catch ex As Exception
MsgBox(ex.Message)
Finally
conn.Close()
End Try

End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.USER.Hide()
End If

End Sub

Private Sub visitorsRegistration_Load(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles MyBase.Load
mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()

End Sub
End Class

Public Class visitorsRfid


Dim myconnection As String = ("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\dbfinalsystemJMS.accdb")
86

Dim arrImage As Byte()

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


Handles txtrfid.TextChanged
Dim DbReader As OleDb.OleDbDataReader

If txtrfid.Text.Length >= 10 Then


conn.Open()
Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdvisitors2 where RFIDTAG like '" &
txtrfid.Text & "'", conn)
DbReader = cmd.ExecuteReader
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Try
cmd = New OleDb.OleDbCommand("SELECT * FROM tbladdvisitors2 where RFIDTAG like '" &
txtrfid.Text & "'", conn)

Dim arrImage() As Byte


DbReader = cmd.ExecuteReader
While DbReader.Read
lblperson.Text = DbReader("PERSONTOVISIT")
lblfullname.Text = DbReader("FULLNAME")
lblage.Text = DbReader("AGE")
radmale.Checked = "Male" = DbReader("GENDER")
radfemale.Checked = "Female" = DbReader("GENDER")
lbladd.Text = DbReader("ADDRESS")
lblstatus.Text = DbReader("STATUS")
lbldob.Text = DbReader("DATEBIRTH")
lblcontact.Text = DbReader("CONTACTNO")
arrImage = DbReader("studimg")
Dim mstream As New System.IO.MemoryStream(arrImage)
PictureBox4.Image = Image.FromStream(mstream)

End While
DbReader.Close()
conn.Close()

txtrfid.SelectionStart = 0
txtrfid.SelectionLength = Len(txtrfid.Text)
txtrfid.Focus()
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

conn.Close()
End If
End Sub

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
txtrfid.Focus()
mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
mainform.USER.Hide()
87

End Sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button1.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
mainform.LOGOUTBTN.Show()
mainform.USER.Hide()
End If
End Sub

End Class

Public Class VisitorsLogStat

Public Function Myconnection() As OleDb.OleDbConnection


Return New OleDb.OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" &
Application.StartupPath & "\dbfinalsystemJMS.accdb")
End Function

Private Sub statistics_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


MyBase.Load
Dim DbReader As OleDb.OleDbDataReader

Try

conn.Open()

query = "SELECT * FROM tbladdvisitors2"


cmd = New OleDb.OleDbCommand(query, conn)
DbReader = cmd.ExecuteReader
While DbReader.Read

Chart1.ChartAreas(0).AxisX.TitleFont = New Font("Oswald", 18.0F, FontStyle.Regular,


GraphicsUnit.Pixel)
Chart1.ChartAreas(0).AxisX.Title = "GENDER"

Chart1.ChartAreas(0).AxisY.TitleFont = New Font("Oswald", 18.0F, FontStyle.Regular,


GraphicsUnit.Pixel)
Chart1.ChartAreas(0).AxisY.Title = "AGE"
Chart1.Series("Gender_Vs_Age").Points.AddXY(DbReader("GENDER"), DbReader("AGE"))

End While
conn.Close()

Catch ex As Exception
MsgBox(ex.Message)
88

End Try

mainform.MenuStrip1.Hide()
mainform.LOGOUTBTN.Hide()
mainform.LOGINBTN.Hide()
mainform.lbladmin.Hide()
mainform.Label1.Hide()
End Sub

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles


Button6.Click
Dim dialog As DialogResult
dialog = MessageBox.Show("Do You Want To Go Back to Mainform?", "BACK",
MessageBoxButtons.YesNo)
If dialog = DialogResult.No Then
Me.Show()

Else
Me.Close()
mainform.Show()
mainform.LOGINBTN.Show()
mainform.LOGOUTBTN.Show()
mainform.MainMenuStrip.Show()
mainform.lbladmin.Show()
mainform.Label1.Show()
mainform.LOGINBTN.Hide()
End If
End Sub

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


Handles PictureBox1.Click

End Sub
End Class
89

Appendix 3

Biographical Statement

Marvin Balingbing graduated two (2) years Associate in Computer


Technology at Datamex College of Saint Adeline, and now he taking up the
Degree Bachelor of Science in Information Systems at La Concepcion College.

Bryan Kenneth Balitos a 4th Year College Student at the La Concepcion


College. He’s taking up Bachelor of Science in Information Systems.
90

Charles Leonard Ong graduated Information Technology for (2) years at


La Concepcion College, when he is High School he took up Media Arts and
now he’s is studying Bachelor of Science in Information Systems at La
Concepcion College.

Marriz Palcat graduated two (2) years Information Technology at


Headwaters College. And now she is taking up the Degree Bachelor of Science
in Information Systems at La Concepcion College.

John Christian Romasanta graduated two (2) years Information


Technology at Headwaters College. And now he is taking up the Degree
Bachelor of Science in Information Systems at La Concepcion College.
91

Appendix 4

References

Adcyinka A. Ademola A. Adebyi A. (2011 May) Prison and Inmates Information and Ideas

BOSCH Inventor for Life (N.D) Review about Prison and Inmates.

Donald Hutcherson PH.D and Amy Hauner (March 2016). Prison and Prison management

Olunsanya and Onazi Ogoba of Bells University of Technology (May-Jun 2015) Prison
management

Dindwar P.., Dharmdas, S., Kanavi, A., Yavagal T. (N.D) Automated Prison Management
System

Lumauag R.G (November 2016) Sample Technique in Prison management system

Ziya’u Bello (September 2015) Prison Management system, Volume 3

Ofgem (March 2014) Radio Frequency Identification

Kale H, Rane G, Shende S, Shinde S. (2013) ) Radio Frequency Identification and Radio
Frequency Identification Security

Ed Biller (June 2016) Radio Frequency Identification Security

Monexa.com (N.D) Emerging RFID Security

Aziz (April 2016), Future trends in RFID

Radio Frequency Identification Theory, retrieved from

http://www.RFIDtheory.com/theory/RFID

Prison management Theory, retrieved from

http://www.prissonmanagementtheory.com/theory/prison

Officialgazette.gov.ph (2012) Republic Act No. 10173, retrieved from


92

http://www.officialgazette.gov.ph/2012/08/15/repuvlic-act-no-10173

http://www.bjmp.gov.ph

You might also like