67% found this document useful (3 votes)
831 views

Human Resource Management System Using RFID

Human Resrouce Management system is a Final Year Project in which different modules are targeted like 1- Induction 2- Employee Detail 3- Attendace 4- Payroll All these are handle using RFID
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
67% found this document useful (3 votes)
831 views

Human Resource Management System Using RFID

Human Resrouce Management system is a Final Year Project in which different modules are targeted like 1- Induction 2- Employee Detail 3- Attendace 4- Payroll All these are handle using RFID
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 332

Automated Human Resource Information System

Using
Biometrics and RFID

A Thesis
Presented to
The Academic Faculty
by

M.Muzammal Naseer Janjua


(1339/FUIMCS/BBSSE-2004)

In Partial Fulfillment
of the Requirements for the Degree
Bachelors in Software Engineering

Department Of Software Engineering And Computer Science


Foundation University Institute of Management & Computer Sciences
October, 6th 2008

Automated Human Resource Information System


Using
Biometrics and RFID

Approved by:

Professor Dr. Tough, Committee Chair

Professor Originality-Checker
(Another Department)

Professor Dr. Genius, Adviser

Professor Verifier

Professor Anti-Plagiarism

Asst. Professor Muaz Niazi


(Coordinator Senior Design Projects)

Date Approved

Starting With The Name of Allmighty Allah


Who is Mercifull and Beneficial.
To my wonderful parents with Deepest gratitude,
Whose Love,and prayers have
always been a source of stregnth for me
Who have tolerated my excesses,
and guided and nurtured throughout my live.
& To my honorable faculty members
Whom I hope to please with My show of
year-long efforts!

iii

PREFACE

When Something can be Read without effort,


Great effort has gone into writing
Enrique Jardiel poncela
The present time demands from Universities and Researchers to Develop, to think and to
work on according to most modern and demanded Technology . Especially in Computer
Sciences fields, every day a new technology is coming. And every eve is going to off a
technology . It has been identified that Developing Countries progress, their technology ,
and their approaches are far away from the modern world and modern technologies. In the
19s Century it was a quote that
Developing Countries are far away from Developed Countries from 80 to
100 years
Now the time has been changed. World has become global village. The era of is moving from wired to wireless to reduce the copper burden. With the emerging technologies
communication is becoming faster and faster reducing the time between data transmission.
From placing one file to another place by hand to Bar Code and now moved to Radio Frequencies to remove the need of line of sight bound.The need to change the old manual system
led us in automation of different system,to give reliablity and user friendly envirnoment to
uers.Thats why it was said that
We are becoming the servants in thought, as in action, of the machine we
have created to serve us. John Kenneth Galbraith
The Purposed Project Automated Human Resource Information System Using RFID and
Biometrice is based upon new and most demanded technology that is Radio Frequency and
thumb identification,these technologies are used for automation and authentication.The
iv

AHRIS has a enormous Software which has got many options for the automation of the
system.The detailed project is dicussed later in this report.
Organization and Overview of Chapters
Chapter 1 Introduction :I start by giving an introductory chapter which talks about
entire work in Introduction Chapter. Starting from basic introduction of project to all
desrciption of project,this chapter covers all modules of the project with their benifits and
feutures.It is tried that main scenarios of the project and main theme of the project should
cover in this chapter.
Chapter 2 Background : This chapter give a detail view of the background behind
developing this software and work on this project.The project is for Defence Housing Authority(DHA),so the whole study,survay and drawback of the systems being used by them
are covered in this chapter.Literature view from different existing projects is also included
in this chapter.
Chapter 3 Requirements and Analysis:For developing and working on project it
is needed to have a very good requirment and project analysis using different Software
Engineering cases.Use cases and Flowchart of the use cases with basic system diagram and
association of diagram is covered in this chapter.
Chapter 4 Design :Designing is the core part of the project,as a project of Software
engineering course,it is highly focused to design the project using UML diagrams.As it is
said Pictures Says All or figures speaks more then words.Different designing techniques
are used,like Squence Diagrams,State chart diagrams,class diagram,component diagram etc.
Chapter 5 Implementation :This chapter describe the tools and technologies used
to make this project happen and implemented in reality.chunks of Algorithms are also
discussed to cover the main implementation of modules.
Chapter 6 Testing :Testing is another core part and critical part of the project,it is
highly recommended for the Final year project.Different testing techniques are used to test
AHRIS.
Chapter 7 Conclusion :This chapter is about what is concluded at the end of this
project.What has been delivered and how it is benificial for the industry.

ABSTRACT

The ongoing growth of technology has necessitated the use of more simpler and
effective systems as a replacement to the existing ones.World of communication has long
before migrated from wired to wireless so as to minimize the dependency of copper from
the field of communication. RFID and Biometrice developed thereof are the products of
these migration. These devices are easy to install,and maintain.
AHRIS Using Biometrice and RFID Stands for Automated Human Resource Information
System Using Biometrice and RFID device(Case-Study Of DHAi ).Its automated Solution
to the manual management Systems which are still in many organizations and departments.
The first rule of any technology used in a business is that automation applied to an efficient operation will magnify the efficiency. The second is that
automation applied to an inefficient operation will magnify the inefficiency.Bill
Gates
AHRIS is basically integration of management systems,it is not only Human Resource management System.It has Employee Management System,Electonic Documents Management
System,Payroll Management System and Attendance System.This system will enable the
managers and the teams working on several projects at different sites to keep themselves
well-versed of the updated information.
RFID and Biometrice Devices are used for Authentication and Automation of Attendance
System of Registered Employees.Both Technologies are very much secured and not easy to
hack or break.By using these as hardware, encourage to develope a software which automate
the entries and departure with real time manner.
AHRIS provides functionality of viewing detailed reports of diverse nature. The system
has a number of reports that are developed in Crystal Reports, which gives the better view
of Employeess progress and activities at any stage. The comprehensive reporting system
facilitates in timely and accurate decision making.
vi

ACKNOWLEDGEMENTS

Above all,thankful to Allah, The All Mighty. It was for Him, that
I choose this project and it is Him, who has to reward me for this effort.
To all those who helped us and
contributed for completion of the project,
our sincere gratitude and appreciation with special thanks goes to:
Mr.Abdullah Bin Qadeer
Mr.Mubashir, Telenor Pakistan
for their intellectual supervision and
absolute guidance in solving all problems and difficulties
Dr Aftab Ahmed, Dean and Director
Foundation University Islamabad Pakistan
for his ethical, administrative, highly skilled leadership and
provision of conducive environment in the University
for project accomplishment.
The Faculty of Computer Science and staff at FUIMCS
for cooperation and assistance in this project
My beloved parents who,
through their unparallel support,
love & affection, sacrifices and prayers,
provided comforts and care
for completing this project
To above mentioned and to others whome i may have missed to mention, My sincerest
thanks and acknowledgement.
vii

Abbreviations
Abbreviation
RF
EDMS
BM
PS
AS
AAS
DFD
CFD
FUIMCS
HRIS
RFID
UML
HR
DHA
DEO
VB
GUI
DBS
mb
Gb
VLF
OOA
E-R
DFD
PDM
AM
SDLC
SQA
BLL
ULL
DLL
DAL

Meaning
Radio Frequency
Electronic Data Management System
BioMetrics
Payroll System
Attendance System
Automated Attendance System
Data Flow Diagram
Control Flow Diagram
Foundation University institute of Management&
Computer Science
Human Resource Information System
Radio Frequency idnetification System
Unified Modeling Language
Human Resource
Defence Housing Authority
Data Entry Operator
Visual Basic
Graphical User Interface
DataBase System
Megabyte
Giga byte
Very Low Frequency
Object oriented Anaylsis
Entity Relationship
Data Flow Diagram
Project Domain Model
Analysis Model
Software Develpoment Life Cycle
Software Quality Assurance
Buisness Logic Layer
User Logic Layer
Data Logic Layer
Data Access Layer
Table 1: Abbreviations

viii

TABLE OF CONTENTS
DEDICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

iii

PREFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

iv

ABSTRACT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vi

ACKNOWLEDGEMENTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

vii

LIST OF TABLES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii


LIST OF FIGURES
I

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xv

INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1

Project in Breif . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1.1

Project Title . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1.2

Project Area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1.3

Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.1.4

Supervisors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.2

Literature Review of existing system from some universities . . . . . . . .

1.3

Introduction to Organization(DHA) . . . . . . . . . . . . . . . . . . . . . .

1.3.1

Projects of Orgranization . . . . . . . . . . . . . . . . . . . . . . . .

1.3.2

Organizational Chart . . . . . . . . . . . . . . . . . . . . . . . . . .

1.3.3

Human Resource System . . . . . . . . . . . . . . . . . . . . . . . .

The Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4.1

Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1.4.2

Project Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

1.4.3

Project Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

1.4

1.5

Developement Process Model

. . . . . . . . . . . . . . . . . . . . . . . . .

12

1.6

Proposed System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

1.6.1

Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

13

1.6.2

Proposed system benefits . . . . . . . . . . . . . . . . . . . . . . . .

14

1.6.3

Proposed System Features . . . . . . . . . . . . . . . . . . . . . . .

15

1.7

Project Overall Description


1.7.1

. . . . . . . . . . . . . . . . . . . . . . . . . .

18

Basic System Diagram . . . . . . . . . . . . . . . . . . . . . . . . .

18

ix

II

1.7.2

System Operational Modules . . . . . . . . . . . . . . . . . . . . . .

18

1.7.3

System Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

1.7.4

User Interfaces

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.7.5

Hardware Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.7.6

Software Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.7.7

Memory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.7.8

Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

1.7.9

Site Adaption Requirment . . . . . . . . . . . . . . . . . . . . . . .

22

1.7.10 User characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

1.7.11 Software System Attributes . . . . . . . . . . . . . . . . . . . . . .

22

BACKGROUND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

2.1

Detailed Study of Existing System . . . . . . . . . . . . . . . . . . . . . . .

24

2.2

Survey of the Existing Systems at DHA isb . . . . . . . . . . . . . . . . .

24

2.3

2.2.1

Attendance System . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

2.2.2

Recruitment System(HR Department) . . . . . . . . . . . . . . . .

25

2.2.3

Employees Record System . . . . . . . . . . . . . . . . . . . . . . .

25

2.2.4

Reporting System . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

2.2.5

Documents System . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

2.2.6

Payroll System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

2.2.7

Security System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

26

Draw backs in existing system

. . . . . . . . . . . . . . . . . . . . . . . .

27

List of Drawbacks . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

Literature Review of The Existing System and Technologies . . . . . . . .

30

2.4.1

Biometrice Technology . . . . . . . . . . . . . . . . . . . . . . . . .

30

2.4.2

Existing Technologies and need of RFID . . . . . . . . . . . . . . .

33

2.4.3

RFID Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . .

34

2.4.4

List of Observed Needs . . . . . . . . . . . . . . . . . . . . . . . . .

36

III REQUIRMENTS & ANALYSIS . . . . . . . . . . . . . . . . . . . . . . . .

38

2.3.1
2.4

3.1

Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

3.2

Non Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . .

39

3.2.1

Usability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39

3.2.2

Human Factors . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

39

3.2.3

Reliability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

3.2.4

Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

3.2.5

Implementation Constraints . . . . . . . . . . . . . . . . . . . . . .

40

3.2.6

Documentation and Help . . . . . . . . . . . . . . . . . . . . . . . .

40

3.2.7

Noteworthy Hardware . . . . . . . . . . . . . . . . . . . . . . . . .

40

3.2.8

Error Handling . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

3.3

Actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

3.4

System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

3.5

Use Cases Description(flow-chart) . . . . . . . . . . . . . . . . . . . . . . .

43

3.6

Analysis Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

3.7

Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

3.8

Project Domain Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

3.9

Data Flow Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

78

3.10 E-R Analysis Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

3.11 Subsystem Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

3.12 Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

IV DESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

4.1

4.2

4.3

System Module Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

4.1.1

Modules of AHRIS . . . . . . . . . . . . . . . . . . . . . . . . . . .

87

Database Model Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

4.2.1

Design Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

4.2.2

Normalization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

92

4.2.3

List of DB Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

4.2.4

E-R Database model Diagrams . . . . . . . . . . . . . . . . . . . .

94

Software Architecture Design . . . . . . . . . . . . . . . . . . . . . . . . . .

98

4.3.1

Software Architecure Diagram . . . . . . . . . . . . . . . . . . . . .

100

4.4

Sequence Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

101

4.5

State-chart Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

110

4.6

Collaboration Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

116

xi

4.7

Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

4.8

Deployement Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

IMPLEMENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
5.1

Tools and Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

128

5.2

Methods Used for Implementation . . . . . . . . . . . . . . . . . . . . . . .

128

5.3

Software Components: . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

129

5.3.1

ULL and BLL Methods: . . . . . . . . . . . . . . . . . . . . . . . .

130

5.3.2

BLL Method . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

135

5.3.3

DAL Methods:

137

. . . . . . . . . . . . . . . . . . . . . . . . . . . . .

VI TESTING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139
6.1

Testing Techniques & Strategies . . . . . . . . . . . . . . . . . . . . . . . .

140

6.1.1

Black Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . .

140

6.1.2

White Box Testing . . . . . . . . . . . . . . . . . . . . . . . . . . .

140

6.1.3

Path Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.1.4

Regression Testing . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.1.5

Unit Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.1.6

System Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.1.7

Acceptance Testing . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.2

Deriving Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

141

6.3

Test Cases for AHRIS using RFID and Biometrics . . . . . . . . . . . . . .

142

VII CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 154


7.1

Pros & Cons of System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

154

7.2

Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

155

7.3

Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . .

155

APPENDIX A

SOME ANCILLARY STUFF(GUI) . . . . . . . . . . . 157

APPENDIX B

SOURCE CODE . . . . . . . . . . . . . . . . . . . . . . . 188

REFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
INDEX

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 308

VITA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311

xii

LIST OF TABLES
1

Abbreviations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

viii

Actors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

41

TableHRIS001

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

43

TableHRIS002

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

45

TableHRIS003

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

47

TableHRIS004

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

49

TableHRIS005

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

51

TableHRIS006

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

53

TableHRIS007

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

55

10

TableHRIS008

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

57

11

TableHRIS009

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

59

12

TableHRIS010

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

61

13

TableHRIS011

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

63

14

TableHRIS012

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

65

15

TableHRIS013

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

67

16

TableHRIS014

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

69

17

TableHRIS015

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

71

18

TableHRIS016

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

73

19

List of DB Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

93

20

TableTC01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

142

21

Table::Test Case 01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

143

22

Table::Test Case 02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

143

23

Table::Test Case 03 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

144

24

Table::Test Case 04 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

144

25

Table::Test Case 05 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

145

26

Table::Test Case 06 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

145

27

Table::Test Case 07 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

146

28

Table::Test Case 08 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

146

29

Table::Test Case 09 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

147

xiii

30

Table::Test Case 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

147

31

Table::Test Case 11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

148

32

Table::Test Case 12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

148

33

Table::Test Case 13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

149

34

Table::Test Case 14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

149

35

Table::Test Case 15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

150

36

Table::Test Case 16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

150

37

Table::Test Case 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

151

38

Table::Test Case 18 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

151

39

Table::Test Case 19 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

152

40

Table::Test Case 20 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

152

41

Table::Test Case 21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153

42

Table::Test Case 22 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

153

xiv

LIST OF FIGURES
1

Organization Chart of DHA . . . . . . . . . . . . . . . . . . . . . . . . . . .

HR Information System . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Basic AHRIS System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

10

Spiral Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

12

Propose System Basic Diagram . . . . . . . . . . . . . . . . . . . . . . . . .

18

System Interface1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

System Interface2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

20

Biometrics Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

Working of Biometrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

31

10

Typical RFID System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35

11

Basic System Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

42

12

Flowchart1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44

13

Flowchart2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

46

14

Flowchart3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

48

15

Flowchart4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

50

16

Flowchart5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

52

17

Flowchart6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

54

18

Flowchart7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

56

19

Flowchart8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

58

20

Flowchart9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

60

21

Flowchart10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

62

22

Flowchart11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

64

23

Flowchart12 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

66

24

Flowchart13 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

68

25

Flowchart14 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

70

26

Flowchart15 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

72

27

Flowchart16 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

74

28

Analysis Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

75

29

Use Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

76

xv

30

Project Domain Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

77

31

Data Flow Diagram level 0.1 . . . . . . . . . . . . . . . . . . . . . . . . . .

78

32

Det Data Flow Diagram level 0 . . . . . . . . . . . . . . . . . . . . . . . . .

79

33

data flow diagram level 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . .

80

34

Control Flow Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

81

35

E-R Analysis of HR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

82

36

E-R Analysis of Employee . . . . . . . . . . . . . . . . . . . . . . . . . . . .

83

37

E-R Analysis of AHRIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

84

38

Subsystem Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

85

39

Block Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

86

40

Modules of AHRIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

88

41

AS AHRIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

42

ES Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

89

43

PS Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

44

HRM Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

90

45

EDMS Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

91

46

E-R Diagram of AHRIS 01 . . . . . . . . . . . . . . . . . . . . . . . . . . .

97

47

Detailed E-R Diagram 02 . . . . . . . . . . . . . . . . . . . . . . . . . . . .

99

48

Software Architecture Diagram . . . . . . . . . . . . . . . . . . . . . . . . .

100

49

Squence::Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

101

50

Squence::Change Password

. . . . . . . . . . . . . . . . . . . . . . . . . . .

102

51

Squence::Registering Employees . . . . . . . . . . . . . . . . . . . . . . . . .

102

52

Squence::Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

53

Squence::Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

103

54

Squence::Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

55

Squence::Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

104

56

Squence::Print reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

57

Squence::Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

105

58

Squence::Attendance manager . . . . . . . . . . . . . . . . . . . . . . . . . .

106

59

Squence::EDMS login

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

106

60

Squence::Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

xvi

61

Squence::Zooming

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

107

62

Squence::Logout/exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

63

Squence::Connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

108

64

Squence::Disconnect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

109

65

Statechart::Authentication . . . . . . . . . . . . . . . . . . . . . . . . . . . .

111

66

Statechart::Change-Password . . . . . . . . . . . . . . . . . . . . . . . . . .

111

67

Statechart::Registering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

112

68

Statechart::Data-handling . . . . . . . . . . . . . . . . . . . . . . . . . . . .

112

69

Statechart::Searching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

113

70

Statechart::EDMS-Login . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

113

71

Statechart::Attendance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

114

72

Statechart::Zoom-Browse . . . . . . . . . . . . . . . . . . . . . . . . . . . .

114

73

Statechart::Exit/Logoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

115

74

Statechart::Connection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

115

75

Collaboration::User Auth . . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

76

Collaboration::Change pswd . . . . . . . . . . . . . . . . . . . . . . . . . . .

117

77

Collaboration::Registeration . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

78

Collaboration::Save . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

118

79

Collaboration::Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

80

Collaboration::Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

119

81

Collaboration::Delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

82

Collaboration::Print . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

120

83

Collaboration::Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

121

84

Collaboration::Man Attendance . . . . . . . . . . . . . . . . . . . . . . . . .

121

85

Collaboration::EDMS

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

122

86

Collaboration::browse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

122

87

Collaboration::zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

123

88

Collaboration::logout/exit . . . . . . . . . . . . . . . . . . . . . . . . . . . .

123

89

Collaboration::connect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

124

90

Collaboration::Dc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

124

91

Component Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

125

xvii

92

Deployement Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

126

93

Basic implemented Work Flow of AHRIS . . . . . . . . . . . . . . . . . . .

127

94

GUI::CLick . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

157

95

GUI::Splash . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

157

96

GUI::authentication1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

158

97

GUI::authentication2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

158

98

GUI::main . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

159

99

GUI::main1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

159

100 GUI::changePassword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

160

101 GUI::changepswd2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

160

102 GUI::changepswd3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

161

103 GUI::main11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

161

104 GUI::CAlc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

162

105 GUI::mainmenu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

162

106 GUI::logoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

163

107 GUI::definations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

163

108 GUI::definations1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

164

109 GUI::Recruitment

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

164

110 GUI::Applicantions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

165

111 GUI::main21 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

165

112 GUI::Applicants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

166

113 GUI::Selectedapp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

166

114 GUI::EmpRec . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

167

115 GUI::Emprec1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

167

116 GUI::Emprec2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

168

117 GUI::Emprec3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

168

118 GUI::Leave . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

169

119 GUI::Leave1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

169

120 GUI::Attendance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

170

121 GUI::Attendance1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

170

122 GUI::EmpPerf

171

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xviii

123 GUI::EmpPerf1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

171

124 GUI::EmpPerf2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

172

125 GUI::EmpPerf3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

172

126 GUI::EmpPerf4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

173

127 GUI::EmpPerf5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

173

128 GUI::Payroll

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

174

129 GUI::Payroll1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

174

130 GUI::Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

175

131 GUI::Search1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

175

132 GUI::Search2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

176

133 GUI::Reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

176

134 GUI::Reports1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

177

135 GUI::Reports2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

177

136 GUI-Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

178

137 GUI-Report3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

178

138 GUI-Report4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

179

139 GUI-Report5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

179

140 GUI-Report6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

180

141 GUI-EDMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

180

142 GUI-EDMS1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

181

143 GUI-EDMS2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

181

144 GUI-EDMS3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

182

145 GUI::Admin . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

182

146 GUI::Admin1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

183

147 GUI::Admin2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

183

148 GUI::Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

184

149 GUI::Help2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

184

150 GUI::Help3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

185

151 GUI::Help4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

185

152 GUI::Help5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

186

153 GUI::Attmngt . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

187

xix

154 GUI::Attmngt1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xx

187

DECLARATIONS !
The Purposed Project Automated Human Resource Information Using RFID and Biometrics is based upon new and most demanded technology that is Radio Frequency Identification
(RFID) and Thumb Identification using Biometrics. That fulfills requirements of Defence Housing Authority (Islamabad Region) HR,Attendance and Payroll System. DHA may enjoy a lot of
advantages with this technology. One of them is DHA may enhance this technology by using
on their own product, having front of them a model of this project.

This project uses RFID Kit and some other hard wares to successful implementation. So
it has been confirmed and written statement has been got that MINIMUM HARDWARE cost
will be fulfill by the DHA. After completion of Project Hardware would be property of DHA and
software would be freely available ONLY for DHA. It also has been discussed with student (Mr.
Muzammal Naseer Janjua) have copy right reserved for this software. Hardware and general
information about organization would be available as students desire.

It is also declares that as software is developed as Senior Design Project,So there will be no
cost or sale of this project.DHAs data is used for analysis purpose,the software is not only used
in single Organization.It is a general Software which can be implemented by any organization.

xxi

CHAPTER I

INTRODUCTION

In this chapter first of all i will introduce system and its brief overview and objectives.After
that proposed system will describe and the scope of the project. Then the implementation
methodology, adopted throughout the development cycle will be explained.

1.1

Project in Breif

1.1.1

Project Title

Automated Human Resource Information System(AHRIS) Using RFID and Biometrice.


1.1.2

Project Area

This project belongs to the broad area of Software developement and Engineering . More
specifically it lies in the domain of Wireless Communication,Security and Database Management.
1.1.3

Problem Definition

This Project is a case study of well known organization DHA Islamabad.To create a software which automate the different systems and provide high level authentication to the
firms and organization.It focuses on the main systems of any organization
1)Human Resource Manager
2)Employee Record Manager
3)Payroll System
4)Authentication and Security
5)Automated/manual Attendance System
6)Reporting

1.1.4

Supervisors

External Supervisor:
Mr.Abdullah Bin Qadeer
(Doing Phd(in progress))
Head of Nettech Technologies pvt limited.
Contact No:

0323-6388324

1.2

Literature Review of existing system from some universities

In this section literature review from some of the projects from universities,these projects
have a co relation with this proposed project.
Project 1 : ATTENDANCE & PAYROLL SYSTEM FOR MIA ENTERPRISES THROUGH RFID(MCS FYP)
Developed by:
Muhammad Abid(Reg. # 998-CS/MCS/05) Khurram Nazir(Reg. # 987-CS/MCS/04)
Department of Computer Science,Faculty of Applied Sciences,
International Islamic University Islamabad (2007)
Abstract : Authenticate and manage Attendance and Payroll through RFID.Only
RFID !

Project 2 : Record Management System of Shah Traders (MCS FYP)


Developed By:
Rafhan Quereshi
Amir Murtaza
Department of Computer Science,Allama Iqbal Open University, H-8, Islamabad 2006
Abstract : To keep and manage record of a orgranization.No Authentication !
Project 3 : ACCESS CONTROL AND SECURITY SYSTEM USING
RFID
Submitted by
G.GOVARDHAN REDDY, M.PRASHANTH, P.SURESH RAJ, P.VINOTH,

Department of E & computer Science,ANNA university chennai.2006


AbstracT:To allocate RF tags and identify Users.
Proposed project is....
Automated HR information System Using RFID and Biometrics
Submitted by
M.Muzammal Naseer Janjua
(1339-FUIMCS-BSSE04)
Department Of Software Engineering And Computer Science Foundation University
,Pakistan
AbstracT:To Automate Flow of information system in organization of HR department with authentication using RFID and Biometrics.To organize automation of Attendance System with Recruitement department,Employees,Electronic Data organization.
For Further Detail : Refer to Abstract Section [Page Vi] of this Document.

1.3

Introduction to Organization(DHA)

An Housing and Engineering base Organization DHA(Defence Housing Authority) a Private Limited Company incorporated in 2002 as DHI.It became authority in 2005,so its
known as DHA now. Organization has different branches in different cities of Pakistan and
also in Middle East. Its corporate office exists in Islamabad.
DHA islamabad concerned with developing an applying different approach in the field
of Housing and Plotting disciplines. It provides the solution and fulfills the most demanded
and valuable contemporary demands of public.
An Housing & Plotting based organization provides total solutions for Residential, Commercial as well as Industrial Livings,with all necassary needs of living.DHA Have a healthy
amount of skilled workers, brilliant team of professionals dedicated to Business Management, Finance and Engineering Services.
DHAs Vision
To be a dynamic and Leading Organization with Vision & Strengths of quality.
To be an ultimate choice of the customer with reliable product at affordable cost.
A total customer satisfaction, is pre-determined goal, focused by the management,
to make it thus attainable.
In order to ensure full utility and comfort to the customers, a team of qualified &
factory trained Engineers are working.
1.3.1

Projects of Orgranization

1. Phase-1 Compromize of....2000 plots


2. Pahse-2 Compromize of....8000 plots
3. Phase 1 ext
4. Phase 2 ext
5. Overseas Sector
5

Recently launched Project by DHA


1. DHA Villas
2. DHA Valley
3. DHA Valley overseas Sector
4. DHA Homes
5. DHA Buisness Bay
DHA has established different department to fulfill the desired needs of Organization.So
to manage all the need of mainpower,HR department was established for smooth functioning
of organization.
1.3.2

Organizational Chart

Figure 1: Organization Chart of DHA


This is the Main Departments Organizational chart of DHA,in this project we are only
covering automation of HR department.

1.3.3

Human Resource System

The Human Resources Management (HRM) includes a variety of activities, and key among
them is deciding what staffing needs you have and whether to use independent contractors or
hire employees to fill these needs, recruiting and training the best employees, ensuring they
are high performers, dealing with performance issues, and ensuring your personnel and
management practices conform to various regulations. Activities also include managing
your approach to employee benefits and compensation, employee records and personnel
policies. Usually small businesses (for-profit or nonprofit) have to carry out these activities
themselves because they cant yet afford part- or full-time help. However, they should
always ensure that employees have and are aware of personnel policies which conform
to current regulations. These policies are often in the form of employee manuals, which all
employees have.[7]

Figure 2: HR Information System


The HRM have undergone tremendous change over the past 20-30 years. Many years
ago, large organizations looked to the Personnel Department, mostly to manage the paperwork around hiring and paying people. More recently, organizations consider the HR
Department as playing a major role in staffing, training and helping to manage people so
that people and the organization are performing at maximum capability in a highly fulfilling
manner.
HR in DHA
Currently HR dept in DHA has manual system or Excel management system.This department need automation for quick process of work and smooth functioning to the organization regarding multiple aspects.HR Department as playing a major role in staffing,
7

training and helping to manage people so that people and the organization are performing
at maximum capability in a highly fulfilling mannener.
So, to achieve all the required needs of this department which are discussed in Background chapter,AHRIS using RFID and BM is proposed and it works on
1. Applications
2. Applicants
3. Employee Manager
4. Leave Manager
5. Payroll Manager
6. Attendance Manager
7. Desicpline Manager
8. Reporting Manager

1.4

The Project

1.4.1

Objectives

The objective of this project is to develop a Automated management system which implements the ideology of different Management System and the most advance Electronic
Documents Management System with Automation of Attendance System to produce more
reliability to organizations . It will be an easy to use management tool to help todays managers to successfully built record and monitor Employees. Main objective of the projects
are:
Human Resource Management System,which enroll new employees and also check
whether the employee is still in organization or resigned.
EDMS , which stands for Electronic Documents Management System.All scanned
orginal Documents are kept in this management system.
Payroll System , Daily,Weekly and Monthly report of Employees generated.Payroll
System will ensure the exact calculation for the monthly salary of Employees.
To develope Automated Attendance System,When a registered user entered in the
primises of the organization he / she may have to authenticate him/her self through
Biometrice and RFID device.
To provide GUI (Graphical User Interface) to help users to easily use the software to
manage their projects.

1.4.2

Project Overview

This system is designed and developed based on the following organizational requirements.
The software will be only be used by authorized person. i.e. administrator or user
created by the administrator.
Attendance can be marked with or without RF cards.
The reports which produce not only be automatic but the user will be able to select
a choice for the report generation.
The software will be capable of having Encrypted information of an employee.
Having manual and automatic Attendance options
Computer generated reports
No need to show/Swap RF cards, no need more registers. *(Depends H/W Range)
The System will have a single centralized database and all of its module will be connected
with each other through that database.

Figure 3: Basic AHRIS System

10

1.4.3

Project Scope

The scope of this project Automated HR Information System using RFID and Biometrice is
very immense.This system will enable the managers and teams working on several projects
at different sites to keep themselves well-versed of the updated information.This System
has many capabilities to resolve different scenarios in a well organized envirnoment.
Also using wireless and Thumb identification technology make the project more industrial
and worth keeping.The System Also provide Different reports of recorts on Daily,weekly
and monthly bases by using the most advanced tool Crystal Reports.So Reporting is easily
available for Admins.When an employee enters will show his card then attendance will mark
with time , date etc and also application will show the status of the employee. (Either this
will IN or OUT, while first time when employee show his card then status will IN and at
the second time this will OUT).

AHRIS is capable of

1-Software
i -Automated Attendance System.
ii -More Secured using Thumb identification.
iii-Human Resource Management System(HRMS).
iv -Payroll System(PS).
v -Electronic Documents Management System(EDMS).

2-Hardware
i - RFID for Authentication and Enrollment.
ii - Biometrice(Thumb Identification) for Authentication.

11

1.5

Developement Process Model

The process model used for the development of HRIS using RFID and Biometrics System is
Spiral Model. The Spiral Model was designed to include the best features from the Waterfall
and Prototyping Models, and introduces a new component - risk-assessment. The term
spiral is used to describe the process that is followed as the development of the system
takes place. Similar to the Prototyping Model, an initial version of the system is developed,
and then repetitively modified based on input received from customer evaluations. Unlike
the Prototyping Model, however, the development of each version of the system is carefully
designed using the steps involved in the Waterfall Model. With each iteration around the
spiral (beginning at the center and working outward), progressively more complete versions
of the system are built. [14]

Figure 4: Spiral Model


Risk assessment is included as a step in the development process as a means of evaluating
each version of the system to determine whether or not development should continue. If
the customer decides that any identified risks are too great, the project may be halted. For
example, if a substantial increase in cost or project completion time is identified during one
phase of risk assessment, the customer or the developer may decide that it does not make
sense to continue with the project, since the increased cost or lengthened timeframe may
make continuation of the project impractical or unfeasible.
The Spiral Model is made up of the following steps:
Project Objectives. Similar to the system conception phase of the Waterfall Model.
Objectives are determined, possible obstacles are identified and alternative approaches
are weighed.

12

Risk Assessment. Possible alternatives are examined by the developer, and associated risks/problems are identified. Resolutions of the risks are evaluated and weighed
in the consideration of project continuation. Sometimes prototyping is used to clarify
needs.
Engineering & Production. Detailed requirements are determined and the software is developed.
Planning and Management. The customer is given an opportunity to analyze
the results of the version created in the Engineering step and to offer feedback to the
developer.
Throughout the development of this Project spiral model has been followed after analyzing its benefits in use and problems it addresses.

1.6

Proposed System

1.6.1

Motivation

21st Century make a great change in the technology and to live in this world,one have to
keep in touch with emerging technologies round the globe.In Computer Science and Software
Engineering field changes are not on daily bases they are on millisecond bases.So,keeping in
mind this motivate to automate the manual system and to provide more secure and reliable
systems to clients.With reliablity one has to keep in mind to make it validity and availibility
very long.
Though the globalization has change the world in many aspects,but still implementation is
the main need to improve old systems.Manual Systems are changed in to Dynamicity but
still not reliability.Bar Codes,touch screen and many other technologies are now converted
into wireless and Softwares are more intelligent,they interact with the hardware and catch
the changes provided by hardware.
Old manual systems though they are computerized but still not automated motivate me
to develope this projectAutomated Human Resourse information System Using Biometrice
and RFID which resolve many problems which are faced by organizations.This covers the
13

Wireless technology with thumb identification and covers a huge area of Software Science
which is used to develope a integrated Management System.
1.6.2

Proposed system benefits

In AHR & MS Biometrice & RFID all the tasks are being completed in manual system will
be able to perform in computerized fashion. This automated system has lots of benefits as
compare to manual system. Some of these major benefits are,
User friendly automated environment
RFID Layers are not dangerous for Health
Double Authentication System
Thumb Identification System for Biometrice
Short Listing of Selected Candidates
Easy to Installation of hardware
Abstract Data Security
An Evolvable/Portable/Verifiable Standard Long life Hardware/Software
A Completely Robust Software
A Complete Reliable Auto Attendance Management System
Every time Updated Information available
A 100% Reliable System
Having Manual and Automatic Attendance options
User defined pay cycles for time card entry
User defined voluntary deductions and taxable status

14

User defined deduction schedule and yearly progress


Detailed employees history
Less Electricity (Power )Consumption
No more Signatures / files and 2nd time Attendance Registers
A Standard/valuable/new technology meeting software
No need to Show/Swap cards, No need more registers
1.6.3

Proposed System Features

These are only software related features,(excluding Automation of Attendance features)


Security Manager
login
Password

Definations
Religion
Sector
Rank
Qualification pay
Allownces
Leave types
Cources
Appoinments

15

Domicile
Performance pay
Directorates
Applications Manager
Job Applications
Short-list Applicants
Selected Applicants
Employee Manager
Personal Details
Education History
Employee ID card
Employement Record
Employee contract
Leave/Attendace Manager
Leave Application
Attendance
Employee Performance Manager
Verification
Descipline
Suitability Report
16

Employee Performance review


Search Manager
Employee general query
Leave query

EDMS Manager
Electronic Data Management System
Reporting Manager
Appoinment
Applicants
Employee personal record
Employee report
No of years Report
Employee service calculator
Leave reports
Attendance reports

17

1.7

Project Overall Description

This section describe Project overall description as well as with software specification of the
system.The idea of the whole system is shown in basic system diagram.
1.7.1

Basic System Diagram

Figure 5: Propose System Basic Diagram

1.7.2

System Operational Modules

Module #01: Receptionist View


RF reader has embedded antenna that transmits radio rays continuously, whenever employees with RF tag enters in the organization. He/She passes card from RF reader. Dumb
devices (Reader/Monitors) would be in working condition at main entrance/Reception or
any place as well in HR department. Readers antenna read these numbers. And Update
statuses of employees by displaying IN/OUT title with speaking facility according to his/her

18

enter/exit status.All process is automatically done.

Module #02: Biometric Authentication


When a registered Employee enters into the arena,he/she may have to authenticate him/herself
through Biometrics Thumb identification device.This device uses database of registered employees at backend,it identify the thumb and allow the employee to enter into arena.
Module #03: Allocation of RF Tags
Processed Form by the DEO is available for HR work. HR verified/match the enter
data with form. He may reject a form for again DEO phase. In-case of allocation of RF tag
HR can assign a valid RF tag to this form. He can allocate an Encrypted Tag id to this
form (for feature addition).
Module #04: EDMS Hall
Newly entered employee get there job/department by the Administrator.Electronic Data
Management System (EDMS) scan their images and upload it into database.This hall has
scanner available for this purpose,Only administrator can view,edit and scan these images.
Module #05: HR Server Room
This server has got almost all the available options,all subsytem are directly connected to
this system to perform their desired actions.Employees records,Payroll,deductions,attendance,desciplanary
cases etc are available here.All automation is updated in this server room.At any time or
at the end of a month a user can check his attendance and pay details.
Module #06: Data Entry Halls
Data Entry operators are available in Data entry halls,all data related to employees,applicants etc will be entered by Data entry operators.DEO have limites access to the
database and have only those rights which are assigned by the Administrator.

19

1.7.3

System Interfaces

The product has the following system interfaces:


A system interface for launching the application at the server side. In the screenshot
below the application can be launched by clicking the PjHRIS icon.

Figure 6: System Interface1

A system interface after launching the application. In the screenshot below the application can be launched by clicking the PjHRIS icon.

Figure 7: System Interface2

20

1.7.4

User Interfaces

For Detailed User interfaces Refer To Section User Manual Starting from Page : 155
1.7.5

Hardware Interfaces

Following are the hardware interfaces of our system:


Thumb Identification: Biometrics use Thumb identification,as every person will have
its own thumb identification.
RF ID: A unique RF ID will be assigned to each User.
RFID Card: A Radio Frequency identification card is a punch card which connects
to a RFID system,it connects with reader wirelessly.
1.7.6

Software Interfaces

The system will consist of a software interface that will provide connectivity with the
database management system (MS Access or ORACLE). The database will used for storing
user information, user records,etc.
1.7.7

Memory

The memory requirements for the server and client are as follows:
Server
The server should have at least 256mb of primary memory for efficient working and
20mb of secondary memory (excluding Database memory requirements).
40 Gb of Harddisk.
1.7.8

Operations

The basis operations of the system are as follows:


All basic operations like authentication,automation of attendance,payroll,employees
record,employee history,Cases etc.

21

All basic Searching operations like Searching by name,searching by ID etc.


Records saving on the server.
1.7.9

Site Adaption Requirment

Since the communication in the project is based on Radio Frequency waves, so it is necessary
to have a site which is free of RF noise.
An environment having high voltage power lines, high voltage transformer,boosters or
generators will generate a lot of RF noise which might lead to problems in communication
between the users and the authentication server.
1.7.10

User characteristics

The product is aimed for users who have enough knowledge of using a Desktop Applications
or a Database applications .As this product is specifically for DHA,so it is required for them
to hire desired persons.
1.7.11

Software System Attributes

Reliability
To provide reliable communication and avoiding noise, we will not use the wireless carrier
to its full capabilities in terms of range.Mark attendance and also manage record should be
handled automatically as well as manually and data will be consistent.
Availability
To make all the features of the system available to the legitimate user, we will limit the
number of simultaneous rights. This will ensure the availability of all the services to the
active user. Again the number of simultaneous rigthts can be increased by the administrator
at any time.
Security
Following are the points which will ensure security of the system:

22

Each user will be authenticated with a help of a username and password.


The built in security facility of the Thumb identification will also be used.
Since the availability of the service is limited to an organizational users, so this fact
also reduces the security threats to the system.
Maintainability
The system will be designed and implemented on the principles of Object Oriented Software
Engineering. Following the Paradigm will increase System Maintainability.

23

CHAPTER II

BACKGROUND
2.1

Detailed Study of Existing System

The detail study of the Existing System was carried out through a series of meetings with
the manager and staff workers of the departments of the organization.Beside that also
the existing system documents was thoroughly studied to understand the existing manuals
systems of DHA islamabad .
To understand the complexity of the existing system, not only adopted the functional
analysis approach, but the entity analysis considerations were also applied. This combination of modern analytical techniques provides in depth understanding of the existing system.
Following are the guiding principle of the methodology: Interaction with the managers and the related persons handling the manual system.
Observations of actual working in the office.
Inspection of routine documentation and records.

2.2

Survey of the Existing Systems at DHA isb

Afterwards,keeping in mind the background of the company a survey of the existing system
is arranged.This survey was taken for different departments to fullfill the required need of
the company.
Although the DHA Islamabad is a big company with different departments,every department need different softwares to manage the system.But due to less time,i focused on
their some systems,whih require a need to meet the ongoing technology.SO,in this survey
following systems were focused and observed .

24

2.2.1

Attendance System

Manual Attendance system,which itself leads to many problems. Manual system is difficult to manage as will as difficult to maintain.A register was placed on reception table and every employee has to mark his attendance with signature,which is very old system.Beside that,there is no security else the availabity of the person on the reception table
is must.otherwise attendance can be marked by other person very easily.
So,the need was to computerize the Attendance system,but also make an Automated
Attendance System which fullfill the requirment of the security with automation of the
attendance.which may or maynot require any operator to authenticate the users.
2.2.2

Recruitment System(HR Department)

Human Resource Department plays very important role in any organization or company.Many
Tasks depends on this department.Current sytem in DHAs HR department has manual system for taking Applications from the applicats and processing them.The manual process is
very slower. All the processes including approval takes a handsome amount of time.
Though it is computerized in Excel sheet ,but its not reliable nor sufficient.So the need
was to develope a application which is user friendly to the department and which is able
to fulfill all the needs.So some meetings are taken with the department and different works
are observed to come across some good solution.
2.2.3

Employees Record System

Moving to the Record system of employees,all employees were listed in a register and in a
excel sheet files.There was no secure managed system for the record,so in case of physical
damaged to the data, which is most precious, asset of an organization, there is no mean
(backup and recovery procedure) to recapture the damaged data. All employees Personal
Details,Educational history etc was manually stored somewhere,and The data stored is
insecure in files and ledgers. Anyone can modify the entries in the Vouchers or Ledgers
in manual system. Data can be stolen from files or files can physically be misplaced or
damaged.

25

2.2.4

Reporting System

In manual system reports preparation is very laborious job. Moreover adhoc reports required
by the organization in certain situations, manual system gives no provision for adhoc reports.Reporting is very essential for managers and heads to keep in track all the employees
but in manual system is very difficult job.So a need was to have a very good reporting
system which have daily,weekly and monthly reporting system.
2.2.5

Documents System

The current manual system is not efficient. A lot of time is being spent for searching even
a single record. General and high priority documents that need frequently attention are
also treated haphazardly. No one can find out the desired document easily without the
concerned person. It is because that each record has to be checked. Moreover, if a report is
needed to generate, it takes a long time due to manual searching and processing of records.
In manual system the same information is stored at more than one place. Same data
are recorded at many different places. This not only leads to invalid data processing but
also consumes the data storage place. The data can be updated at one place while there
is another place where same data is placed but not updated. This causes weaknesses in
system.
2.2.6

Payroll System

Payroll System has many mathematical calculations and also depends on other factors,for
example on attendance basis etc.But in manual systems All the mathematical calculations
are carried out manually that can cause errors. The result complied by the individuals have
errors that, when detected take a lot of time for corrections and chance of errors increases
with the increment of data.
2.2.7

Security System

DHA Islamabad has army personnels which act as security,but what about security of
departments?What if the right person is entering in wrong department?These questions
cause insecurity in manual system. The security is very poor in the manual system. There

26

is no security to protect the illegal users to the secret and important data, even the data
storing files of paper can physically be misplaced or damaged.
Authentiation is the necassity of the deparments,so that only the registered persons can
entered into their departments.All deparments need some sort of secured enteries,and for
that hardware an automated software is needed which act accordingly and managed the
system.

2.3
2.3.1

Draw backs in existing system


List of Drawbacks

The following are the major drawback of existing system.


2.3.1.1

Exhaustive and time consuming system

DHA has a healthy amount of employees that are divided into different Departments. Normally labours located in Warehouse department while other remains in Engineering,IT,
Managements and Finance departments. Managing Human Resource ,Payroll and Attendance in all departments is really a very critical and exhaustive job.
2.3.1.2

Not detailed system

DHA has its manual Employee Attendance System. An employee must have to sign on a
particular register for proving his availability in the Organization. There is no proper check
and balance system (Coming and Out going time) for an employee.
2.3.1.3

Manual system

DHA has health amount of employees. Organization also has friendly atmosphere with
different options for their employee to late sitting, voluntarily sitting and late with paid
sitting. In Contemporary situation managing pays and attendance is being performed into
to TWO Registers or Excel Sheets. One Register is reserved for morning attendance and
other one is for after noon (after Lunch).

27

2.3.1.4

Does not maintains history

There are different categories of employees in the organization few one are technical and
others are in finance/management. Monthly salary is being paid by manuals system. There
is a standard amount that is being paid by hand to its employee. And other one is getting
paid by their banks after deduction of taxes, sur-charges and etc. Existing system does not
provide ordinary checks/slips and monthly details.
2.3.1.5

Employees availability problem

According to Organization internal departments a Staff may be available at different time


on different departments or even out of Organization. Often seeker/visitor faces problems
to meet with particular employees.
2.3.1.6

Not proper check and balance

Different departments have different kind of staff some one have Only Contractual and some
one are Permanent. DHA has its manually Employee Attendance System. According to
Job status person are being paid. While contractual employees in/out time Organization
demands critically. Still there is no proper check and balance system just having few
registers.
2.3.1.7

Does not satisfies organization standard

DHA has well name in the name of national and International Organizations. So Organization must meet with its Standard. Like Auto Attendance/Online product/Employee
Management System.
2.3.1.8

More chances of errors

There may be mathematical errors while generating bills manually therefore customers and
department may suffer. In manual system errors are very common.

28

2.3.1.9

Inconsistent Data

Due to redundancy inconsistency arises when data item is changed at one place and this
change is not reflected at all other redundant places.
2.3.1.10

Not Online/web supported

Existing system is exhaustive/time consuming, Not web supported and not detailed.
2.3.1.11

Un-reliable/Obsolete system

Obsolete/un-reliable i.e. old system managing user data/attendance on Registers/Papers.

29

2.4

Literature Review of The Existing System and Technologies

Before moving forward,it is better to have a quick literature review of the existing systems
and technologies.
2.4.1

Biometrice Technology

Biometrics refers to two very different fields of study and application. The first, which is the
older and is used in biological studies, including forestry, is the collection, synthesis, analysis
and management of quantitative data on biological communities such as forests. Biometrics
in reference to biological sciences has been studied and applied for several generations and
is somewhat simply viewed as biological statistics. [12]
More recently and incongruently, the terms meaning has been broadened to include the
study of methods for uniquely recognizing humans based upon one or more intrinsic physical
or behavioral traits. Biometrics are used to identify the input sample when compared to a

Figure 8: Biometrics Chart


template, used in cases to identify specific people by certain characteristics.
possession-based
using one specific token such as a security tag or a card
knowledge-based
the use of a code or password.
A biometric system can provide the following two functions:
30

Verification
Authenticates its users in conjunction with a smart card, username or ID number. The
biometric template captured is compared with that stored against the registered user either
on a smart card or database for verification.
Identification
Authenticates its users from the biometric characteristic alone without the use of smart
cards, usernames or ID numbers. The biometric template is compared to all records within
the database and a closest match score is returned. The closest match within the allowed
threshold is deemed the individual and authenticated. [12]

Figure 9: Working of Biometrics

Uses and initiatives


Biometric technology was first used at the Olympic Summer Games in Athens, Greece in
2004. On registering with the scheme, accredited visitors will receive an ID card containing their fingerprint biometrics data that will enable them to access the German House.
Accredited visitors will include athletes, coaching staff, team management and members of
the media.
Wolfgang Schuble in the March 2008 edition of its magazine Datenschleuder. The magazine also included the fingerprint on a film that readers could use to fool fingerprint readers.
Several banks in Japan have adopted palm vein authentication technology on their
ATMs. This technology which was developed by Fujitsu, among other companies, proved
to have low false rejection rate (around 0.01%) and a very low false acceptance rate (less
than 0.00008%).
31

The Nigerian Government has now rolled out fingerprint recognition throughout its
airports in fights to reduce passport fraud. All new passports distributed now have a
biometric chip containing the individuals characteristic in encrypted template form.
The United States government has become a strong advocate of biometrics with the
increase in security concerns in recent years, since September 11, 2001. Starting in 2005, US
passports with facial (image-based) biometric data were scheduled to be produced. Privacy
activists in many countries have criticized the technologys use for the potential harm to
civil liberties, privacy, and the risk of identity theft. Currently, there is some apprehension
in the United States (and the European Union) that the information can be skimmed and
identify peoples citizenship remotely for criminal intent, such as kidnapping. There also are
technical difficulties currently delaying biometric integration into passports in the United
States, the United Kingdom, and the rest of the EU. These difficulties include compatibility
of reading devices, information formatting, and nature of content (e.g. the US currently
expect to use only image data, whereas the EU intends to use fingerprint and image data
in their passport RFID biometric chip(s)).

32

2.4.2

Existing Technologies and need of RFID

We have seen the security personnel checking the employees identification cards at the
entrances to avoid illegal entry. The employees sign a register at the entrance before getting
in. This is still being practiced in most of the companies.
However, the disadvantages are that, when there is a necessity of providing control at
many locations inside the company, a person at each point will not be an economical way
of implementing it.
Then came were the punch cards. Employees possess cards, which are punched when
they enter into the building. But it had disadvantages. Workers started to practice buddy
punching, for their co-workers.
Concerns about buddy punching-the practice where employees fraudulently clock their
co-workers in or out to give them credit for time that wasnt actually worked-led Continental
Airlines to implement a fingerprint ID system to augment their automated employee time
and attendance recording system. The company expanded the system from Control Module
after it saved an estimated $100,000 in the first year. This led to the bar code readers.
It is a much common sight to see a bar code reader in the companies. These are used to
check with the employees identification. The employees swipe the card in the provided slot.
Then the access is given after checking the authenticity of the card. This was a substitute
to the security and emerged as a new technique in access control. This acted as a starting to
the automation of the access control. But, the bar code readers are contact readers where,
the cards are required to touch the readers.
With growth of technology and giant leap in the field of Radio frequency transmission,
a requirement for the same application using RF is desired.
A further improvement is the RF ID card technology, which uses contact less card
readers. Bringing the card nearer to the reader suffices for the reader to read the contents
of the card. This simplifies the usage for the employees. This technology is crawling into
the companies and has the potential to substitute the preceding technologies.

33

2.4.3

RFID Technology

RF technology is used in many different applications, such as television, radio, cellular


phones, radar, and automatic identification systems. The term RFID (radio frequency
identification) describes the use of radio frequency signals to provide automatic identification
of items.
Radio frequency (RF) refers to electromagnetic waves that have a wavelength suited
for use in radio communication. Radio waves are classified by their frequencies, which are
expressed in kilohertz, megahertz, or gigahertz. Radio frequencies range from very low
frequency (VLF), which has a range of 10 to 30 kHz, to extremely high frequency (EHF),
which has a range of 30 to 300 GHz. [1]
RFID is a flexible technology that is convenient, easy to use, and well suited for automatic operation. It combines advantages not available with other identification technologies.
RFID can be supplied as read-only or read / write, does not require contact or line-of-sight
to operate, can function under a variety of environmental conditions, and provides a high
level of data integrity. In addition, because the technology is difficult to counterfeit, RFID
provides a high level of security.
RFID is similar in concept to bar coding. Bar code systems use a reader and coded
labels that are attached to an item, whereas RFID uses a reader and special RFID devices
that are attached to an item. Bar code uses optical signals to transfer information from the
label to the reader; RFID uses RF signals to transfer information from the RFID device to
the reader. Radio waves transfer data between an item to which an RFID device is attached
and an RFID reader. The device can contain data about the item, such as what the item
is, what time the device traveled through a certain zone, perhaps even a parameter such as
temperature. RFID devices, such as a tag or label, can be attached to virtually anything from a vehicle to a pallet of merchandise. [5]
RFID technology uses frequencies within the range of 50 kHz to 2.5 GHz. An RFID
system typically includes the following components:
An RFID device (transponder or tag) that contains data about an item

34

Figure 10: Typical RFID System


An antenna used to transmit the RF signals between the reader and the RFID device
An RF transceiver that generates the RF signals
A reader that receives RF transmissions from an RFID device and passes the data to
a host system for processing

35

2.4.4

List of Observed Needs

In this section all the required needs are listed to develope a good new software from existing
system.The whole list is generated after a large survey of the existing systems.
Following is the list of Managers required
Attendance Manager
Daily Attendance
Weekly Report
Monthly Report
Leave Application
Recruitment Manager
Job Applications Handling
Short Listed Candidates
Selected Candidates
Employee Record Manager
Personal Details Management
Employee Record
Education History
Employee ID Card
Employee Contract
Employee Performance Manager
Verification
36

Discipline
Employee New Status
Employee Performance Review
Record Searching
Search By Name
Search By ID
Search by Document ID
Reporting Manager
Employee Reports
Performance Reports
Attendance Report
Payroll Manager
Weekly Calculations
Allownces
Monthly Payrolls
EDMS
Electronic Documents System

37

CHAPTER III

REQUIRMENTS & ANALYSIS

Requirements are capabilities and conditions to which the system must conform. A prime
challenge of requirements work is to find, communicate, and record what is really needed,
in a form that clearly speaks to the client.
Analysis emphasizes an investigation of the problem and requirements, rather than a
solution. Analysis is best qualified, as in requirements analysis that means investigation
of the requirements. Object-Oriented Analysis is an emphasis on finding and describing the
objects or concepts in the problem domain.
This chapter describes the Actors involved in the system,use cases,flow chart, analysis
model of the system. It explains the problem domain, requirements of the software, usecases and actors, and association Diagram of the system.
The requirements are divided into two parts.

3.1

Functional Requirements

Functional requirements are explored and recorded in the Use-Case model. Functional
requirements express the functions of the system that should be efficient, robust and simple
to use.
System Provide a form for Data Entry Operator (DEO)
On the basis of this form DEO will enter data.
After DEO work, Human Resource (HR) will assign a RFID Tag to this form.
DEO and HR can skip (a Scanned Image) form if form is not well Scanned or incorrect
data entered by DEO.
Form skip by DEO can be Re-set or Deleted by the Scanner.

38

Administrator assign jobs, Controls authorized users, Manage salary, and change job
status; manage advance, allowances, leave etc (almost all work).
Systems particular account will be providing ability to mark attendance through
RFID chip embedded card.
Authentication can be taken place by thumb identification system using Biometrice
device.
System generate different type of reports as required by the department,e.g diciplanary,daily attendance,record etc.
Data is scanned and managed through EDMS tool.
Provide ability of display attendance with speaking ability when employee entered or
exit.
Provide ability to employee to login and can check his/her history.

3.2

Non Functional Requirements

It is helpful to use supplementary specification of the system to reduce the risk of not
considering some important fact of the system. Some of these requirements are non functional requirements or quality requirements. These requirements have a strong influence on
the architecture of a system. Some non functional requirements of AHRIS using RFID &
Biometrice are as under:
3.2.1

Usability

Speed, ease, and error-free processing should be paramount in OAHRIS using RFID &
Biometrice of DHA islamabad.
3.2.2

Human Factors

Text should be easily visible for the user.


Should be avoided colors associated with the forms of color blindness
39

Special training should not be required for user; every user who is familiar with the
database can use this software.
3.2.3

Reliability

Mark attendance and also manage record should be handled automatically as well as manually and data will be consistent.Automation and Datawaring is also automatic,for example
if employee has resign, the search will automatically show his absence.
3.2.4

Performance

Employees management and Short listing of applicants should be done quickly.Users want
to complete payroll processing very quickly. System should be quick responsive for different
types of operations like calculation of overtime payments, Tax calculation and accessing
data from remote location.
3.2.5

Implementation Constraints

AHRIS using RFID & Biometrice insists on Microsoft Visual technologies and powerful
DBMS like Oracle 9i with Microsoft Acces, predicting this will improve portability and
supportability in addition to ease of development.
3.2.6

Documentation and Help

Documentation regarding the working of software, user manual, installation and administration should be provided.
3.2.7

Noteworthy Hardware

Pentium IV or above is proposed for AHRIS using RFID & Biometrice of DHA islamabad.
128 MB Ram or above is proposed for AHRIS using RFID & Biometrice of DHA
islamabad.
3.2.8

Error Handling

System should handle errors by displaying error messages if error occurs.

40

3.3

Actors

Actors
Name
User

Type
Primary

Operator

Primary

DB Admin

Primary

Description
The user can perform the following functionalities:
-Show card to RFID reader.
-Identify through Thumb identification system
-Enter Login
-Enter Password
-View Attendance record
The Operator can perform the following operations
at the server:
-Register/Deregister users
-Search Records of users
-Enter/view/edit/delete Employee Record.
-print Employee Record.
-Enter/view/delete Applicants Record.
-Enter/view/delete All Reports.
-Scan Images.
-View/delete Attendance Record.
-View Online Attendance.
-Calculate Payrolls.
-Leave record managing
-Allocate Tag IDs
The HR Admin can perform the following operations
at the server end:
-Connect/disconnect Devices.
-Register/Deregister users
-View connected users
-View/Search log by user id, name, type
-Assign username and rights.
-Reset Password.
-Manage Definations
-Check Disciplonary History
-View/delete Attendance records
-View/delete EDMS .
-Check Employee performance.
Table 2: Actors

41

3.4

System Diagram

Figure 11: Basic System Diagram

42

3.5

Use Cases Description(flow-chart)

This sections covers the description of all use cases followed by the flow charts of their
descriptions. [15]

1.User Authentication

Name
Number
Type
Pre Condition
Post Condition

User Authentication
HRIS001
Base
User Must be registered and System is Operational
The validate user logs in to access the system and
perform its required work.
User & System
1.Enter Login name
2.Enter Password
3.If login Name and Password is valid show main
screen
4.If wrong information is entered user will be prompt
to relogin.
System Generate Error Message or Exit
Authenticate User and provide security to the system
and Allows the user to access the system
N/A
N/A

Actors Involved
Basic Course

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. User runs the application

System Responce
2. System displays the login form to enter the user
name and password.

3. User enters the user name and


password and clicks Ok button.

4. System displays the application window to access


it.

Table 3: TableHRIS001

43

Flow Chart-Use Case 01

Figure 12: Flowchart1

44

2. Change Password

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Change Password
HRIS002
Base
User must be Logged in
User can change only its own Password
Operators & admins
User request to change his Password for making secure his account.
1.Logged in
2.Enter old Password
3.Enter new Password
Generate Error Message
,invalid old Password
Allows the user to change password as many
times as he wants.
N/A
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1.User chooses change password
from menu or clicks
change password button.
3.User enters old password,
new password and
confirm new password

System Responce

2. System displays the corresponding form..

4. System verifies information and displays a message


to inform that the password has been changed.

Table 4: TableHRIS002

45

Flow Chart-Use Case 02

Figure 13: Flowchart2

46

3.Registering Employees

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Registering New Employees


HRIS003
Base
Employee should be hired person of organization
Employee will be registered to use system
Operator,System & Administrator
1.Employee ID is must
2.Enter Information about Employee
3.Assign rights to Employee
4.Register Employee in DB
Generate Error Message
Register Users to access information
and load information of Employee
N/A
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1.Operators select to Enter
Employee record from menu
3.Operator enters All information,
about Employee and
submit it into Database

System Responce
2. System displays the corresponding form..

4. System verifies information and displays a message


to inform that the fields are updated in the Database.

Table 5: TableHRIS003

47

Flow Chart-Use Case 03

Figure 14: Flowchart3

48

4.Save information

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Save Information
HRIS004
Base
Record is available to save.
Record saved.
Operator,Administrator
1.Click On Employee Register
2.Enter Data in Fields
3.If valid data is not entered,Generate Error message
4.Valid Data submition should update the DB
Generate Error Message,invalid information entered
User can save the record in the database for future
use
Valid data in desired fields.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Record entered in the fields.
3. Operator click the save button.

System Responce
2. Save button enabled.
4. System verifies information and Record has been
saved..

Table 6: TableHRIS004

49

Flow Chart-Use Case 04

Figure 15: Flowchart4

50

5.Search Record

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Search
HRIS005
Base
Administrator,Operator must be logged in
Searched record is found
Operators, Administrator
1.Click On Search
2.Search By id or Name
3.Record found and display results
Generate Error Message,Record not found
To search the desired record
N/A.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator log in. .
3. Administrators selects the
search option and choose/provide
necessary detail either search
by emp id or
search by Name
then press search button

System Responce
2. System displays the administrator search form.

4. System displays the desired result with different


options..

Table 7: TableHRIS005

51

Flow Chart-Use Case 05

Figure 16: Flowchart5

52

6.Edit Information

Name
Number
Type
Pre Condition

Edit
HRIS006
Base
Record is present in the database which is to be
edited.
Record Updated.
Operators, Administrator
1.Click On Search
2.Search By id or Name
3.Record found and display results
4.Edit is pressed
5.Update Button is pressed and information is updated.
Generate Error Message,Record not found
To search the desired record
N/A.
N/A

Post Condition
Actors Involved
Basic Course

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator searches/selects
a record.
3. Administrator press edit button
and edit the record.
5. Administrator press update button.

System Responce
2. System displays the desired record and edit button
enabled.
4. System displays the confirmation message.
6. Record successfully updated.

Table 8: TableHRIS006

53

Flow Chart-Use Case 06

Figure 17: Flowchart6

54

7.Delete

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Delete
HRIS007
Base
Administrator,Operator must be logged in
Record Deleted Successfully
Operators, Administrator
1.Click On Search
2.Search By id or Name
3.Record found and display results
4.Select Record to delete
5.Press Delete Button
6.Record Deleted
Generate Error Message,Record not Selected
To Delete the desired record
Record is in DB.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator Selects records
which need to be Deleted. .
3. Administrator deletes a form by
selecting/providing valid
unique id or press yes.

System Responce
2. Systems ask/displays the delete confirmation dialogue.

4. System deletes form successfully..

Table 9: TableHRIS007

55

Flow Chart-Use Case 07

Figure 18: Flowchart7

56

8.Print Report

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Print
HRIS008
Base
Desired form should be open
Report Printed Successfully
Operators, Administrator
1.Click On Search
2.Search By id or Name
3.Record found and display results
4.Select Report to Print
5.Press Print Button
6.Report Printed
Generate Error Message,Record not Found
To Print the desired record
Record is in DB.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator Selects reports
which need to be Printed. .
3. Administrator Print a report by
Pressing Print Button.

System Responce
2. Systems ask/displays the Print confirmation dialogue.
4. System prints report successfully..

Table 10: TableHRIS008

57

Flow Chart-Use Case 08

Figure 19: Flowchart8

58

9.Preview

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Preview
HRIS009
Base
Form is available
Report shown
Operators, Administrator
1.Click On Search
2.Search By id or Name
3.Record found and display results
4.Click on Previw button
5.Report shown
Generate Error Message,Record not found
To Preview report of selected record
N/A
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator Selects report
which need to be Previewed .
3. Administrator Press Preview
button.

System Responce
2. Systems check the information and generate a report.
4. System Display the desired report..

Table 11: TableHRIS009

59

Flow Chart-Use Case 09

Figure 20: Flowchart9

60

10.Manual Attendance

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator Click on
Attendance .
3. Administrator input valid
information and book on
the Attendance.

Attendance
HRIS010
Base
Administrator,Operator must be logged in
Attendance marked
user,Operators, Administrator
1.Click On Attendance
2.Search By id or Name
3.Record found and display results
4.input Information
5.Press Mark Attendance button
Generate Error Message,ID not found
To Mark Attendance manually of desired user
User is registered.
N/A
System Responce
2. Systems ask/displays desired form .

4. System Update form information and makr attendance successfully..


Table 12: TableHRIS010

61

Flow Chart-Use Case 10

Figure 21: Flowchart10

62

11.EDMS Login

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

EDMS Login
HRIS011
Base
Administrator must be logged in
EDMS tool activated Successfully
Administrator
1.Click On EDMS
2.Enter Login name and Password
3.If Successfull Show the tool
4.Otherwise relogin
Generate Error Message,Re-enter information
To use the EDMS tool
Admin is logged into main system
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator Selects EDMS
tool to use. .
3. Administrator Enter valid
username and passowrd
and press login.

System Responce
2. Systems displays a forma and ask for login and
password to enter.

4. System verify the entered information and login


on success..
Table 13: TableHRIS011

63

Flow Chart-Use Case 11

Figure 22: Flowchart11

64

12.Browse image

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Browse
HRIS012
Base
Administrator must be logged in
image uploaded Successfully
Administrator
1.Click On Browse button
2.Search image from drive
3.Select image and upload it
4.Desired image uploaded successfully
Generate Error Message,Record not Selected
Pick up the scanned image from the disk.
N/A.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator click browse
button.
3. Administrator select desired
image and press ok

System Responce
2. System displays the system drive.
4. System performs the requested action..

Table 14: TableHRIS012

65

Flow Chart-Use Case 12

Figure 23: Flowchart12

66

13.Zooming

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Zoom
HRIS013
Base
Administrator must be logged in
Zoom in/out image
Administrator
1.Click On Browse button
2.Search image from drive
3.Select image and upload it
4.Desired image uploaded successfully
5.Click on Zoom in or Zoom out
6.zoom the desired image
Generate Error Message,Record not Selected
Zoom the scanned image .
N/A.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Administrator click Zoom
button.
3. Administrator select desired
image and press zoomin
or zoomout

System Responce
2. System displays the option.

4. System performs the requested action..

Table 15: TableHRIS013

67

Flow Chart-Use Case 13

Figure 24: Flowchart13

68

14.Logout/Exit

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. User/admin selects the
log off or exit option
from the menu.
3. User/admin clicks the yes
or ok button..

Logout/Exit
HRIS014
Base
System is Operational and User logged in
Logoff the system Successfully
Administrator,operator,user
1.Click On Logoff button or Exit from the menu
2.Confirmation messages shown
3.Application exit or logged off successfully
Generate Error Message,Record not Selected
To log off or Exit from the System.
N/A.
N/A
System Responce

2. System displays the log off confirmation message.


4. System closes the application..
Table 16: TableHRIS014

69

Flow Chart-Use Case 14

Figure 25: Flowchart14

70

15.Connect

Name
Number
Type
Pre Condition

Connect
HRIS015
Base
Reader (Hardware) must be connected with Serial
Port.
Connection has established.
Operator,Administrator
1.Login to system
2.Click on Connect
3.Enter port number
4.Enter Valid information about reader
5.Press connect
6.Connection Established..
Generate Error Message,invalid information or port
number.
To connect application with RF reader.
N/A.
N/A

Post Condition
Actors Involved
Basic Course

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Operator chooses Port type,
and enters some
detailed information
about reader.
3. Administrator/operator Press
connect

System Responce

2. System validates the user information and displays


RF reader status.
4. Connection established. And displayed/enabled a
button..

Table 17: TableHRIS015

71

Flow Chart-Use Case 15

Figure 26: Flowchart15

72

16. Disconnect

Name
Number
Type
Pre Condition
Post Condition
Actors Involved
Basic Course

Disconnect
HRIS016
Base
Administrator/operator must be logged in
RF reader connection disconnected
Operator,Administrator
1.Click On Disconnect button
2.Confirmation message displayed
3.Select Yes
4.Connection disconected successfully
Generate Error Message,Connection not Selected
To Disconnect RF reader from application.
N/A.
N/A

Alternative Course
Purpose
Assumptions
Related Use Case
Actors Action
1. Admin/DEO enters his
user name and password.

System Responce
2. System validates the user information and displays
RF reader form.

3. Administrator/DEO Press
Disconnect button.

4. Connection Disconnected successfully..

Table 18: TableHRIS016

73

Flow Chart-Use Case 16

Figure 27: Flowchart16

74

3.6

Analysis Model

Analysis Model Must Achieve three primary objectives [11]


To describe what customer requires
To establish a basis for the creation for software design
To define a set of requirement that can be validate,once a software
is built.
To accomplish these objectives ,following Analysis model is used

Figure 28: Analysis Model

75

3.7

Use Case Diagram

Figure 29: Use Case Diagram

76

3.8

Project Domain Model

A domain model can be thought of as a conceptual model of a system which describes the various entities involved in that system and
their relationships. The domain model is created to document the key
concepts and the vocabulary of the system. The model identifies the
relationships among all major entities within the system and usually
identifies their important methods and attributes. This means that
the model provides a structural view of the system which is normally
complemented by the dynamic views in Use Case models. [13]

Figure 30: Project Domain Model

77

3.9

Data Flow Diagrams

A Data Flow Diagram is a graphical representation that depicts information flow and the transforms that are applied as data move from
input to output.The basic form of a data flow diagram also known as
a data flow graph. [11]
A DFD May contain different level,level 0, level 1 , level 2 DFD.Every
level is a subfunction the previous level.

Data Flow Diagram Of AHRIS [Level 0]

Figure 31: Data Flow Diagram level 0.1

78

Detailed Data Flow Diagram Of AHRIS [Level 0]

Figure 32: Det Data Flow Diagram level 0

79

Data Flow Diagram Of AHRIS [Level 1]

Figure 33: data flow diagram level 1

80

Control Flow Diagram Of AHRIS [Level 1]

Figure 34: Control Flow Diagram

81

3.10

E-R Analysis Diagrams

The Entity-relationship diagram enables us to fully specify the data


objects that are input and outpu from a system,the attributes that
define the properties of these objects,and their relationships. [11]
E-R Analysis Diagram from HR Admin Perspective

Figure 35: E-R Analysis of HR

82

E-R Analysis Diagram from Employee Perspective

Figure 36: E-R Analysis of Employee

83

E-R Analysis Diagram for AHRIS

Figure 37: E-R Analysis of AHRIS

84

3.11

Subsystem Diagram

AHRIS using RFID and Biometrics main system is divided into is subsystems,each subsystem will perform indivisually,Following subsystem
diagram depicts the image of how the main system will work.

Figure 38: Subsystem Diagram

85

3.12

Block Diagram

Block Diagram is essetial part of the project,it divide project in different


blocks and work on each block indivisually.So,following is the block
diagram of AHRIS using RFID and Biometrics,

Figure 39: Block Diagram

86

CHAPTER IV

DESIGN
4.1

System Module Diagram

The detailed system architecture and its interaction with other systems can be viewed in
the System Architecture Diagram [11]
4.1.1

Modules of AHRIS

AHRIS consist of following 5 modules


AHRIS AS
AHRIS Attendance system interacts with AHRIS EMS through its provided interface.it
gets the required interface for PS to calculate on the basis of Attendance.
AHRIS PS
AHRIS PS interacts with HRM through its provided interface by AHRIS AS.ARHIS PS
gets the required interface for HR to for calculation of Payroll.
AHRIS EDMS
AHRIS EDMS interacts with AHRIS EMS through its provided interface and get the required interface for AHRIS HR to scan and upload images and documents.
AHRIS EM
AHRIS EM interacts with AS and AHRIS EDMS through its provided and required interfaces.it also interacts with AHRIS HRM.
AHRIS HRM
AHRIS HRM interacts with PS And HRIS EDMS through its provied interface and gets
the recruitements andother criterias for operator.

87

Figure 40: Modules of AHRIS

88

SubModules of AS system

Figure 41: AS AHRIS

SubModules of ES system

Figure 42: ES Modules

89

SubModules of PS system

Figure 43: PS Modules

SubModules of HRM system

Figure 44: HRM Modules

90

SubModules of EDM system

Figure 45: EDMS Modules

91

4.2

Database Model Design

Database design is the process of producing a detailed data model of a database. This logical
data model contains all the needed logical and physical design choices and physical storage
parameters needed to generate a design in a Data Definition Language, which can then be
used to create a database. The activities of Database Design transform the requirements
for data storage developed during database analysis into specifications to guide database
implementation. [2]
4.2.1

Design Strategy

AHRIS Using RFID and Biometrics System has adopted the Relational Database Approach
for designing, which has become the dominant technology for Database Management. In
this relational DB data is managed as collection of tables in which all data relationships are
represented by common values in related tables.
4.2.2

Normalization

Normalization is a formal process for deciding which attributes should be grouped together
in a relation. Normalization is primarily a tool to validate and improve a logical design,
so that it satisfies certain constraints that avoid unnecessary duplication of data . [2] The
Database of AHRIS Using RFID and Biometrics System is fully in normalized form as:
All the duplications in tables are removed. All the Insertion, Update and deletion
anomalies are removed.
All the non-key columns depend on the entire primary key. In the case of a composite
primary key, this means that every non-key column do not depend on only part of the
composite key.
Every non key column in a table is mutually independent. Transitive Dependencies
are removed and the Database is in 3NF.

92

4.2.3

List of DB Tables

Following is a list of main tables(excluding sub-tables) of AHRIS ,which are used in Application,
Table Name
Applicants
Application
Appoinment
DailyAtt
Descipline
EDMSpassword
EmpCard
EmpNewstatus
EmpRec
LeaveApp
Login1
PerfRec
EmpNetPay
EmpGrossPay
FinalEmpNetPAy

Description
To Store Personal Record of Applicants Applied for
job.
To Store Record of Applications Applied for job.
To Store Record of Selected Candidates.
To Store Record of Daily Attendance of Employees.
To Store Record of Desciplinary cases of Employees.
To Store Record of Username & pswd for EDMS.
To Store Record of card allocated to Employees.
To Store Record of Employess up to date.
To Store Record of Employees Personal Details.
To Store Record of Employees Leaves.
To Store Record of Security Manager.
To Store Record of Performances of Employees.
To Store Employee Basic Pay.
To Store GrossPays of The Employees.
To Store Final Calculated net pay after addiion of
GrossPAy.
Table 19: List of DB Tables

93

4.2.4

E-R Database model Diagrams

Entities for Domain


An entity is a person, place, object, event or concept in the user environment about which
the organization wishes to maintain data. Following are the entities for AHRIS using RFID
& BM for DHA.
EMPLOPYEE
DEPARTMENT
RANKs
QUALIFICATION
PERMOTION
RESIGNATION
POSTING
FORM-STATUS
TAGS-ID
ALLOW-DEDUCT
PERFORMANCE
DOMICILE
SALARY
ATTENDANCE
EDMS
DESCIPLINE
JOB MANAGER
94

LEAVE
ADMINISTRATION

95

Entity Relationship Diagram


Entity Relationship Diagram (ERD) depicts entities and the relationships among those
entities. The relationships between entities can be different according to the conditions
namely:
One-to-One (1:1)
One-to-many (1:M)
Many-to-Many (M:M)
The Entity Relationship Data Model for the objects of AHRIS domain and the relationship
between those objects is following.

96

Figure 46: E-R Diagram of AHRIS 01

97

Detailed E-R Diagram 02

Figure 47: Detailed E-R Diagram 02

98

4.3

Software Architecture Design

System architecture alludes to the overall structure of the system and the ways in which
that structure provides conceptual integrity for a system. The primary objective of architectural design is to develop a modular program structure and represent the control
relationship between modules. In addition, architectural design melds program structure
and data structure, defining interfaces that enable data to flow throughout the program.
During construction, design components are implemented in programming language such
as Vb 6.0, Dot Net Framework.
The architectural design provides an excellent technique to improve understanding of
requirements in conceptual model i-e system sequence diagram.

99

4.3.1

Software Architecure Diagram

Figure 48: Software Architecture Diagram

100

4.4

Sequence Diagrams

Sequence diagram is a type of interaction diagram which shows an interaction between


objects. It focuses on the time ordering of messages, lifelines and focus of controls. It
elaborates object interactions in one use case scenario in time sequence. It depicts the
translation of requirements to system responsibilities. It shows messages between instances,
which is the only way objects can interact with each other. [6]
Squence diagram of User Authentication

Figure 49: Squence::Login

101

Squence diagram of Change Password

Figure 50: Squence::Change Password

Squence diagram of Registering Employees

Figure 51: Squence::Registering Employees

102

Squence diagram of Save

Figure 52: Squence::Save

Squence diagram of Search

Figure 53: Squence::Search

103

Squence diagram of Edit

Figure 54: Squence::Edit

Squence diagram of Delete

Figure 55: Squence::Delete

104

Squence diagram of Print

Figure 56: Squence::Print reports

Squence diagram of Preview

Figure 57: Squence::Preview

105

Squence diagram of Attendance

Figure 58: Squence::Attendance manager

Squence diagram of EDMS Login

Figure 59: Squence::EDMS login

106

Squence diagram of Browse

Figure 60: Squence::Browse

Squence diagram of Zooming

Figure 61: Squence::Zooming

107

Squence diagram of Logout/Exit

Figure 62: Squence::Logout/exit

Squence diagram of Connect

Figure 63: Squence::Connect

108

Squence diagram of Disconnect

Figure 64: Squence::Disconnect

109

4.5

State-chart Diagrams

Statechart diagrams provide a way to model the various states in which an object can
exist. While the Class diagrams show a static picture of the classes and their relationships,
Statechart diagrams are used to model the more dynamic behavior of a system. These types
of diagrams are extensively used in building real-time systems.
A Statechart diagram shows the behavior of an object.object. It shows the various states
in which an object can exist, what state an object is in when it is created, what state an
object is in when it is destroyed,how an object moves from one state to another, and what
an object does when it is in various states. All of this information helps a developer get
a complete picture of how a particular object should behave.Statechart diagrams do not
need to be created for every class in a model. Classes with significant dynamic behavior,
complex behavior, or behavior that is not well understood among the development team
are good candidates for Statechart diagrams. [16]
State Chart Diagram of AHRIS Using RFID & BM are given below..

110

StateChart Diagram of Authentication

Figure 65: Statechart::Authentication

StateChart Diagram of Change Password

Figure 66: Statechart::Change-Password

111

StateChart Diagram of Registering

Figure 67: Statechart::Registering

StateChart Diagram of Save and Delete

Figure 68: Statechart::Data-handling

112

StateChart Diagram of Searching and Editing Records

Figure 69: Statechart::Searching

StateChart Diagram of EDMS-Authentication

Figure 70: Statechart::EDMS-Login

113

StateChart Diagram of Manual Attendance

Figure 71: Statechart::Attendance

StateChart Diagram of Zoom & Browse files

Figure 72: Statechart::Zoom-Browse

114

StateChart Diagram of Logoff from Application

Figure 73: Statechart::Exit/Logoff

StateChart Diagram of Connection Manager

Figure 74: Statechart::Connection

115

4.6

Collaboration Diagrams

A collaboration diagram represents a collaboration, which is a set of object roles related in


a particular context, and an interaction, which is the set of messages exchanged among the
objects to achieve an operation or result. It is an interaction diagram that shows, for one
system event defined by one use case, how a group of objects collaborate with one another.
[6]
Unlike a sequence diagram, a collaboration diagram shows relationships among object
roles and it does not express time as a separate dimension.reasons. Quality assurance
engineers and system architects look at these to see the distribution of processing between
objects. Suppose that the Collaboration diagram was shaped like a star, with several objects
communicating with a central object. A system architect may conclude that the system is
too dependent on the central object and redesign the objects to distribute the processing
power more evenly.[16]
Collaboration diagram for AHRIS System are following...

116

Collaboration Diagram of User Authentication

Figure 75: Collaboration::User Auth

Collaboration Diagram of Change password

Figure 76: Collaboration::Change pswd

117

Collaboration Diagram of Register new Empl

Figure 77: Collaboration::Registeration

Collaboration Diagram of SAve

Figure 78: Collaboration::Save

118

Collaboration Diagram of Search

Figure 79: Collaboration::Search

Collaboration Diagram of Edit

Figure 80: Collaboration::Edit

119

Collaboration Diagram of Delete

Figure 81: Collaboration::Delete

Collaboration Diagram of Print report

Figure 82: Collaboration::Print

120

Collaboration Diagram of Preview

Figure 83: Collaboration::Preview

Collaboration Diagram of Manual Attendance

Figure 84: Collaboration::Man Attendance

121

Collaboration Diagram of EDMS login

Figure 85: Collaboration::EDMS

Collaboration Diagram of Browse file

Figure 86: Collaboration::browse

122

Collaboration Diagram of Zooming

Figure 87: Collaboration::zoom

Collaboration Diagram of Logoff/exit

Figure 88: Collaboration::logout/exit

123

Collaboration Diagram of Connect

Figure 89: Collaboration::connect

Collaboration Diagram of Disconnect

Figure 90: Collaboration::Dc

124

4.7

Component Diagram

A component diagram depicts how a software system is split up into physical components
and shows the dependencies among these components. [6]

Figure 91: Component Diagram

125

4.8

Deployement Diagram

The deployment diagram depicts a static view of the run-time configuration of processing
nodes and the components that run on those nodes. It shows the hardware for the system,
the software that is installed on that hardware, and the middleware used to connect the
disparate machines to one another. [6]

Figure 92: Deployement Diagram

126

CHAPTER V

IMPLEMENTATION

Implementation refers to the final process of moving the solution from development status
to production status. In this chapter we will discuss about the Tools and Technologies,
Software Components and the methods used for implementation.

Figure 93: Basic implemented Work Flow of AHRIS

127

5.1

Tools and Technologies

The following tools and technologies are used to build the complete AHRIS RFID and BM
System.
Microsoft Visual Studio 2000 Professional Edition
Microsoft Visual Basic 6.0
Microsoft Access 2003
Microsoft Crystal Reports 9.0
UML Diagrammer
Microsoft Visio 2003
Rational Rose 2002
ER Win
Microsoft Office
TeXnicCenter Latex
Adobe Photoshop CS 8

5.2

Methods Used for Implementation

There are various conversion methods for implementing a system. One has to use the best
that matches the requirements of this system. There are three conversion methods:
Direct Conversion
In this conversion, old system is totally abandoned and the new system becomes completely
operational. This conversion method is useful only for small organizations but for large
organizations it may result into the tremendous setback due to the failure.
Gradual Conversion

128

The technique allows one program at a time to replace an activity of the existing system.
Gradually, the present system is replaced by the newly designed system. Small-scale operations are conducted first to confirm that change over would be successful. The old system
is not used further and the new system is completely taken over. The process continues
until the new system is fully implemented.
Parallel Conversion
This is the technique in which both existing system and new system runs simultaneously
parallel to existing system. Data is processed or moved through systems concurrently and
only when new system is checked out, the operation of an old system is abandoned. It is
believed that the safest approach to conversion is to run both new and the old system at
the same time, until it is satisfactory established that the new system is producing reliable
results.
Adopted Conversion Plan
Most feasible conversion plan, which results best, is the parallel conversion. It is selected
because it provides an opportunity to compare the results of the existing system with those
of the developed system. Another advantage of this technique is that the risk of failure
is covered. Although this implementation will be slightly xpensive, however, the system
would be safe and the procedure should be followed for some time until it is confirmed that
the newly designed system is working perfectly.

5.3

Software Components:

AHRIS RFID & BM System is developed on the basis of 3-tier architecture but without
web services, having three distinctive layers i.e.
User Interface Layer (i.e. , .exe and .frm files)
Business Logic Layer (i.e. .vbp and .Dsr files)
Data Access Layer (i.e. .bas , .mdb files and stored procedure)

129

5.3.1

ULL and BLL Methods:

In the following there is an algorithmic representation of SOME(not all) of the important


methods of BLL and ULL:

5.3.1.1

Login:

Login_Click()
Get user input for user id and password.
Verify user id and password.
IF Valid THEN
Maintain session
Redirect to MAin page
ELSE
Displays message that Invalid Login or Password.
ENDIF
5.3.1.2

Change Password:

ChangePassword_Click()
Get input for user login and Password
Update the user password.
Compare the user entered password with the saved one.
IF equal
Displays message "Password changed successfully".
ELSE
Displays message "Invalid Login name or Password".
ENDIF
5.3.1.3

Add Employee:

OnPage_load()
Get All fields

130

Get All Buttons


Generate_Employee_num()

IF(EmpId==Valid)
Chck for Last number
Generate auto Employee number
ElSE
msg"Enter Valid Emp ID"
Search_click()
Execute Stored Procedure to search record.
Update_click()
Execute Stored Procedure to Update new record.
Execute procedure to Update edited field.
Save_click()
Execute Stored Procedure Save new record.
Execute procedure to save data as assigned.
Refresh_click()
see all fields empty
Exit_click()
close the page

5.3.1.4

Add Employee:

OnPage_load()
Get All fields
Get All Buttons
All Fields must have valid data enetered
Search_click()
Execute Stored Procedure to search record.

131

Update_click()
Execute Stored Procedure to Update new record.
Execute procedure to Update edited field.
Save_click()
Execute Stored Procedure Save new record.
Execute procedure to save data as assigned.

Refresh_click()
see all fields empty
Exit_click()
close the page
Delete_click()
Execute Stored Procedure Delete Selected record.
5.3.1.5

Attendance:

OnPage_load()
Ask for Empl ID
Ask for Employe Number
All Fields must be active.
BookON_Click()
IF
All fields are Empty
and BOOK on clicked
THEN
Show msg"Enter Data in fields"
ELSE IF(Data==Valid)
Enter Data in all fields
Update Data
ELSE

132

Show Error

BookOff_Click()
Show error msg
Refresh_click()
Empty all fields
Time()
Get current system time
DAte()
Get current date
5.3.1.6

Search

OnPage_load()
show Status
Show Grid
Ask for Empl ID
Ask for Employe Name
All Fields must be active.

Search_Click()
IF(Empno==Valid)
Execute saved search procedures
Search for the result
Display result in Grid form
Fill required fields
Else
Show error msg"Invalid ID"
Exit_Click()
Close the form.

133

Refresh_click()
Empty all fields
5.3.1.7

Reports

OnPage_load()
Click on required reports
Show Grid
Ask for Empl ID
Ask for Employe Name
All Fields must be active.
Print_Click()
IF(Empno==Valid)
Execute .dsr procedures
Search for the result
Display result in Grid form
Send for Print
Else
Show error msg"Invalid ID"
Exit_Click()
Close the form.
Preview_click()
Show .dsr Designs.
5.3.1.8

EDMS

OnPage_load()
Ask for login
login()
Ask for PAssword
password()

134

IF(Login==Success)
Show Main Screen
Show All fields
ElSE
Show error
NewScan_Click()
IF(Empno==Valid)
Search for drives
Select Document
Upload it
Else
Show error msg"Invalid ID"
Exit_Click()
Close the form.
Print_click()
Print the selected Document.
HElp_click()
Show Help
View_click()
View Selected Document.
Zoom_click()
Enlarge the screen by zooming.
Database_click()
Show Available Documents

5.3.2

BLL Method

5.3.2.1

Applicants list()

Populate Applicants list with name.

135

Return dataReader.

5.3.2.2

Employees dropdownlist ()

Populate it with Employees names.


Return dataReader.
5.3.2.3

Delete (ID)

Delete record from database based on


the parameter value.
Populate grid with data based on
the parameter value.
Return dataset.
5.3.2.4

Add()

Get values from the UI class.


Check if the user entered name already exists.
IF name exists
Display error message

Else
Add record in the table
Update database.
IF Record added successfully
Display confirmation.
ENDIF
ENDIF

136

5.3.2.5

PopulateEditField(ID)

Popluate the dataset with data based on the parameter.


Return dataset.
5.3.3

DAL Methods:

In the following there is an algorithmic representation of some of the important methods of


DAL.

5.3.3.1

DataAccess()

Set connection paramerters and login


and password to access database.

5.3.3.2

ExecuteReturnValue()
Execute query and return data.

5.3.3.3

OpenConnection()

Open connection with database.


Return connection.
5.3.3.4

CloseConnection()

IF (connection Not NULL)


Set connection =close.
ENDIF
5.3.3.5

DisposeConnection()
IF (Connection Not null)

Dispose connection.
Set connection == null.

137

ENDIF
5.3.3.6

CreateAdapter()
Set Adapter =

Create new data adapter.

return Adapter
5.3.3.7

CreateCommand()

Set Command = Connection.CreateCommand().


Set

Command.CommandText = procedureName.

Set Command.CommandType = CommandType.StoredProcedure.


5.3.3.8

ExecuteDataReader()

Execute command and return dataReader

138

CHAPTER VI

TESTING

Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and coding.Most of the time software projects are
not estimated properly and tend to run behind schedule. When it comes to meeting the
deadline, people seem to ignore a very important phase in the whole process testing. But
our project Automated Human Resource Information System Using RFID and Biometrics
for DHA has been thoroughly tested.
System testing is an essential step for the development of a reliable and error-free system.
Testing is a process of executing a program with the explicit intension of finding errors but
this does not mean to embarrass the programmer or fail the product but the positive
intention to remove as many problems from the system. A test case is a set of data items
that the system processes as normal input. Good testing involves much more than just
running the program a few times to see whether it works.
Testing has an important place in SDLC (Software Development Life Cycle). The SQA
(Software Quality Assurance) team should be involved in the early phases of the project.
This will make them aware of the requirements and techniques that are being followed
enabling them to develop an appropriate test strategy.
The marketing group will bring the customer requirement.
The engineering group will access the feasibility.
The engineering and SQA groups will work together during the design phase and
generate the product specification.
The developers will start implementing while the SQA team is developing the test
plans and so on.

139

While the developers are ready with the code, the SQA team will be ready for
testing. The testing phase is no longer a bottleneck for product delivery because the
SQA team has been involved since the start of the project.

6.1

Testing Techniques & Strategies

Black Box Testing


White Box Testing
Path Testing
Regression Testing
Unit Testing
System Testing
Acceptances Testing
6.1.1

Black Box Testing

Black-box testing technique does not concern with the internal coding. But it checks the
functionality of the software. The software is executed without examining the code. The
tester acts as an end user and tries to find bugs.
6.1.2

White Box Testing

In white box testing the tester is concerned with the internal coding of the software. In
this strategy the code is examined without being executed. White box testing is concerned
only with testing the software product; it cannot guarantee that the complete specification
has been implemented. Black box testing is concerned only with testing the specification; it
cannot guarantee that all parts of the implementation have been tested. White box testing
can indicate test considerations, which are not produced by black box testing. The converse
is also true; black box testing can produce test considerations, which are not produced by
white box testing.

140

6.1.3

Path Testing

A path is a sequence of operations that runs from the start of the program to an exit point.
This is also called an end-to-end path. Path testing is concerned with testing paths of the
software.There are three converge criteria in path testing.Line converge requires execution
of every line of code at least once. Branch converge requires testing of all lines and all
branches. Condition converge requires each ways of the condition can be made true or
false.
6.1.4

Regression Testing

It is very important testing technique. In this testing technique the old tests are tested
again. This can be performed after black box or white box testing.
6.1.5

Unit Testing

Unit testing is testing the individual units of software. In an Object Oriented Software
program these can be individual classes.
6.1.6

System Testing

In System Testing all the units of the software are combined and tested as an integrated
system.
6.1.7

Acceptance Testing

The acceptance testing is a process to verify the readiness of the software for implementation
or use. The software is checked for completeness that whether it is ready or not. After
successful completion of acceptance testing the software is ready and can be exported.

6.2

Deriving Test Cases

The steps for deriving test cases are: [10]


Using design or code, draw the corresponding flow graph.
Determine the cyclomatic complexity of flow graph.

141

Determine a basic set of independent paths.


Prepare test cases that will force execution of each path in the basic set.
Once Testing is completed,testers generate metrics and make final reports on their
test efforts that whether or not the software tested is ready for release.

6.3

Test Cases for AHRIS using RFID and Biometrics

Each test case has the following information.


Test Case ID
TC
AHRIS
F
.01
.01
Functional Area
Test Name
Actions
Expected Results
Status

The identification for the test case. e.g. TC- AHRIS


-F.01.01 where
Test Case
Project Name.
Functionality.
Use Case number.
Test Case number.
Use Case Name.
Basic Criteria..
The sequence of steps to take.
The results that should come after processing is Performed.
Test case passed or failed.
Table 20: TableTC01

142

Test Case for Use Case 01


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should give
an error message indicating
that the User ID is incorrect
Comments

TC- AHRIS -F.01.01


Login
Login with incorrect User ID.
To ensure that the security manager is working properly,and providing the full security again unautorized
users.
Application should be ready to run.
1.Enter Incorrect User ID.
2.Enter Passowrd
3.Click on Ok
Status

Fail
Database might not be connected!!

Table 21: Table::Test Case 01

Test Case for Use Case 01


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should give
an error message indicating
that the Password is incorrect
Comments

TC- AHRIS -F.01.02


Login
Login with incorrect Password.
To ensure that the security manager is working properly,and providing the full security again unautorized
users.
Application should be ready to run.
1.Enter correct User ID.
2.Enter incorrect Passowrd
3.Click on Ok
Status

Pass
Database has been reconnected..

Table 22: Table::Test Case 02

143

Test Case for Use Case 01


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should show
main screen but no
option should be active
Comments

TC- AHRIS -F.01.03


Login
Press Enter without entering User ID and Password.
To ensure that the security manager is working properly,and providing the full security again unautorized
users.
Application should be ready to run.
1.Blank User ID.
2.Blank Passowrd
3.Click on Ok
Status

Fail
Admin didnt assign Blank login properties..

Table 23: Table::Test Case 03

Test Case for Use Case 01


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should show
Main screen with all
Options active
Comments

TC- AHRIS -F.01.04


Login
Login with correct User ID and Password.
To ensure that the security manager is working properly,and providing the full security again unautorized
users.
Application should be ready to run.
1.Enter correct User ID.
2.Enter Correct Passowrd
3.Click on Ok
Status

Pass
Everything Working Excellently!!

Table 24: Table::Test Case 04

144

Test Case for Use Case 02


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that the Old password is incorrect
Comments

TC- AHRIS -F.02.01


Change Password
Change Password with incorrect information.
To ensure that the security manager is working properly,and providing the full security against unautorized users.
Actor must logged in.
1.Click on Change Password.
2.Enter incorrect old password
3.Enter new password
4.Reenter new password
Status

Pass
Test case was done correctly..

Table 25: Table::Test Case 05

Test Case for Use Case 02


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
message indicating that
Password hase been changed
Comments

TC- AHRIS -F.02.02


Change Password
Change Password with correct information.
To ensure that the security manager is working properly,and providing the full security against unautorized users.
Actor must logged in.
1.Click on Change Password.
2.Enter correct old password
3.Enter new password
4.Reenter new password
Status

Pass
Exceptional handling worked..

Table 26: Table::Test Case 06

145

Test Case for Use Case 03


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that the Necassary information
are not entered.
Comments

TC- AHRIS -F.03.01


Registering Employees
Registering with incorrect information.
To ensure that the conditions which are there against
different field are working properly.
Actor must logged in.
1.Click on new Employee .
2.Enter correct ID
3.Nothing entered in necessary fields
4.Click on Update
Status

Pass
Exceptional Handling worked well..

Table 27: Table::Test Case 07

Test Case for Use Case 03


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
a message indicating
that data is updated.
Comments

TC- AHRIS -F.03.02


Registering Employees
Registering with correct information.
To ensure that the conditions which are there against
different field are working properly.
Actor must logged in.
1.Click on new Employee .
2.Enter correct ID
3.Enter data in All necessary fields
4.Click on Update
Status

Pass
Everything worked correctly..

Table 28: Table::Test Case 08

146

Test Case for Use Case 04


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that some fields are missing
Comments

TC- AHRIS -F.04.01


Save information
Save information with missing necassary fields.
To ensure that the conditions which are there against
different fields are working properly.
Authorized users must logged in.
1.Click on Employee .
2.Enter record in fields
3.Nothing entered in some necessary fields
4.Click on Save
Status

Fail
Some problem in exceptional handling..corrected after this test case.

Table 29: Table::Test Case 09

Test Case for Use Case 04


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
a message indicating
that records are saved
Comments

TC- AHRIS -F.04.02


Save information
Save information in databse.
To ensure that the conditions which are there against
different fields are working properly.
Authorized users must logged in.
1.Click on Employee .
2.Enter record in fields
3.Click on Save button
Status

Pass
Data saved in correct fields of table..

Table 30: Table::Test Case 10

147

Test Case for Use Case 05


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that Record not found
Comments

TC- AHRIS -F.05.01


Search
Search data with incorrect information.
To ensure that data searching queries and the conditions which are there against different fields are working properly..
Authorized users must logged in.
1.Click on Search .
2.Enter incorrect ID or name
3.Click on Search
Status

Pass
OK

Table 31: Table::Test Case 11

Test Case for Use Case 05


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
required results
Comments

TC- AHRIS -F.05.02


Search
Search data with correct information.
To ensure that data searching queries and the conditions which are there against different fields are working properly..
Authorized users must logged in.
1.Click on Search .
2.Enter correct ID or name
3.Click on Search
Status
Fail
Data missing from Database.Corrected after this Test
Case.

Table 32: Table::Test Case 12

148

Test Case for Use Case 08


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that Printer is not connected
Comments

TC- AHRIS -F.08.01


Print Report
Printing without Printer connected.
To ensure that Printing will occur when the desired
device is available..
Authorized users must logged in.
1.Click on Required report .
2.Select data
3.Click on Print
Status

Fail
Application closed showing exceptional error..

Table 33: Table::Test Case 13

Test Case for Use Case 08


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
a message indicating
that DAta Printing..
Comments

TC- AHRIS -F.08.02


Print Report
Printing with Printer connected.
To ensure that Printing will occur when the desired
device is available..
Authorized users must logged in.
1.Click on Required report .
2.Select data
3.Click on Print
Status

Pass
OK..

Table 34: Table::Test Case 14

149

Test Case for Use Case 10


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that Empl ID is incorrect
Comments

TC- AHRIS -F.10.01


Manual Attendance
Attendance with incorrect ID.
To ensure that Authorized users can mark their attendance in their own tables..
Authorized users must logged in.
1.Click on Attendance .
2.Enter incorrect ID
3.Enter Data in other fields
4.Click on Book ON
Status

Pass
Everything worked properly..

Table 35: Table::Test Case 15

Test Case for Use Case 10


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
a message indicating
that Attendance updated.
Comments

TC- AHRIS -F.10.02


Manual Attendance
Attendance with correct ID.
To ensure that Authorized users can mark their attendance in their own tables..
Authorized users must logged in.
1.Click on Attendance .
2.Enter correct ID
3.Enter Data in other fields
4.Click on Book ON
Status

Pass
OK

Table 36: Table::Test Case 16

150

Test Case for Use Case 11


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
an error message indicating
that ID or Pswd is incorrect
Comments

TC- AHRIS -F.11.01


EDMS Login
Login into EDMS Section with incorrect ID or Password.
To ensure that Authorized user(HR Admin) can use
this tool,purpose is to increase privacy and security
to personal files..
Authorized users must logged in.
1.Click on EDMS .2.Enter incorrect ID
3.Enter Password
4.Click Login
Status

Fail
Not logged in with ADministrator rights..

Table 37: Table::Test Case 17

Test Case for Use Case 11


Test Case ID
Functional Area
Test name
Description(purpose)

Prerequistie
Action to perform

Expected Results
The system should display
EDMS Main Screen
Comments

TC- AHRIS -F.11.02


EDMS Login
Login into EDMS Section with correct ID & Password.
To ensure that Authorized user(HR Admin) can use
this tool,purpose is to increase privacy and security
to personal files..
Authorized users must logged in.
1.Click on EDMS .2.Enter correct Admin ID
3.Enter Password
4.Click Login
Status
Pass
OK..

Table 38: Table::Test Case 18

151

Test Case for Use Case 12


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform
Expected Results
The system should display
system drives
Comments

TC- AHRIS -F.12.01


Browse
Browse Scanned image from system.
To ensure that Button is accessing all system drives
and uploading the valid data..
Authorized users must be logged in.
1.Click on Browse .
Status
PAss
All drives are available...

Table 39: Table::Test Case 19

Test Case for Use Case 14


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform
Expected Results
The system should display
a confirmation message
Comments

TC- AHRIS -F.14.01


Logoff/Exit
Logoff/Exit from the software.
To ensure that Authorized user(HR Admin) logged
off from the system..
Authorized users must logged in.
1.Click on Loggoff .
2.Click in Ok
Status
Pass
OK..

Table 40: Table::Test Case 20

152

Test Case for Use Case 15


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
a error message indicating
Data is invalid
Comments

TC- AHRIS -F.15.01


Connect
Connect device with invalid information.
To ensure that Connection established is ok and the
device is connected with system..
Authorized users must logged in.
1.Click on Connect . 2.Enter incorrect Port no
3.Enter invalid type
4.Press Connect
Status

Pass
Dialog box appear..

Table 41: Table::Test Case 21

Test Case for Use Case 15


Test Case ID
Functional Area
Test name
Description(purpose)
Prerequistie
Action to perform

Expected Results
The system should display
message that connection
successfully established.
Comments

TC- AHRIS -F.15.02


Connect
Connect device with valid information.
To ensure that Connection established is ok and the
device is connected with system..
Authorized users must logged in.
1.Click on Connect . 2.Enter Port no
3.Enter type
4.Press Connect
Status

PAss
OK..device connected

Table 42: Table::Test Case 22

153

CHAPTER VII

CONCLUSION

The Software developed was the requirement of organization. This software has been developed using industry standard tools & technologies. The software is flexible enough to be
modified easily for further needs. If we compare the new procedure with the existing system
I would have no doubt in saying that by using the software DHA isb will attain a remarkable
success. AHRIS using RFID and Biometrics System also interacts with two other Systems,
AS System and PS System. These three systems use one centralized Database.The system
is fully evaluated but generally it produces information that posses the properties of accuracy, completeness, timeliness and conciseness. Some of the measurable human factors that
are central in evaluation are ease of use, speed of performance and rate of errors.
Due to the time constraints to the submission of this project the system could not be
fully evaluated, but By the Grace of Allmighty Allah and hard work this system is fully
evaluated and generally it produces information that posses the properties of accuracy,
completeness, timeliness and conciseness.
All the factors mentioned above do not guarantee a unique interface and each software
no matter how carefully designed and implemented has got its respective pros and cons.
The ones associated with our software are mentioned below:

7.1

Pros & Cons of System

There are no cons of this software. The Pros of this software are as follows:
The software is more reliable and consistent than existing system because it produces
accurate results without any loss of data.
The software provides interface for friendly communication between the user and the
system.

154

Software provides complete security involves validating user credentials (authentication) and determining access to resources (authorization).
Software is fault tolerant and efficient.
The rate of errors is considerably reduced as forms and reports are used and data
validation checks have been provided to ensure correct storage of information.
The software provides information in the form of printable reports, which helps the
users in making timely decision.
The software also generates proper error messages for the convenience of the user.
This enables the users to interact more easily with this software.

7.2

Software Requirements

The software requirements for this software are:


Windows Professional/XP or later
. Net Framework 2.0
Visual Basic 6.0
Oracle 9i/10g
Crystal Reports 9

7.3

Hardware Requirements

The hardware requirements for this software are:


Pentium IV computer with serial Port.
256 MB Ram
Minimum 4 GB available hard disk space.
RFID Reader (RS-232) with merge antenna.
155

Passive Tags (Frequency 13.56 MHz).


Biometrics thumb identification device.

156

APPENDIX A

SOME ANCILLARY STUFF(GUI)

A.1

Istallation,User Manual(Interface)

This section Describe a detailed view of User Interface design(User Manual),How to use the
Application.All Screenshots are from Origional version of the Application.
1.Double Click on the prjHRIS.exe to start the Application. 2.A Splash Screen Will

Figure 94: GUI::CLick


Appear,when you Start the Application,it shows small information about Application.

Figure 95: GUI::Splash

157

Figure 96: GUI::authentication1


3.After Splash Scree,A Security Manager will ask for UserName and Password.

Figure 97: GUI::authentication2


4.Enter Correct User Name And Password in the desired field,If Username or password
entered will not be correct.It will prompt for error.

158

Figure 98: GUI::main


5.THis is the Main Interface View of the Application,It has File Menu,A ToolBas,A Side
Bar,and a Status Bar in it.

Figure 99: GUI::main1


6.File Menu Has Different Options.
7.Main Menu Has Drop Down menu With Different Options.

159

Figure 100: GUI::changePassword


8.When User will click on Change Password,This Box Will Appear.
9.It ask to enter username,old password,new password,and then confirm new password.It
has also Exception Handling,So correct information will be entertained only.

Figure 101: GUI::changepswd2


10.For Example,Now Wrong info will led it into this dialog.

160

Figure 102: GUI::changepswd3


11.And the Right infor will Change the password easily.

Figure 103: GUI::main11


12.Main has other options to user other window applications like Notepad and Calculator.

161

Figure 104: GUI::CAlc


13.This is the result of Clicking on Notepad and Calculator options.

Figure 105: GUI::mainmenu


14.User has also Option to logoff from the Current user,as every user has different rights.

162

Figure 106: GUI::logoff


15.A Confirmation Message will Appear,Clicking on Yes will logoff from the Application,While No will be back to Application.

Figure 107: GUI::definations


16.These are defination Menu,Defination are those static information which are used repeatedly by other forms,They can be access easily to use in multiple scenarios.

163

Figure 108: GUI::definations1


17.For example,These all are definations.

Figure 109: GUI::Recruitment


18.Recruitment Section belong to HR department,This section has option to hire new employees and manage their data.

164

Figure 110: GUI::Applicantions


19.This is form to enter data of Applications which are recieved for differnt jobs.

Figure 111: GUI::main21


20.Short listed Applicants are generated after applications are recieved.

165

Figure 112: GUI::Applicants


21.This shows the criteria,that how Employees are short listed from the lists.

Figure 113: GUI::Selectedapp


22.This shows the list of Selected Candidates after completion of all procedures.

166

Figure 114: GUI::EmpRec


23.Next is Employee Manager,It has Options related to Employees.

Figure 115: GUI::Emprec1


24.To enter the Data of New Employees,This form will be filled with all details.Some fields
are necassary to enter.

167

Figure 116: GUI::Emprec2


25.NExt Options are Educational History,Employement Record,and Employee ID Card.

Figure 117: GUI::Emprec3


26.Educational History Shows the record of Candidates Educational Background.
27.Employement Record shows Experience record of Employees..
28.Employee ID Card shows Electronic Card no generated by Computer.

168

Figure 118: GUI::Leave


29.Next Option has Leave and Attendance Manager.

Figure 119: GUI::Leave1


30.This shows Leave Application,All required information is entered and then leave type
and Days are calculated.

169

Figure 120: GUI::Attendance


31.Click on Attendance to Mark the Attendance of Employee.

Figure 121: GUI::Attendance1


32.Enter Employee No,Name,Appoinment.Click on Book On to Mark the Entry time and
Book Off to Mark the Exit time.

170

Figure 122: GUI::EmpPerf


33.Next Section is Of Employee Performance Manager.

Figure 123: GUI::EmpPerf1


34.Verification will verify the status of the Employee.
35.Desicpline will show desciplinary actions
36.Suitablity report shows status and detail of Employees.

171

Figure 124: GUI::EmpPerf2


37.Click on Employees New Status and Select desired option.

Figure 125: GUI::EmpPerf3


38.IF EMploye is promoted or Re Employed ,Enter info in Promotion/Reemployemnet.
39.Resgination or Termination can be done using Resignation/Termination form.
40.If Employee has got posting or re designated.

172

Figure 126: GUI::EmpPerf4


41.Click on Emp Per Review to check Performance.

Figure 127: GUI::EmpPerf5


42.This Form is used to create a Performance report of the Employees.

173

Figure 128: GUI::Payroll


43.Next Section is of Payroll Manager.

Figure 129: GUI::Payroll1


44.To calculate the Monthly net of the Employee..Enter required fileds and Click on Calculate Net pay to see the Net pay of Eployee and update the information.

174

Figure 130: GUI::Search


45.Next is Search Manager,which search the desired queries.

Figure 131: GUI::Search1


46.General Query,Enter Employee no and click on Search to see the status and information
about employee.

175

Figure 132: GUI::Search2


47.Employee leave record can be searched by Employee no.This also shows leave types
and how much leaves have been taken and left.

Figure 133: GUI::Reports


48.Reports Manager has got Different Reports.All reports are generated using Crystal Reports.

176

Figure 134: GUI::Reports1


49.This is sample view of Appoinments reports.

Figure 135: GUI::Reports2


50.Click on Employee personal reports to check Employees report.

177

Figure 136: GUI-Report


51.Enter Employee no whose reports want to view.

Figure 137: GUI-Report3


52.This is Crystal reports generated report of Employee personal information.

178

Figure 138: GUI-Report4


53.To check the Attendance report click on Attendance report,This shows the list in
grid view.
54.Select date and click on preview to get the report of desired day.

Figure 139: GUI-Report5


55.This is Attendance report of Employees on that day.

179

Figure 140: GUI-Report6


56.This is Payroll slips generated by click on Payroll report.

Figure 141: GUI-EDMS


57.Clickin on EDMS will show this splash screen.

180

Figure 142: GUI-EDMS1


58.Security manager of EDMS will prompt to enter correct information to use the tool.

Figure 143: GUI-EDMS2


59.This is the tool to View Digital images,documents of Employees which are scanned.

181

Figure 144: GUI-EDMS3


60.Select any image and clik on Zoom.It will zoom the image,Zoom out option is also
available on left panel.

Figure 145: GUI::Admin


61.Administrator option will be only available to Administrator.

182

Figure 146: GUI::Admin1


62.This is the tool to Allocate user rights,that how much they have access to the application.

Figure 147: GUI::Admin2


63.This shows the Sample view of tool.

183

Figure 148: GUI::Help


64.Help Section has different option.You can press F1 any time to get the Contents.

Figure 149: GUI::Help2


65.When F1 is pressed,this detailed help section will open.

184

Figure 150: GUI::Help3


66.When user clicks on Credits,it will show this Dialogue.

Figure 151: GUI::Help4


67.Company information can be displayed by clicking on Company Details.

185

Figure 152: GUI::Help5


68.About Prj HRIS.

186

Figure 153: GUI::Attmngt


69.Click on Attendance Management to use this Third Party tool for automation of
Attendance.
70.This is the main screen of Attendance Management.Complete Help is provided with the
software.

Figure 154: GUI::Attmngt1

187

APPENDIX B

SOURCE CODE

Here source code of AHRIS using RFID and BM is given in commented() form.All code is
shown by dividing it into functions.All the main modules code is covered Excluding small
chunks.
Authentication(security Manager)
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()


set the global var to false
to denote a failed login
LoginSucceeded = False
Unload Me
End Sub

Private Sub cmdOK_Click()


check for correct password
Dim User, Password As String

Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Login1 where UserName="

188

& Trim(txtUserName.Text) & "", myConnection, 1, 1


If Not Rs.EOF Then
User = Rs.Fields("UserName")
Password = Rs.Fields("Password1")
UserName = User
Pass = Password
End If

If txtPassword.Text = Password And txtUserName.Text = User Then


place code to here to pass the
success to the calling sub
setting a global var is the easiest
LoginSucceeded = True
mdiMain.Show
Unload Me
Else
MsgBox "Invalid Password, try again!", , "Login"
txtPassword.SetFocus
SendKeys "{Home}+{End}"
End If
End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset
End Sub
Main mdi form code
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Following are all actions which are taken by clicking on different objects

Private Sub ACR_Click()

189

frmRpPerf.Show
End Sub

Private Sub Allowances_Click()


frmAllowances.Show
End Sub
Application record
Private Sub ApplRec_Click()
frmRpApplicants.Show
End Sub

Private Sub Appoint_Click()


frmAppointment.Show
End Sub

Private Sub Appoints_Click()


frmAppointment.Show
End Sub

Private Sub Appointss_Click()


frmRpRank.Show
End Sub
Attendance record
Private Sub Attend_Click()
frmEmpAtt.Show
End Sub

Private Sub AttRp_Click()


frmRpAttend.Show
End Sub

Private Sub Calculator_Click()


Shell "Calc.exe", vbNormalFocus

190

End Sub

Private Sub Course_Click()


frmCourses.Show
End Sub

Private Sub Descipline_Click()


frmDisipline.Show
End Sub

Private Sub Direct_Click()


frmDte.Show
End Sub

Private Sub Dis_Click()


frmRpDiscipline.Show
End Sub

Private Sub Dom_Click()


frmDomicile.Show
End Sub

Private Sub EduHist_Click()


frmEduHist.Show
End Sub

Private Sub ElecDoc_Click()


frmpPicViewer.Show
frmSplash.Show
End Sub

Private Sub EmpAdd_Click()


frmEmpAddress.Show

191

End Sub

Private Sub EmpAuth_Click()


frmEmpAuth.Show
End Sub

Private Sub EmpAuthRp_Click()


frmRpEmpAuth.Show
End Sub

Private Sub EmpCont_Click()


frmContract.Show
End Sub

Private Sub EmpCurStat_Click()


frmRpCStatus.Show
End Sub

Private Sub EmpID_Click()


frmEmpCard.Show
End Sub

Private Sub EmpLDef_Click()


frmEmpLApp.Show
End Sub

Private Sub EmpLeaveRec_Click()


frmCheckLeaves.Show
End Sub

Private Sub EmploRec_Click()


frmEmployeeRec.Show
End Sub

192

Private Sub EmpLRec_Click()


frmEmpLRec.Show
End Sub

Private Sub EmpPer_Click()


frmRpEmpRec.Show
End Sub

Private Sub EmpRep_Click()


frmRpEmpAnnualReport.Show
End Sub

Private Sub empSen_Click()


frmSeniority.Show
End Sub

Private Sub ESC_Click()


frmService.Show
End Sub

Private Sub Exit_Click()


If MsgBox("Are you sure you want to Exit from the system ?",
vbYesNo + vbQuestion, "Exit") = vbYes Then
Unload mdiMain
End If

End Sub

Private Sub Explorer_Click()

End Sub

193

Private Sub ExpPay_Click()


frmExpPay.Show
End Sub

Private Sub FamGrd_Click()


frmFamilyBack.Show
End Sub

Private Sub JobApp_Click()


frmApplication.Show
End Sub

Private Sub LeaveApp_Click()


frmLeaveApp.Show
End Sub

Private Sub Login_Click()


frmLogin.Show
End Sub

Private Sub logoff_Click()


If MsgBox("Are you sure you want to Log Off the system ?",
vbYesNo + vbQuestion, "Log off") = vbYes Then

Unload Me
frmLogin.Show
End If

End Sub

Private Sub LState_Click()


frmRpLeaveStat.Show
End Sub

194

Private Sub LTypes_Click()


frmLTypes.Show
End Sub

Private Sub MDIForm_Load()


Load frmSideBar
Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Login1 where UserName =" & Trim(UserName) & "",
myConnection, 1, 1
If Not Rs.EOF Then
a = Rs.Fields("Def")
bb = Rs.Fields("App")
c = Rs.Fields("EmpRec")
d = Rs.Fields("LAdmin")
e = Rs.Fields("Perform")
f = Rs.Fields("Payroll")
g = Rs.Fields("RecSearch")
h = Rs.Fields("Reports")
i = Rs.Fields("EDMS")
j = Rs.Fields("Save1")
k = Rs.Fields("Delete1")
l = Rs.Fields("Update1")
m = Rs.Fields("Search1")
n = Rs.Fields("Refresh1")
o = Rs.Fields("Exit1")
UserName = Rs.Fields("UserName")
End If

If UserName = "Administrator" Then


mdiMain.Admin.Enabled = True

195

Else
mdiMain.Admin.Enabled = False
End If

If a = 1 Then
mdiMain.Def.Enabled = True
Else
mdiMain.Def.Enabled = False
End If

If bb = 1 Then
mdiMain.Applications.Enabled = True
Else
mdiMain.Applications.Enabled = False
End If

If c = 1 Then
mdiMain.EmpRec.Enabled = True
Else
mdiMain.EmpRec.Enabled = False
End If

If d = 1 Then
mdiMain.LeaveAdmin.Enabled = True
Else
mdiMain.LeaveAdmin.Enabled = False
End If

If e = 1 Then
mdiMain.Performance.Enabled = True
Else
mdiMain.Performance.Enabled = False

196

End If

If f = 1 Then
mdiMain.Payroll.Enabled = True
Else
mdiMain.Payroll.Enabled = False
End If

If g = 1 Then
mdiMain.RecSear.Enabled = True
Else
mdiMain.RecSear.Enabled = False
End If

If h = 1 Then
mdiMain.Reports.Enabled = True
Else
mdiMain.Reports.Enabled = False
End If

If i = 1 Then
mdiMain.EDMS.Enabled = True
Else
mdiMain.EDMS.Enabled = False
End If

mdiMain.Admini = True

mdiMain.Menu = False

End Sub

197

Private Sub Menu_Click()


frmMenu.Show
End Sub

Private Sub Notepad_Click()


Shell "Notepad.exe", vbNormalFocus
End Sub

Private Sub NOY_Click()


frmRpService.Show
End Sub

Private Sub PayGroup_Click()


frmPayGroup.Show
End Sub

Private Sub PayScale_Click()


frmPayScale.Show
End Sub

Private Sub PerfRec_Click()


frmPerfRec.Show
End Sub

Private Sub PersDet_Click()


frmEmpRec1.Show
End Sub

Private Sub Posting_Click()


frmPosting.Show
End Sub

Private Sub Prom_Click()

198

frmPromotion.Show
End Sub

Private Sub QualPay_Click()


frmQualiPay.Show
End Sub

Private Sub Rank_Click()


frmRank.Show
End Sub

Private Sub Rel_Click()


frmReligion.Show
End Sub

Private Sub Resig_Click()


frmResignation.Show
End Sub

Private Sub Sect_Click()


frmSect.Show
End Sub

Private Sub SelectApp_Click()


frmSelectApp.Show
End Sub

Private Sub ShortList_Click()


frmShortList.Show
End Sub

Private Sub SLC_Click()


frmRpShortList.Show

199

End Sub

Private Sub SuitRep_Click()


frmTermination.Show
End Sub

Private Sub Termi_Click()


frmRpTermination.Show
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)


frmEmpRec1.Show
End Sub

Private Sub Toolbar2_ButtonClick(ByVal Button As MSComctlLib.Button)


frmEmpAtt.Show
End Sub

Private Sub Toolbar3_ButtonClick(ByVal Button As MSComctlLib.Button)


frmLeaveApp.Show
End Sub

Private Sub Toolbar4_ButtonClick(ByVal Button As MSComctlLib.Button)


frmEmployeeRec.Show
End Sub

Private Sub Toolbar5_ButtonClick(ByVal Button As MSComctlLib.Button)


frmRpEmpRec.Show
End Sub

Private Sub URA_Click()


frmAdmin.Show
End Sub

200

Private Sub Verification_Click()


frmVerification.Show
End Sub

Recruitment Manager

Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmbCat_Click()


cmbAppoint.Clear
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from Appointment where Cat = " & Trim(cmbCat)
& " order by

desig", myConnection, 1, 1

If Not Rs.EOF Then


Do While Not Rs.EOF
cmbAppoint.AddItem Rs.Fields("Desig")
Rs.MoveNext
Loop
End If
End Sub

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From Application where SrNo=" & Val(txtSrNo)
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName

txtSrNo.Text = ""
cmbTitle.Text = "[Select One]"
txtName.Text = ""

201

txtFName.Text = ""
MEBDOB = "

MEBCNIC = "

"
-

- "

txtNationality.Text = ""
cmbGender.Text = "[Select One]"
cmbMStatus.Text = "[Select One]"
cmbReligion.Text = "[Select One]"
cmbSect.Text = "[Select One]"
cmbDomicile.Text = "[Select One]"
txtDistrict.Text = ""
MEBDOA = "

MEBPhone = "

"

MEBMobile = "

"
-

"

txtEmail.Text = ""
txtImage.Text = ""
txtMAddress.Text = ""
txtPAddress.Text = ""
cmbCat.Text = "[Select One]"
cmbDte.Text = "[Select One]"
cmbAppoint.Text = "[Select One]"
txtExp.Text = "0"
MEBDOI = "

"

txtMinAge.Text = ""
txtMaxAge.Text = ""
cmbQual.Text = "[Select One]"
txtRemarks.Text = ""
txtCert.Text = ""
txtInst.Text = ""
cmbTitle.SetFocus

End Sub

202

Private Sub cmdUpdate_Click()


myConnection.Execute "Update Application Set Title="
& Trim(cmbTitle.Text) & ", Name=" & Trim(txtName.Text) & ", FName="
& Trim(txtFName.Text) & ", DOB=" & Trim(MEBDOB) & ", CNIC="
& Trim(MEBCNIC) & ", Nationality=" & Trim(txtNationality.Text) & ", Gender="
& Trim(cmbGender.Text) & ", MStatus=" & Trim(cmbMStatus.Text) & ", Religion="
& Trim(cmbReligion.Text) & ", Sect=" & Trim(cmbSect.Text) & ", Domicile="
& Trim(cmbDomicile.Text) & ", District=" & Trim(txtDistrict.Text) & ", DOA="
& Trim(MEBDOA) & ", Phone=" & Trim(MEBPhone) & ", Mobile="
& Trim(MEBMobile) & ", Email=" & Trim(txtEmail.Text) & ", Pic="
& Trim(txtImage.Text) & ", MAddress=" & Trim(txtMAddress.Text) & ", PAddress="
& Trim(txtPAddress.Text) & ", Cat=" & Trim(cmbCat.Text) & ", Dte="
& Trim(cmbDte.Text) & ", Appoint=" & Trim(cmbAppoint.Text) & ",
Exp=" & Val(txtExp.Text) & ", DOI=" & Trim(MEBDOI) & ", Status="
& Val(0) & _", Remarks=" & Trim("null") & ", MinAge="
& Val(txtMinAge.Text) & ", MaxAge=" & Val(txtMaxAge.Text)
& ", Qual=" & Trim(cmbQual.Text) & ", Rem=" & Trim(txtRemarks.Text)
& ", Cert=" & Trim(txtCert.Text) & ", Inst=" & Trim(txtInst.Text)
& " where SrNo=" & Val(txtSrNo)
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName

txtSrNo.Text = ""
cmbTitle.Text = "[Select One]"
txtName.Text = ""
txtFName.Text = ""
MEBDOB = "
MEBCNIC = "

"
-

- "

txtNationality.Text = ""
cmbGender.Text = "[Select One]"
cmbMStatus.Text = "[Select One]"
cmbReligion.Text = "[Select One]"
cmbSect.Text = "[Select One]"
cmbDomicile.Text = "[Select One]"

203

txtDistrict.Text = ""
MEBDOA = "

MEBPhone = "

"

MEBMobile = "

"
-

"

txtEmail.Text = ""
txtImage.Text = ""
txtMAddress.Text = ""
txtPAddress.Text = ""
cmbCat.Text = "[Select One]"
cmbDte.Text = "[Select One]"
cmbAppoint.Text = "[Select One]"
txtExp.Text = "0"
MEBDOI = "

"

txtMinAge.Text = ""
txtMaxAge.Text = ""
cmbQual.Text = "[Select One]"
txtRemarks.Text = ""
txtCert.Text = ""
txtInst.Text = ""
cmbTitle.SetFocus

End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdSearch_Click()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from Application where Name="
& Trim(txtName.Text) & "", myConnection, 1, 1

204

If Not Rs.EOF Then


txtSrNo.Text = Rs.Fields("SrNo")
cmbTitle.Text = Rs.Fields("Title")
txtName.Text = Rs.Fields("Name")
txtFName.Text = Rs.Fields("FName")
MEBDOB = Rs.Fields("DOB")
MEBCNIC = Rs.Fields("CNIC")
txtNationality.Text = Rs.Fields("Nationality")
cmbGender.Text = Rs.Fields("Gender")
cmbMStatus.Text = Rs.Fields("MStatus")
cmbReligion.Text = Rs.Fields("Religion")
cmbSect.Text = Rs.Fields("Sect")
cmbDomicile.Text = Rs.Fields("Domicile")
txtDistrict.Text = Rs.Fields("District")
MEBDOA = Rs.Fields("DOA")
MEBPhone = Rs.Fields("Phone")
MEBMobile = Rs.Fields("Mobile")
txtEmail.Text = Rs.Fields("Email")
txtImage.Text = Rs.Fields("Pic")
txtMAddress.Text = Rs.Fields("MAddress")
txtPAddress.Text = Rs.Fields("PAddress")
cmbCat.Text = Rs.Fields("Cat")
cmbDte.Text = Rs.Fields("Dte")
cmbAppoint.Text = Rs.Fields("Appoint")
txtExp.Text = Rs.Fields("Exp")
MEBDOI = Rs.Fields("DOI")
txtMinAge.Text = Rs.Fields("MinAge")
txtMaxAge.Text = Rs.Fields("MaxAge")
cmbQual.Text = Rs.Fields("Qual")
txtRemarks.Text = Rs.Fields("Rem")
txtCert.Text = Rs.Fields("Cert")
txtInst.Text = Rs.Fields("Inst")
Else

205

MsgBox "Record not found...", vbInformation, App.ProductName


End If
End Sub

Private Sub cmdRefresh_Click()

txtSrNo.Text = ""
cmbTitle.Text = "[Select One]"
txtName.Text = ""
txtFName.Text = ""
MEBDOB = "

MEBCNIC = "

"
-

- "

txtNationality.Text = ""
cmbGender.Text = "[Select One]"
cmbMStatus.Text = "[Select One]"
cmbReligion.Text = "[Select One]"
cmbSect.Text = "[Select One]"
cmbDomicile.Text = "[Select One]"
txtDistrict.Text = ""
MEBDOA = "

MEBPhone = "

"

MEBMobile = "

"
-

"

txtEmail.Text = ""
txtImage.Text = ""
txtMAddress.Text = ""
txtPAddress.Text = ""
cmbCat.Text = "[Select One]"
cmbDte.Text = "[Select One]"
cmbAppoint.Text = "[Select One]"
txtExp.Text = "0"
MEBDOI = "

"

txtMinAge.Text = ""
txtMaxAge.Text = ""

206

cmbQual.Text = "[Select One]"


txtRemarks.Text = ""
txtCert.Text = ""
txtInst.Text = ""
cmbTitle.SetFocus

End Sub

Private Sub cmdSave_Click()


Dim a As Integer
Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close

myConnection.Execute "Insert into Application(Title,Name,FName,


DOB,CNIC,Nationality,Gender,MStatus,Religion,Sect,Domicile,
District,DOA,Phone,Mobile,Email,Pic,MAddress,PAddress,Cat,Dte,Appoint,
Exp,DOI,Status,Remarks,MinAge,MaxAge,Qual,Rem,Cert,Inst)
Values(" & Trim(cmbTitle.Text) & "," & Trim(txtName.Text) & ",
" & Trim(txtFName.Text) & "," & Trim(MEBDOB) & "," & Trim(MEBCNIC)
& "," & Trim(txtNationality.Text) & "," & Trim(cmbGender.Text) & ","
& Trim(cmbMStatus.Text) & "," & Trim(cmbReligion.Text) & "," &
Trim(cmbSect.Text) & "," & Trim(cmbDomicile.Text) & ","
& Trim(txtDistrict.Text) & "," & Trim(MEBDOA) & "," & Trim(MEBPhone)
& "," & Trim(MEBMobile) & "," & Trim(txtEmail.Text) & ","
& Trim(txtImage.Text) & "," & Trim(txtMAddress.Text) & ","
& Trim(txtPAddress.Text) & "," & Trim(cmbCat.Text) & ","
& Trim(cmbDte.Text) & "," & Trim(cmbAppoint.Text) & "," & Val(txtExp.Text)
& "," & Trim(MEBDOI) & "," & Val(0) & "," & Trim("null") & ","
& Val(txtMinAge.Text) & _"," & Val(txtMaxAge.Text) & ","
& Trim(cmbQual.Text) & "," & Trim(txtRemarks.Text) & ","
& Trim(txtCert.Text) & "," & Trim(txtInst.Text) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName

207

txtSrNo.Text = ""
cmbTitle.Text = "[Select One]"
txtName.Text = ""
txtFName.Text = ""
MEBDOB = "

MEBCNIC = "

"
-

- "

txtNationality.Text = ""
cmbGender.Text = "[Select One]"
cmbMStatus.Text = "[Select One]"
cmbReligion.Text = "[Select One]"
cmbSect.Text = "[Select One]"
cmbDomicile.Text = "[Select One]"
txtDistrict.Text = ""
MEBDOA = "

MEBPhone = "

"

MEBMobile = "

"
-

"

txtEmail.Text = ""
txtImage.Text = ""
txtMAddress.Text = ""
txtPAddress.Text = ""
cmbCat.Text = "[Select One]"
cmbDte.Text = "[Select One]"
cmbAppoint.Text = "[Select One]"
txtExp.Text = "0"
MEBDOI = "

"

txtMinAge.Text = ""
txtMaxAge.Text = ""
cmbQual.Text = "[Select One]"
txtRemarks.Text = ""
txtCert.Text = ""
txtInst.Text = ""
cmbTitle.SetFocus

208

End Sub

Private Sub Command7_Click()


frmFindApp.Show
End Sub

Private Sub Form_Load()


If j = 1 Then
cmdSave.Enabled = True
Else
cmdSave.Enabled = False
End If

If k = 1 Then
cmdDelete.Enabled = True
Else
cmdDelete.Enabled = False
End If

If l = 1 Then
cmdUpdate.Enabled = True
Else
cmdUpdate.Enabled = False
End If

If m = 1 Then
cmdSearch.Enabled = True
Else
cmdSearch.Enabled = False
End If

If n = 1 Then
cmdRefresh.Enabled = True

209

Else
cmdRefresh.Enabled = False
End If

If o = 1 Then
cmdExit.Enabled = True
Else
cmdExit.Enabled = False
End If

Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Dte ", myConnection, 1, 1
If Not Rs.EOF Then

Do While Not Rs.EOF

cmbDte.AddItem Rs.Fields("Dte")

Rs.MoveNext

Loop

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Religion ", myConnection, 1, 1
If Not Rs.EOF Then
Do While Not Rs.EOF
cmbReligion.AddItem Rs.Fields("Religion")
Rs.MoveNext
Loop
End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Sect ", myConnection, 1, 1
If Not Rs.EOF Then

210

Do While Not Rs.EOF


cmbSect.AddItem Rs.Fields("Sect")
Rs.MoveNext
Loop
End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Domicile ", myConnection, 1, 1
If Not Rs.EOF Then
Do While Not Rs.EOF
cmbDomicile.AddItem Rs.Fields("Domicile")
Rs.MoveNext
Loop
End If

End Sub
Employee Manager
Connect Setting
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Public Emp, DteID, OffID As String

Private Sub cmdExit_Click()


Unload Me
End Sub

211

Private Sub cmdGenerate_Click()


txtEmp.Text = "1001"

Dim Cat, Dte As String


Cat = txtCat.Text
Dte = txtDte.Text

If Dte = "HR" Then

Emp code generation

txtDteID.Text = "3959"
End If

If Dte = "IT & T" Then


txtDteID.Text = "0786"

Emp code generation

End If

If Dte = "Tfr & Rec" Then


txtDteID.Text = "2898"

Emp code generation

End If

If Dte = "Accounts" Then


txtDteID.Text = "5090"
End If

If Dte = "Land" Then


txtDteID.Text = "7131"
End If

If Dte = "Legal" Then


txtDteID.Text = "4383"
End If

If Dte = "Mkt" Then


txtDteID.Text = "3090"

212

End If

If Dte = "TP & BC" Then


txtDteID.Text = "4181"
End If

If Dte = "Adm" Then


txtDteID.Text = "1020"
End If

If Cat = "dho" Then


txtOffID.Text = "9010"
Else
txtOffID.Text = "8010"
End If

End Sub

Private Sub cmdNewEmp_Click()


frmNewEmp.Show
End Sub

Private Sub cmdRefresh_Click()


txtSrNo.Text = ""
txtEmp.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
txtEmpId.Text = ""
txtTitle.Text = ""
txtName.Text = ""
txtFName.Text = ""

213

txtDOB.Text = ""
txtCNIC.Text = ""
txtNationality.Text = ""
txtGender.Text = ""
txtMStatus.Text = ""
txtReligion.Text = ""
txtSect.Text = ""
txtDomicile.Text = ""
txtDistrict.Text = ""
txtPhone.Text = ""
txtMobile.Text = ""
txtEmail.Text = ""
imgPic.Picture = LoadPicture("")
txtMAddress.Text = ""
txtPAddress.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
DTPDOJ.Refresh
cmbPayScale.Text = "[Select One]"
txtEmpId.SetFocus
End Sub

Updating Data
Private Sub cmdUpdate_Click()
myConnection.Execute "Update EmpRec Set Emp=" & Trim(txtEmp.Text) & ",DteID="
& Trim(txtDteID.Text) & ",OffID=" & Trim(txtOffID.Text) & ",ElecNo="
& Trim(txtElecNo.Text) & ",EmpId=" & Trim(txtEmpId.Text) & ",Title="
& Trim(txtTitle.Text) & ",Name=" & Trim(txtName.Text) & ",FName="
& Trim(txtFName.Text) & ",DOB=" & Trim(txtDOB.Text) & ",CNIC="
& Trim(txtCNIC.Text) & ",Nationality=" & Trim(txtNationality.Text) & ",Gender="
& Trim(txtGender.Text) & ",MStatus=" & Trim(txtMStatus.Text) & ",Religion="
& Trim(txtReligion.Text) & ",Sect=" & Trim(txtSect.Text) & ",Domicile="

214

& Trim(txtDomicile.Text) & ",District=" & Trim(txtDistrict.Text) & ",Phone="


& Trim(txtPhone.Text) & ",Mobile=" & Trim(txtMobile.Text) & ",Email="
& Trim(txtEmail.Text) & ",Pic=" & Trim(txtEmpId.Text) & ",MAddress="
& Trim(txtMAddress.Text) & ",PAddress=" & Trim(txtPAddress.Text) & ",Cat="
& Trim(txtCat.Text) & ",Dte=" & Trim(txtDte.Text) & _",Appoint="
& Trim(txtAppoint.Text) & ",DOJ=" & Trim(DTPDOJ) & ",PayScale="
& Trim(cmbPayScale.Text) & " where SrNo=" & Val(txtSrNo)
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName

..................................................................................
Dim Status As Integer
Status = 0

If Rs.State = 1 Then Rs.Close

myConnection.Execute "Insert into EmpCard (EmpID,Cat,Dte,Name,


Appoint,DOI,DOE,Emp,DteID,OffID,ElecNo,Status) Values("
& Trim(txtEmpId.Text) & "," & Trim(txtCat.Text) & ","
& Trim(txtDte.Text) & "," & Trim(txtName.Text) & ","
& Trim(txtAppoint.Text) & "," & Trim("") & "," & Trim("") & ","
& Trim(txtEmp.Text) & "," & Trim(txtDteID.Text) & ","
& Trim(txtOffID.Text) & "," & Trim(txtElecNo.Text) & ","
& Val(Status) & ")"
MsgBox "Record Saved Successfully...Employee Card", vbInformation, App.ProductName

txtSrNo.Text = ""
txtEmp.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
txtEmpId.Text = ""
txtTitle.Text = ""

215

txtName.Text = ""
txtFName.Text = ""
txtDOB.Text = ""
txtCNIC.Text = ""
txtNationality.Text = ""
txtGender.Text = ""
txtMStatus.Text = ""
txtReligion.Text = ""
txtSect.Text = ""
txtDomicile.Text = ""
txtDistrict.Text = ""
txtPhone.Text = ""
txtMobile.Text = ""
txtEmail.Text = ""
imgPic.Picture = LoadPicture("")
txtMAddress.Text = ""
txtPAddress.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
DTPDOJ.Refresh
cmbPayScale.Text = "[Select One]"
txtEmpId.SetFocus
End Sub

Private Sub Form_Load()


On Error Resume Next
Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from PayScale ", myConnection, 1, 1

216

If Not Rs.EOF Then


Do While Not Rs.EOF
cmbPayScale.AddItem Rs.Fields("PayScale")
Rs.MoveNext
Loop
End If
Err.Clear
End Sub

Private Sub txtEmpID_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpRec where EmpID=" & Trim(txtEmpId.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtEmp.Text = Rs.Fields("Emp")
txtDteID.Text = Rs.Fields("DteID")
txtOffID.Text = Rs.Fields("OffID")
txtElecNo.Text = Rs.Fields("ElecNo")
txtEmpId.Text = Rs.Fields("EmpID")
txtTitle.Text = Rs.Fields("Title")
txtName.Text = Rs.Fields("Name")
txtFName.Text = Rs.Fields("FName")
txtDOB = Rs.Fields("DOB")
txtCNIC = Rs.Fields("CNIC")
txtNationality.Text = Rs.Fields("Nationality")
txtGender.Text = Rs.Fields("Gender")
txtMStatus.Text = Rs.Fields("MStatus")
txtReligion.Text = Rs.Fields("Religion")
txtSect.Text = Rs.Fields("Sect")
txtDomicile.Text = Rs.Fields("Domicile")
txtDistrict.Text = Rs.Fields("District")
txtPhone = Rs.Fields("Phone")

217

txtMobile = Rs.Fields("Mobile")
txtEmail.Text = Rs.Fields("Email")

imgPic.Picture = LoadPicture(App.Path & "\Pics\" & Rs.Fields("Pic") & ".jpg")


txtMAddress.Text = Rs.Fields("MAddress")
txtPAddress.Text = Rs.Fields("PAddress")
txtCat.Text = Rs.Fields("Cat")
txtDte.Text = Rs.Fields("Dte")
txtAppoint.Text = Rs.Fields("Appoint")
DTPDOJ.Value = Format(Rs.Fields("DOJ"), "dd-mm-yyyy")
cmbPayScale.Text = Rs.Fields("PayScale")
Else
MsgBox "Record not found..."
End If

End Sub

Leave Manager
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From LeaveApp where SrNo=" & Val(txtSrNo.Text)
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName
txtEmpID.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
txtName.Text = ""
txtDOE.Text = ""

218

txtPAddress.Text = ""
txtPerAddress.Text = ""
cmbLType.Text = "[Select One]"
MEBDate = "

"

DTP1.Value = Date
DTP2.Value = Date
txtTotal.Text = ""
txtEmpID.SetFocus
End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdFindLeaves_Click()


frmFindLeaves.Show
End Sub

Private Sub cmdRefresh_Click()

txtEmpID.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
txtName.Text = ""
txtDOE.Text = ""
txtPAddress.Text = ""
txtPerAddress.Text = ""
cmbLType.Text = "[Select One]"
MEBDate = "

"

DTP1.Value = Date
DTP2.Value = Date
txtTotal.Text = ""

219

txtEmpID.SetFocus
End Sub

Private Sub cmdSave_Click()


Dim a As Integer
Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close

If txtTotal.Text = "" Then


MsgBox "Please Press Calc Days Button....", vbInformation, App.ProductName
Else
myConnection.Execute "Insert into LeaveApp (EmpID,Cat,Dte,
Appoint,Name,DOE,PAddress,PerAddress,LTypes,Date1,From1,To1,Total)
Values(" & Trim(txtEmpID.Text) & "," & Trim(txtCat.Text) & ","
& Trim(txtDte.Text) & "," & Trim(txtAppoint.Text) & ",
" & Trim(txtName.Text) & "," & Trim(txtDOE.Text) & ",
" & Trim(txtPAddress.Text) & "," & Trim(txtPerAddress.Text)
& "," & Trim(cmbLType.Text) & "," & Trim(MEBDate) & ",
" & Trim(DTP1) & "," & Trim(DTP2) & "," & Val(txtTotal.Text) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName
txtEmpID.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
txtName.Text = ""
txtDOE.Text = ""
txtPAddress.Text = ""
txtPerAddress.Text = ""
cmbLType.Text = "[Select One]"
MEBDate = "

"

DTP1.Value = Date
DTP2.Value = Date
txtTotal.Text = ""

220

txtEmpID.SetFocus
End If
End Sub

Private Sub cmdUpdate_Click()


myConnection.Execute "Update LeaveApp Set EmpID = "
& Trim(txtEmpID.Text) & ",Cat=" & Trim(txtCat.Text) & ",Dte=" & Trim(txtDte.Text)
& ",Appoint=" & Trim(txtAppoint.Text) & ",Name=" & Trim(txtName.Text)
& ",DOE=" & Trim(txtDOE.Text) & ",PAddress="
& Trim(txtPAddress.Text) & ",PerAddress="
& Trim(txtPerAddress.Text) & ",LTypes=" & Trim(cmbLType.Text)
& ",Date1=" & Trim(MEBDate) & ",From1=" & Trim(DTP1)
& ",To1=" & Trim(DTP2) & ",Total="
& Val(txtTotal.Text) & " where SrNo=" & Val(txtSrNo)
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName

txtEmpID.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
txtName.Text = ""
txtDOE.Text = ""
txtPAddress.Text = ""
txtPerAddress.Text = ""
cmbLType.Text = "[Select One]"
MEBDate = "

"

DTP1.Value = Date
DTP2.Value = Date
txtTotal.Text = ""
txtSrNo.Text = ""
txtEmpID.SetFocus
End Sub
Private Sub Command1_Click()

221

Dim Ans As Integer


Dim DYear As Integer
Dim DMonth As Integer
Dim DDays As Integer

Dim CYear As String


Dim CMonth As Integer
Dim CDays As Integer

Dim JYear As Integer


Dim JMonth As Integer
Dim JDays As Integer

Dim Availed As Integer


Dim a As Integer
Dim B As Integer
Dim Availed1 As Integer
a = 0
B = 0

Availed = 0
Availed1 = 0

Ans = DTP2 - DTP1 + 1


txtTotal.Text = Ans

JYear = Year(txtDOE.Text)
JMonth = MOnth(txtDOE.Text)
JDays = Day(txtDOE.Text)

CYear = Year(DTP1.Value)
CMonth = MOnth(DTP1.Value)
CDays = Day(DTP1.Value)

222

DYear = CYear - JYear


DMonth = DateDiff("m", txtDOE.Text, DTP1)
CDays = CDays - JDays + 1

Label16.Caption = CYear - JYear


Label17.Caption = DateDiff("m", txtDOE.Text, DTP1) CMonth - JMonth
Label18.Caption = CDays - JDays + 1

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LeaveApp where LTypes=" & Trim(cmbLType.Text)
& " and EmpID=" & Trim(txtEmpID.Text) & "", myConnection, 1, 1
While Not Rs.EOF
Availed = Rs.Fields("Total")
a = a + Availed
Rs.MoveNext

Wend

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LeaveApp where LTypes=" & Trim(cmbLType.Text)
& " and EmpID=" & Trim(txtEmpID.Text) & " and Year(From1) = "
& Trim(CYear) & "", myConnection, 1, 1
While Not Rs.EOF
Availed1 = Rs.Fields("Total")
B = B + Availed1
Rs.MoveNext

Wend

Label18.Caption = a

Earned Leaves.......................................................................

223

If cmbLType.Text = "Earned" And Ans > 90 Then


MsgBox "Earned Leaves more then 90 Days at a time are not allowed...",
vbInformation, App.ProductName
End If

Casual Leaves on Probation.........................................................


If cmbLType.Text = "Casual" And DMonth < 4 And a >= 2 Then
MsgBox "Casual Leaves Not Allowed...Already taken 2 Leaves",
vbInformation, App.ProductName
Else
If cmbLType.Text = "Casual" And DMonth < 4 And Ans > 1 Then
MsgBox "On porbation, More than 1 Leaves at a time not Allowed",
vbInformation, App.ProductName
Else
Casual Leaves Less than 6 Months...........................................
If cmbLType.Text = "Casual" And DMonth < 7 And DMonth > 3 And a >= 5 Then
MsgBox "Casual Leaves Not Allowed...Already taken 5 Leaves",
vbInformation, App.ProductName
Else
If cmbLType.Text = "Casual" And DMonth < 7 And DMonth > 3 And Ans > 2 Then
MsgBox "Sevice Less than 6 Months, More
than 2 Leaves at a time not Allowed", vbInformation, App.ProductName
Else
Casual Leave less than 1 year.............................................
If cmbLType.Text = "Casual" And DMonth < 12 And DMonth > 6 And a >= 10 Then
MsgBox "Casual Leaves Not Allowed...Already taken 10 Leaves",
vbInformation, App.ProductName
Else
If cmbLType.Text = "Casual" And DMonth < 12 And DMonth > 6 And Ans > 5 Then
MsgBox "Sevice Less than 1 year, More than 5 Leaves at a time not
Allowed", vbInformation, App.ProductName
Else
If cmbLType.Text = "Casual" And B >= 20 Then

224

MsgBox "No Casual Leave is left...Use Earned Leaves",


vbInformation, App.ProductName
Else
If cmbLType.Text = "Casual" And Ans > 10 Then
MsgBox "More than 10 Casual Leaves are not allowed at a time",
vbInformation, App.ProductName
End If
End If
End If
End If
End If
End If
End If
End If

End Sub

Private Sub Form_Load()


DTP1.Value = Date
DTP2.Value = Date
MEBDate = Date
Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LTypes ", myConnection, 1, 1
If Not Rs.EOF Then
Do While Not Rs.EOF
cmbLType.AddItem Rs.Fields("LTypes")
Rs.MoveNext
Loop

225

End If
End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub txtEmpID_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpRec where EmpID=" & Trim(txtEmpID.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtEmpID.Text = Rs.Fields("EmpID")
txtName.Text = Rs.Fields("Name")
txtCat.Text = Rs.Fields("Cat")
txtDte.Text = Rs.Fields("Dte")
txtAppoint.Text = Rs.Fields("Appoint")
txtDOE.Text = Rs.Fields("DOJ")
..................

txtPAddress.Text = Rs.Fields("MAddress")
txtPerAddress.Text = Rs.Fields("PAddress")

Else
MsgBox "Record not found..."
End If

End Sub

226

Attendance Manager
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmdBookOff_Click()


Dim a, B As String
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from DailyAtt where EmpNo=" & Trim(txtEmpNo.Text)
& " order by SrNo desc", myConnection, 1, 1

If Not Rs.EOF Then


a = Rs.Fields("EmpNo")
B = Rs.Fields("Time2")
End If

If B = "0" Then

myConnection.Execute "Update DailyAtt Set Time2=" & Trim(lblTime.Caption)


& " where EmpNo=" & Trim(txtEmpNo.Text) & " and Date1 = " & Trim(DTPicker1) & ""
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName
lblResult.BackColor = &HC0&
lblResult.Caption = ""
MsgBox "Booked Off Successfully... Have a nice Evening", vbInformation, App.ProductName

227

txtEmpNo.Text = ""
txtCat.Text = ""
txtEmpID.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
lblName.Caption = ""
lblAppoint.Text = ""
txtDte.Text = ""
lblResult.Caption = ""
lblResult.BackColor = &HC0C0C0
imgPic.Picture = LoadPicture("")
txtEmpNo.SetFocus
Else
MsgBox "Already Booked Off...", vbInformation, App.ProductName
txtEmpNo.Text = ""
txtCat.Text = ""
txtEmpID.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
lblName.Caption = ""
lblAppoint.Text = ""
txtDte.Text = ""

txtEmpNo.SetFocus
End If
End Sub

Private Sub cmdBookon_Click()


Dim aa As Integer
Set Rs = New ADODB.Recordset

228

Dim a As String
Dim B As String

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from DailyAtt where EmpNo = "
& Trim(txtEmpNo.Text) & "order by SrNo desc", myConnection, 1, 1

If Not Rs.EOF Then


While Not Rs.EOF

a = Rs.Fields("EmpNo")
B = Rs.Fields("Date1")

Rs.MoveNext
srno = srno + 1
Wend
End If

If Trim(txtEmpNo.Text) = Trim(Rs.Fields("EmpNo")) And Format(DTPicker1, "dd-mm-yyyy")


= Format(Rs.Fields("Date1"), "dd-mm-yyyy") Then
If Trim(txtEmpNo.Text) = a And Format(DTPicker1, "dd/mm/yyyy") = B Then
lblResult.BackColor = &HC0&
lblResult.Caption = ""
MsgBox "Already Booked on... Relax", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtEmpID.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
lblName.Caption = ""
lblAppoint.Text = ""

229

txtDte.Text = ""
lblResult.Caption = ""
lblResult.BackColor = &HC0C0C0
imgPic.Picture = LoadPicture("")
txtEmpNo.SetFocus

Else
If txtEmpNo.Text = "" Then
MsgBox "Please Enter Employee No...", vbInformation, App.ProductName
Else
myConnection.Execute "Insert into DailyAtt (EmpNo,Cat,EmpID,
DteID,OffID,ElecNo,Name,
Appoint,Dte,Pic,Date1,Time1,Time2)
Values(" & Trim(txtEmpNo.Text) & ","
Trim(txtCat.Text) & "," & Trim(txtEmpID.Text)
& "," & Trim(txtDteID.Text)& ","
& Trim(txtOffID.Text) & ","
& Trim(txtElecNo.Text) & "," & Trim(lblName.Caption) & ","
&Trim(lblAppoint.Text) & "," & Trim(txtDte.Text)
& "," & Trim(txtEmpNo.Text) & "," & Trim(DTPicker1) & ","
& Trim(lblTime.Caption) & "," & Trim(0) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName
lblResult.BackColor = &H4000&
lblResult.Caption = ""
MsgBox "Booked on... Successfully, Good Morning", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtEmpID.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""

230

lblName.Caption = ""
lblAppoint.Text = ""
txtDte.Text = ""
lblResult.Caption = ""
lblResult.BackColor = &HC0C0C0
imgPic.Picture = LoadPicture("")
txtEmpNo.SetFocus
End If

End If

End Sub

Private Sub cmdRefresh_Click()

txtEmpNo.Text = ""
txtCat.Text = ""
txtEmpID.Text = ""
txtDteID.Text = ""
txtOffID.Text = ""
txtElecNo.Text = ""
lblName.Caption = ""
lblAppoint.Text = ""
txtDte.Text = ""
lblResult.Caption = ""
lblResult.BackColor = &HC0C0C0
imgPic.Picture = LoadPicture("")
txtEmpNo.SetFocus
End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset

231

DTPicker1 = Date
End Sub

Private Sub Text5_Change()

End Sub

Private Sub Timer1_Timer()


lblTime.Caption = Time
End Sub

Private Sub Timer2_Timer()


If Label1.ForeColor = vbWindowBackground Then
Label1.ForeColor = vbBlack
Else
Label1.ForeColor = vbWindowBackground
End If
End Sub

Private Sub txtEmpNo_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpCard where EmpID=" & Trim(txtEmpNo.Text) & "", myConnection, 1, 1
If Not Rs.EOF Then
txtStatus.Text = Rs.Fields("CStatus")

If txtStatus.Text = "Resigned" Or txtStatus.Text = "Terminated" Then

MsgBox "The person is no more on job... Please contact Dir HR", vbInformation, App.ProductNam
Else
txtEmpNo.Text = Rs.Fields("EmpID")
txtCat.Text = Rs.Fields("Cat")

232

txtEmpID.Text = Rs.Fields("Emp")
txtDteID.Text = Rs.Fields("DteID")
txtOffID.Text = Rs.Fields("OffID")
txtElecNo.Text = Rs.Fields("ElecNo")
lblName.Caption = Rs.Fields("Name")
lblAppoint.Text = Rs.Fields("Appoint")
txtDte.Text = Rs.Fields("Dte")
imgPic.Picture = LoadPicture("")
On Error Resume Next
imgPic.Picture = LoadPicture(App.Path & "\Pics\" & Rs.Fields("EmpID") & ".jpg")
Err.Clear
End If
Else
MsgBox "Record not found..."

End If

End Sub

Side Bar
Private Sub Command1_Click()
Shell "Notepad.exe", vbNormalFocus
End Sub
Private Sub Command2_Click()
Shell "calc.exe", vbNormalFocus
End Sub

Private Sub Command3_Click()


mdiMain.chngPass_Click
End Sub

233

Private Sub Command4_Click()


Skinner1.Enabled = Not Skinner1.Enabled
If Skinner1.Enabled Then
Command4.Caption = "Disable &skin"
Else
Command4.Caption = "Enable &skin"
End If
End Sub

Private Sub Command5_Click()


mdiMain.logoff_Click
End Sub

Private Sub Command6_Click()

Unload mdiMain
End Sub

Private Sub Form_Load()


Me.Left = 0
Me.Top = 0

Text1.Text = "Logged in as : " & UserName


Text2.Text = Time
Label2.Caption = Date

End Sub

Private Sub Form_Unload(Cancel As Integer)


mdiMain.sidebar.Checked = False
End Sub

234

Private Sub Timer1_Timer()


Label4.Caption = Time
End Sub
Performance Manager
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From PerfRec where SrNo=" & Val(txtSrNo.Text)
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOJ.Text = ""
txtFrom.Text = ""
txtTo.Text = ""
cmbAG.Text = "[Select One]"
txtStr.Text = ""
txtWeakness.Text = ""
cmbRecPro.Text = "[Select]"
DTP1.Value = Date
cmbPartII.Text = "[Select One]"
cmbPartIII.Text = "[Select One]"
cmbHR.Text = "[Select One]"
txtYear.Text = ""
txtEmpNo.SetFocus

235

End Sub

Private Sub cmdRefresh_Click()


txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOJ.Text = ""
txtFrom.Text = ""
txtTo.Text = ""
cmbAG.Text = "[Select One]"
txtStr.Text = ""
txtWeakness.Text = ""
cmbRecPro.Text = "[Select]"
DTP1.Value = Date
cmbPartII.Text = "[Select One]"
cmbPartIII.Text = "[Select One]"
cmbHR.Text = "[Select One]"
txtYear.Text = ""
txtEmpNo.SetFocus
End Sub

Private Sub cmdSave_Click()


Dim a As String
Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from PerfRec where EmpNo=" & Trim(txtEmpNo.Text) & " and Year1="
& Trim(txtYear.Text) & " order by Year1", myConnection, 1, 1
If Not Rs.EOF Then
a = Rs.Fields("Year1")
End If

236

If a = txtYear.Text Then
MsgBox "Record Already Exists....", vbInformation, App.ProductName
Else

myConnection.Execute "Insert into PerfRec (EmpNo,Cat,Name,Appoint,Dte,DOJ,From1,To1,AG,Str,Weakne


Date1,PartII,PartIII,Conc,Year1) Values(" & Trim(txtEmpNo.Text)
& "," & Trim(txtCat.Text) & "," & Trim(txtName.Text) & ","
& Trim(txtAppoint.Text) & "," & Trim(txtDte.Text) & ","
& Trim(txtDOJ.Text) & "," & Trim(txtFrom.Text) & ","
& Trim(txtTo.Text) & "," & Trim(cmbAG.Text) & ","
& Trim(txtStr.Text) & "," & Trim(txtWeakness.Text)
& "," & Trim(cmbRecPro.Text) & "," & Trim(DTP1.Value) & ","
& Trim(cmbPartII.Text) & "," & Trim(cmbPartIII.Text) & ","
& Trim(cmbHR.Text) & "," & Trim(txtYear.Text) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOJ.Text = ""
txtFrom.Text = ""
txtTo.Text = ""
cmbAG.Text = "[Select One]"
txtStr.Text = ""
txtWeakness.Text = ""
cmbRecPro.Text = "[Select]"
DTP1.Value = Date
cmbPartII.Text = "[Select One]"
cmbPartIII.Text = "[Select One]"
cmbHR.Text = "[Select One]"

237

txtYear.Text = ""
txtEmpNo.SetFocus
End If
End Sub

Private Sub cmdUpdate_Click()


myConnection.Execute "Update PerfRec Set AG=" & Trim(cmbAG.Text) & ",Str="
& Trim(txtStr.Text) & ",Weakness=" & Trim(txtWeakness.Text)
& ",RecPro=" & Trim(cmbRecPro.Text) & ",Date1=" & Trim(DTP1.Value)
& ",PartII=" & Trim(cmbPartII.Text) & ",PartIII=" & Trim(cmbPartIII.Text)
& ",Conc=" & Trim(cmbHR.Text) & ",Year1=" & Trim(txtYear.Text) & "
where SrNo=" & Val(txtSrNo)
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOJ.Text = ""
txtFrom.Text = ""
txtTo.Text = ""
cmbAG.Text = "[Select One]"
txtStr.Text = ""
txtWeakness.Text = ""
cmbRecPro.Text = "[Select]"
DTP1.Value = Date
cmbPartII.Text = "[Select One]"
cmbPartIII.Text = "[Select One]"
cmbHR.Text = "[Select One]"
txtYear.Text = ""
txtEmpNo.SetFocus

238

End Sub

Private Sub Command1_Click()


frmFindPerfRec.Show
End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset

DTP1.Value = Date

If j = 1 Then
cmdSave.Enabled = True
Else
cmdSave.Enabled = False
End If

If k = 1 Then
cmdDelete.Enabled = True
Else
cmdDelete.Enabled = False
End If

If l = 1 Then
cmdUpdate.Enabled = True
Else
cmdUpdate.Enabled = False
End If

If m = 1 Then
cmdSearch.Enabled = True
Else
cmdSearch.Enabled = False

239

End If

If n = 1 Then
cmdRefresh.Enabled = True
Else
cmdRefresh.Enabled = False
End If

If o = 1 Then
cmdExit.Enabled = True
Else
cmdExit.Enabled = False
End If
End Sub

Private Sub txtEmpNo_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpRec where EmpID=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtEmpNo.Text = Rs.Fields("EmpID")
txtName.Text = Rs.Fields("Name")
txtCat.Text = Rs.Fields("Cat")
txtDte.Text = Rs.Fields("Dte")
txtAppoint.Text = Rs.Fields("Appoint")
txtDOJ.Text = Rs.Fields("DOJ")
..................
Else
MsgBox "Record not found..."
End If

240

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Contract where EmpID=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtFrom.Text = Rs.Fields("CF")
txtTo.Text = Rs.Fields("EO")

..................
Else
MsgBox "Record not found..."
End If

End Sub

Search manager
Private Sub cmdRefresh_Click()
txtEmpNo.Text = ""
txtCat.Text = ""
txtDte.Text = ""
txtAppoint.Text = ""
txtName.Text = ""
txtPayScale.Text = ""
txtDOJ.Text = ""
txtProcess.Text = ""
txtStatus.Text = ""
txtEStatus.Text = ""
txtIssued.Text = ""
txtExpires.Text = ""
txtDDate.Text = ""
txtCStatus.Text = ""
txtReason.Text = ""

241

txtExtended.Text = ""
txtSC.Text = ""
txtWarning.Text = ""
txtDOB.Text = ""

txtEmpNo.SetFocus

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from LeaveApp where EmpID = "


& Trim(txtEmpNo.Text) & "")

MSFlexGrid.FormatString = "ID
& vbTab & "From
& vbTab & "Total

" & vbTab & "Leave Type


" & vbTab & "To

"

MSFlexGrid.Rows = 1

srno = 1

End Sub

Private Sub cmdSearch_Click()


Dim SC As Integer
Dim Warning As Integer

242

"
"

Dim Advice As Integer


Dim Cancel As Integer

SC = 0
Warning = 0
Advice = 0
Cancel = 0

Set Rs = New ADODB.Recordset


If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpRec where EmpId=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtEmpNo.Text = Rs.Fields("EmpId")
txtCat.Text = Rs.Fields("Cat")
txtDte.Text = Rs.Fields("Dte")
txtAppoint.Text = Rs.Fields("Appoint")
txtName.Text = Rs.Fields("Name")
txtPayScale.Text = Rs.Fields("PayScale")
txtDOJ.Text = Rs.Fields("DOJ")
txtDOB.Text = Rs.Fields("DOB")

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Verification1 where EmpNo=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtProcess.Text = Rs.Fields("Process")
txtStatus.Text = Rs.Fields("Status")

End If

243

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from EmpCard where EmpId=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtIssued.Text = Rs.Fields("DOI")
txtExpires.Text = Rs.Fields("DOE")

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Suitability where EmpNo=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtDDate.Text = Rs.Fields("DDate")
txtCStatus.Text = Rs.Fields("Status1")
txtEStatus.Text = Rs.Fields("Status1")
txtReason.Text = Rs.Fields("Reason")
txtExtended.Text = Rs.Fields("EDate")

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Descipline where EmpNo=" & Trim(txtEmpNo.Text)
& " and Status = Issued", myConnection, 1, 1
While Not Rs.EOF
SC = SC + 1
Rs.MoveNext
Wend
txtSC.Text = SC

244

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Descipline where EmpNo=" & Trim(txtEmpNo.Text)
& " and Stat=Warning", myConnection, 1, 1
While Not Rs.EOF
Warning = Warning + 1
Rs.MoveNext
Wend
txtWarning.Text = Warning

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Descipline where EmpNo=" & Trim(txtEmpNo.Text)
& " and Stat=Advice", myConnection, 1, 1
While Not Rs.EOF
Advice = Advice + 1
Rs.MoveNext
Wend
txtAdvices.Text = Advice

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from Descipline where EmpNo=" & Trim(txtEmpNo.Text)
& " and Stat=Cancel", myConnection, 1, 1
While Not Rs.EOF
Cancel = Cancel + 1
Rs.MoveNext
Wend
txtCancel.Text = Cancel

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="

245

& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from LeaveApp where EmpID = "


& Trim(txtEmpNo.Text) & "")

MSFlexGrid.FormatString = "ID
& vbTab & "From
& vbTab & "Total

" & vbTab & "Leave Type


" & vbTab & "To

"
"

"

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!LTypes & vbTab & Rs!From1
& vbTab & Rs!To1 & vbTab & Rs!Total

Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub Command1_Click()


Dim a, B As String
a = DTP2 - DTP1
txtR = a

246

End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;
DataSource=" & App.Path & "\Admini.mdb;Persist
Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from LeaveApp where EmpID = "


& Trim(txtEmpNo.Text) & "")

MSFlexGrid.FormatString = "ID

" & vbTab & "Leave Type

" & vbTab & "From

" & vbTab & "To

& vbTab & "Total

"

"

MSFlexGrid.Rows = 1

srno = 1

End Sub

-------------------------Leave Record Searching--------------------------

Option Explicit
Dim con As ADODB.Connection

247

Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub Combo1_Change()

End Sub

Private Sub cmbLTypes_Click()

Dim Availed As Integer


Dim Remaining As Integer
Dim a As Integer
Dim Allowed As Integer
Dim Comulated As Integer
Dim AMonth As Integer
Dim CMonth As Integer
Dim RMonth As Integer

a = 0
Availed = 0
Remaining = 0
Comulated = 0

Set Rs = New ADODB.Recordset

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LTypes where LTypes=" & Trim(cmbLTypes.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtApA.Text = Rs.Fields("ALeaves")
Allowed = txtApA.Text
Else
MsgBox "Record not found...", vbInformation, App.ProductName

248

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from EmpRec where EmpID=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
Comulated = Rs.Fields("BLeaves")

End If

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LeaveApp where LTypes=" & Trim(cmbLTypes.Text)
& " and EmpID=" & Trim(txtEmpNo.Text) & "", myConnection, 1, 1
While Not Rs.EOF
a = Rs.Fields("Total")
Availed = a + Availed
Rs.MoveNext

Wend

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LeaveApp where EmpID=" & Trim(txtEmpNo.Text)
& " order by From1", myConnection, 1, 1
If Not Rs.EOF Then
AMonth = Year(Rs.Fields("DOE"))
CMonth = Year(Rs.Fields("From1"))
End If

RMonth = DateDiff("y", AMonth, CMonth)


txtTA.Text = Availed
Remaining = Comulated - Availed

If cmbLTypes.Text = "Casual" Then

249

txtRem.Text = Allowed - Availed


Else
If RMonth < 1 Then
Comulated = 0
txtApA.Text = 0
Else
Comulated = Allowed + Comulated

If Comulated > 180 Then


Comulated = 180
Else
Comulated = Comulated
End If
End If
txtRem.Text = Comulated - Availed
End If

End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdLCal_Click()

frmLeavecal.Show

frmLeavecal.txtEmpNo.Text = txtEmpNo.Text
frmLeavecal.txtName.Text = txtName.Text
frmLeavecal.txtAppoint.Text = txtAppoint.Text

End Sub

250

Private Sub cmdSearch_Click()


Dim CMonth As Integer
Dim CYear As Integer

CMonth = MOnth(DTP1.Value)
CYear = Year(DTP1.Value)

If CMonth = "1" Then


Frame4.Caption = "January " & CYear
End If

If CMonth = "2" Then


Frame4.Caption = "February " & CYear
End If

If CMonth = "3" Then


Frame4.Caption = "March " & CYear
End If

If CMonth = "4" Then


Frame4.Caption = "April " & CYear
End If

If CMonth = "5" Then


Frame4.Caption = "May " & CYear
End If

251

If CMonth = "6" Then


Frame4.Caption = "June " & CYear
End If

If CMonth = "7" Then


Frame4.Caption = "July " & CYear
End If

If CMonth = "8" Then


Frame4.Caption = "August " & CYear
End If

If CMonth = "9" Then


Frame4.Caption = "September " & CYear
End If

If CMonth = "10" Then


Frame4.Caption = "October " & CYear
End If

If CMonth = "11" Then


Frame4.Caption = "November " & CYear
End If

If CMonth = "12" Then


Frame4.Caption = "December " & CYear
End If

252

End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from LeaveApp where EmpID like "


& txtEmpNo.Text & "%")

MSFlexGrid.FormatString = "ID
" & vbTab & "Applied On
& vbTab & "To

" & vbTab & "Leave Type


" & vbTab & "From
" & vbTab & "Total

MSFlexGrid.Rows = 1

DTP1.Value = Date
DTP2.Value = Date

If Rs.State = 1 Then Rs.Close


Rs.Open "Select * from LTypes ", myConnection, 1, 1
If Not Rs.EOF Then
Do While Not Rs.EOF
cmbLTypes.AddItem Rs.Fields("LTypes")

253

"
"

Rs.MoveNext
Loop
End If
End Sub

Private Sub MSFlexGrid_Click()


Dim a As String
Dim B As String
If MSFlexGrid.MouseRow = 0 Or MSFlexGrid.MouseCol = 0 Then
Text1.Visible = False
Exit Sub
End If
Text1.Text = ""

Text1.Visible = True
Text1.Text = Grid1.Text
Dim irow, icol As Integer

For irow = MSFlexGrid.Row To MSFlexGrid.RowSel


For icol = MSFlexGrid.Col To MSFlexGrid.ColSel
On Error Resume Next

DTP1.Value = MSFlexGrid.TextMatrix(irow, icol + 2)


DTP2.Value = MSFlexGrid.TextMatrix(irow, icol + 3)
Err.Clear
Next
Next

End Sub

Private Sub txtEmpNo_Change()

254

Set Rs = New ADODB.Recordset


If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpCard where EmpID=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
txtEmpNo.Text = Rs.Fields("EmpID")
txtName.Text = Rs.Fields("Name")
txtAppoint.Text = Rs.Fields("Appoint")
txtDte.Text = Rs.Fields("Dte")

Else
MsgBox "Record not found..."

End If

Set Rs = New ADODB.Recordset


Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from LeaveApp where EmpID = "


& Trim(txtEmpNo.Text) & "")

MSFlexGrid.FormatString = "ID
& vbTab & "Applied On
& vbTab & "To

" & vbTab & "Leave Type


" & vbTab & "From

" & vbTab & "Total

255

"
"

"

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!LTypes & vbTab


& Rs!Date1 & vbTab
& Rs!From1 & vbTab & Rs!To1 & vbTab & Rs!Total

Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Module
Public myConnection As ADODB.Connection

Public UserName, Pass As String


Public a As Integer
Public bb As Integer
Public c As Integer
Public d As Integer
Public e As Integer
Public f As Integer
Public g As Integer
Public h As Integer
Public i As Integer
Public j As Integer

256

Public k As Integer
Public l As Integer
Public m As Integer
Public n As Integer
Public o As Integer
Public gCrystalObj As Object

Public Sub Main()


frmMain.Show
Dim str As String
Create a connection between vb and mdb file
str = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &
App.Path & "\Admini.mdb;Persist Security Info=False"
Set myConnection = New ADODB.Connection
myConnection.Open str

mdiMain.Show
End Sub
EDMS Manager
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer
Dim a As Integer
Dim fso As New FileSystemObject

Private Sub cmdDelete_Click()


frmCabinet.Show
End Sub

Private Sub cmdEdit_Click()

257

frmCabinet.Show
End Sub

Private Sub cmdEmail_Click()


Shell ("C:\Program Files\Microsoft Office\Office10\OUTLOOK.exe")
End Sub

Private Sub cmdFDelete_Click()


frmFolder.Show
End Sub

Private Sub cmdFEdit_Click()


frmFolder.Show
End Sub

Private Sub cmdFNew_Click()


frmFolder.Show
End Sub

Private Sub cmdFRefresh_Click()


txtFolder.Text = ""
MSFlexGrid2.Refresh
Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection

strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\PS.mdb;Persis

con.Open strConnString

Set Rs = New ADODB.Recordset

258

Set Rs = con.Execute("Select * from PS Where Cabinet = "

& Trim(txtFile_No.Text) & "")

MSFlexGrid2.FormatString = "ID

" & vbTab & "File No

" & vbTab & "Service Status


& "Arm Svc

" & vbTab & "Cab

" & vbTab & "Unit Fmn

" & vbTab & "PA No

" & vbTab & "Rank

" & vbTab & "Service Status

"

& vbTab & "Unit Fmn

" & vbTab & "Name

" & vbTab & "Arm Svc


& "PA No

" & vbTab

" & vbTab & "Rank

" & vbTab & "Service Status


& vbTab & "Arm Svc

vbTab & "PA No

" & vbTab & "Rank

"
" & vbTab & "PA No

" & vbTab & "Service Status

End Sub

Private Sub cmdGraph_Click()


frmGraph.Show
End Sub

Private Sub cmdHelp_Click()


Shell ("D:\Digital Picture Viewer\Officers Offence Management System.doc")
End Sub

Private Sub cmdNewCabinet_Click()


frmCabinet.Show
End Sub

Private Sub cmdPrint_Click()


Shell ("D:\Digital Picture Viewer\EasyPrint_VB.exe")
End Sub

Private Sub cmdRefresh_Click()

259

txtCabinet.Text = ""
End Sub

Private Sub cmdScan_Click()


Shell ("C:\Program Files\ScandAll 21\FImage.exe")
End Sub

Private Sub cmdViewRec_Click()


frmViewRecord.Show
End Sub

Private Sub cmdZoom_Click()


frmZoomPic.Show
End Sub

Private Sub Command2_Click()


frmZoomPicB.Show
End Sub

Private Sub Command3_Click()


frmZoomPicC.Show
End Sub

Private Sub Command4_Click()


frmZoomPicJSS.Show
End Sub

Private Sub File1_Click()


Dim pic As String
pic = File1.Path & "\" & File1.FileName
Image1.Picture = LoadPicture(pic)

260

End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset

Text1.Text = ""
Dir1.Path = "H:\PSDte\PS1\Img\"

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Cabinet")

MSFlexGrid.FormatString = "ID

" & vbTab & "Cabinet

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!Name


Rs.MoveNext
srno = srno + 1
Wend

Rs.Close

261

"

Set Rs = Nothing

Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from EmpRec Where


Cat = " & Trim(txtFile_No.Text) & "")

MSFlexGrid2.FormatString = "ID
& vbTab & "Emp No

" & vbTab & "Emp Cat

"

" & vbTab & "Name

& vbTab & "CNIC

" & vbTab & "Date of Birth

End Sub

Private Sub MSFlexGrid_Click()


On Error GoTo errorH
Dim A As Integer
myConnection.BeginTrans

Dim a As String
Dim B As String
If MSFlexGrid.MouseRow = 0 Or MSFlexGrid.MouseCol = 0 Then
Text1.Visible = False
Exit Sub

262

End If
Text1.Text = ""

Text1.Visible = True
Text1.Text = Grid1.Text
Dim irow, icol As Integer

For irow = MSFlexGrid.Row To MSFlexGrid.RowSel


For icol = MSFlexGrid.Col To MSFlexGrid.ColSel
txtFile_No.Text = MSFlexGrid.TextMatrix(irow, icol)
Next
Next

txtFile_No.SetFocus

myConnection.CommitTrans
Exit Sub
errorH:
myConnection.RollbackTrans
MsgBox "Please Select Cabinet... " + Err.Description, vbCritical + vbOK

Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

263

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from EmpRec Where Cat = "


& Trim(txtFile_No.Text) & " order by EmpID")

MSFlexGrid2.FormatString = "ID
& vbTab & "Emp No

" & vbTab & "Emp Cat

"

" & vbTab & "Name

& vbTab & "CNIC

" & vbTab & "Date of Birth

MSFlexGrid2.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid2.AddItem srno & vbTab & Rs!Cat & vbTab & Rs!EmpID & vbTab
& Rs!Name & vbTab & Rs!FName & vbTab & Rs!CNIC & vbTab & Rs!DOB
Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub MSFlexGrid2_Click()


On Error GoTo errorH
Dim A As Integer
myConnection.BeginTrans

Dim a As String
Dim B As String
If MSFlexGrid2.MouseRow = 0 Or MSFlexGrid2.MouseCol = 0 Then
Text1.Visible = False

264

Exit Sub
End If
Text1.Text = ""

Text1.Visible = True
Text1.Text = Grid1.Text
Dim irow, icol As Integer

For irow = MSFlexGrid2.Row To MSFlexGrid2.RowSel


For icol = MSFlexGrid2.Col To MSFlexGrid2.ColSel
Text1.Text = MSFlexGrid2.TextMatrix(irow, icol + 1)
Next
Next

txtFile_No.SetFocus

myConnection.CommitTrans
Exit Sub
errorH:
myConnection.RollbackTrans
MsgBox "Please Select Cabinet... " + Err.Description, vbCritical + vbOK
If txtFile_No = "DHO" Then
Dir1.Path = "\\Server\hr dte$\HR\EDMS\"
If Text1.Text <> "" Then
If fso.FolderExists("\\Server\hr dte$\HR\EDMS\" & Text1.Text) Then
File1.Path = "\\Server\hr dte$\HR\EDMS\" & Text1.Text
Else
MsgBox "Required Record not found....", vbInformation, App.ProductName
End If
End If
End If
Else

265

If txtFile_No = "DHS" Then


Dir1.Path = "\\Server\hr dte$\HR\EDMS\"
If Text1.Text <> "" Then
If fso.FolderExists("\\Server\hr dte$\HR\EDMS\" & Text1.Text) Then
File1.Path = "\\Server\hr dte$\HR\EDMS\" & Text1.Text
Else
MsgBox "Required Record not found....", vbInformation, App.ProductName
End If
End If
End If

End Sub

Private Sub Text1_GotFocus()


If txtFile_No = "PS1C" Then
If Text1.Text <> "" Then
If fso.FolderExists("H:\PSDte\PS1\Img\" & Text1.Text) Then
File1.Path = "H:\PSDte\PS1\Img\" & Text1.Text
Else
MsgBox "Required Record not found...."
End If
End If
End If
Else

If txtFile_No = "PS1C JSS" Then


If Text1.Text <> "" Then
If fso.FolderExists("H:\PSDte\PS1\JSS\" & Text1.Text) Then
File1.Path = "H:\PSDte\PS1\JSS\" & Text1.Text
Else
MsgBox "Required Record not found...."
End If

266

End If
End If

If txtFile_No = "PS1B" Then


Dir1.Path = "H:\PSDte\PS2\"
If Text1.Text <> "" Then
If fso.FolderExists("H:\PSDte\PS2\" & Text1.Text) Then
File1.Path = "H:\PSDte\PS2\" & Text1.Text
Else
MsgBox "Required Record not found...."
End If
End If
End If

If txtFile_No = "PS1A" Then


Dir1.Path = "H:\PSDte\PS3\"
If Text1.Text <> "" Then
If fso.FolderExists("H:\PSDte\PS3\" & Text1.Text) Then
File1.Path = "H:\PSDte\PS3\" & Text1.Text
Else
MsgBox "Required Record not found...."
End If
End If
End If

End Sub

Private Sub txtCabinet_KeyUp(KeyCode As Integer, Shift As Integer)


Set Rs = New ADODB.Recordset

Dim strConnString As String

267

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Cabinet Where


Name = " & Trim(txtCabinet.Text) & "")

MSFlexGrid.FormatString = "ID

" & vbTab & "Cabinet

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!Name


Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub txtFile_No_GotFocus()


Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data

268

"

Source=" & App.Path & "\PS.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from PS Where Cabinet = "


& Trim(txtFile_No.Text) & "")

MSFlexGrid2.FormatString = "ID

" & vbTab & "File No

& vbTab & "Cabinet

" & vbTab & "PA No

& "Rank

" & vbTab

" & vbTab & "Service Status

& "Unit Fmn


& "Rank

"

" & vbTab

" & vbTab & "Name


" & vbTab & "Service Status

& vbTab & "Unit Fmn

" & vbTab & "Name

& vbTab & "Arm Svc


& "Rank

" & vbTab & "PA No

"
" & vbTab

" & vbTab & "Service Status

& vbTab & "Unit Fmn

"

" & vbTab & "Name

& vbTab & "Arm Svc


& "Rank

"

" & vbTab & "PA No

"
" & vbTab

" & vbTab & "Service Status

& vbTab & "Unit Fmn


& vbTab & "Arm Svc
& vbTab & "Rank

" & vbTab & "Name


" & _vbTab & "PA No

"
"

" & vbTab & "Service Status

& vbTab & "Unit Fmn


& vbTab & "Arm Svc

"

"

" & vbTab & "Name

"

" & vbTab & "Award Year

& vbTab & "Cat of Award

"
"

MSFlexGrid2.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid2.AddItem srno & vbTab & Rs!File_No & vbTab

269

& Rs!Cabinet & vbTab & Rs!PA_No & vbTab & Rs!Rank & vbTab
& Rs!Svc_Status & vbTab & Rs!Unit_Fmn & vbTab & Rs!Name
& vbTab & Rs!Arm_Svc & vbTab & Rs!PA_No_2 & vbTab & Rs!Rank_2
& vbTab & Rs!Svc_Status_2 & vbTab & Rs!Unit_Fmn_2 & vbTab
& Rs!Name_2 & vbTab & Rs!Arm_Svc_2 & vbTab & Rs!PA_No_3
& vbTab & Rs!Rank_3 & vbTab & Rs!Svc_Status_3 & vbTab
& Rs!Unit_Fmn_3 & vbTab & Rs!Name_3 & vbTab & Rs!Arm_Svc_3
& vbTab & Rs!PA_No_4 & vbTab & Rs!Rank_4 & vbTab
& Rs!Svc_Status_4 & vbTab & Rs!Unit_Fmn_4 & vbTab & Rs!Name_4
& vbTab & Rs!Arm_Svc_4 & vbTab & Rs!PA_No_5 & vbTab & Rs!Rank_5
& vbTab & Rs!Svc_Status_5 & vbTab & Rs!Unit_Fmn_5 & vbTab
& Rs!Name_5 & vbTab & Rs!Arm_Svc_5 & vbTab & Rs!Award_Year
& vbTab & Rs!Cat_of_Award
Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub txtFolder_KeyUp(KeyCode As Integer, Shift As Integer)


Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

270

Set Rs = con.Execute("Select * from EmpRec Where EmpID = "


& Trim(txtFolder.Text) & "")

MSFlexGrid2.FormatString = "ID
& vbTab & "Emp No

" & vbTab & "Emp Cat

"

" & vbTab & "Name

& vbTab & "Father Name

"

& vbTab & "CNIC

" & vbTab & "Date of Birth

MSFlexGrid2.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid2.AddItem srno & vbTab & Rs!Cat & vbTab


& Rs!EmpID & vbTab & Rs!Name & vbTab & Rs!FName & vbTab & Rs!CNIC & vbTab & Rs!DOB
Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub txtPANo_KeyUp(KeyCode As Integer, Shift As Integer)


Set Rs = New ADODB.Recordset

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\PS.mdb;Persist Security Info=False"

271

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from PS Where PA_No = "


& Trim(txtPANo.Text) & "")

MSFlexGrid2.FormatString = "ID

" & vbTab & "File No

"
& vbTab & "Cabinet

" & vbTab & "PA No

& "Rank

" & vbTab

"

& vbTab & "Service Status

" & vbTab & "Unit Fmn

& vbTab & "Name


& "Arm Svc

"

" & vbTab


"

& vbTab & "PA No

" & vbTab & "Rank

& "Service Status


& vbTab & "Name
& vbTab & "Arm Svc
& vbTab & "Rank

" & vbTab & "Unit Fmn

" & vbTab & "PA No

" & vbTab & "Unit Fmn

" & vbTab & "Na

" & vbTab & "Unit Fmn


" & vbTab & "Arm Svc
"
" & vbTab & "Unit Fmn
" & vbTab & "Arm Svc

& vbTab & "Cat of Award

MSFlexGrid2.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid2.AddItem srno & vbTab & Rs!File_No

"

" & vbTab & "Award Year


"

272

"

"

" & vbTab & "Rank

& vbTab & "Service Status


& vbTab & "Name

"

" & vbTab

& vbTab & "Service Status

& _vbTab & "PA No

"

"

& "Service Status

& vbTab & "Name

" & vbTab

& vbTab & Rs!Cabinet & vbTab & Rs!PA_No & vbTab
& Rs!Rank & vbTab & Rs!Svc_Status & vbTab & Rs!Unit_Fmn
& vbTab & Rs!Name & vbTab & Rs!Arm_Svc & vbTab
& Rs!PA_No_2 & vbTab & Rs!Rank_2 & vbTab & Rs!Svc_Status_2
& vbTab & Rs!Unit_Fmn_2 & vbTab & Rs!Name_2 & vbTab
& Rs!Arm_Svc_2 & vbTab & Rs!PA_No_3 & vbTab & Rs!Rank_3 & vbTab
& Rs!Svc_Status_3 & vbTab & Rs!Unit_Fmn_3 & vbTab & Rs!Name_3
& vbTab & Rs!Arm_Svc_3 & vbTab & Rs!PA_No_4 & vbTab
& Rs!Rank_4 & vbTab & Rs!Svc_Status_4 & vbTab & Rs!Unit_Fmn_4
& vbTab & Rs!Name_4 & vbTab & Rs!Arm_Svc_4 & vbTab & Rs!PA_No_5
& vbTab & Rs!Rank_5 & vbTab & Rs!Svc_Status_5 & vbTab
& Rs!Unit_Fmn_5 & vbTab & Rs!Name_5 & vbTab & Rs!Arm_Svc_5
& vbTab & Rs!Award_Year & vbTab & Rs!Cat_of_Award
Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub
------------------------------------Zooom Pic--------------------------------Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer
Dim a As Integer
Dim fso As New FileSystemObject

Private Sub Command1_Click()


File1.Visible = False
Image1.Width = Image1.Width + 200
Image1.Height = Image1.Height + 200
Image1.Left = Image1.Left - 100

273

End Sub

Private Sub Command2_Click()


File1.Visible = True
Image1.Width = Image1.Width - 200
Image1.Height = Image1.Height - 200
Image1.Left = Image1.Left + 100
End Sub

Private Sub File1_Click()


Dim pic As String
pic = File1.Path & "\" & File1.FileName
Image1.Picture = LoadPicture(pic)
End Sub

Private Sub Form_Load()


On Error GoTo errorH

Dir1.Path = "\\Server\hr dte$\HR\EDMS\"

Dim pic As String


Dim pic1 As String
Text1.Text = frmpPicViewer.Text1.Text
File1.Path = "C:\PSDte\PS1\Img\" & Text1.Text
pic = frmpPicViewer.File1.Path

Image1.Picture = LoadPicture("\\Server\hr dte$\HR\EDMS\"


& Text1.Text & "\" & frmpPicViewer.File1.FileName)

If Text1.Text <> "" Then


If fso.FolderExists("\\Server\hr dte$\HR\EDMS\" & Text1.Text) Then
File1.Path = "\\Server\hr dte$\HR\EDMS\" & Text1.Text

274

Else
MsgBox "Required Record not found...."
End If
End If

Exit Sub
errorH:
myConnection.RollbackTrans
MsgBox "Please Select Appropriate Section... " + Err.Description
, vbCritical + vbOK
End Sub
Administration
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From Login1 where UserName="
& Trim(txtUser.Text) & ""
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName
txtUser.Text = ""
txtPassword.Text = ""
txtConPass.Text = ""
chDef.Value = 0
chApp.Value = 0
chEmpRec.Value = 0
chLAdmin.Value = 0
chPerform.Value = 0
chPayroll.Value = 0
chRecSearch.Value = 0
chReports.Value = 0

275

chEDMS.Value = 0
chSave.Value = 0
chDelete.Value = 0
chUpdate.Value = 0
chSearch.Value = 0
chRefresh.Value = 0
chExit.Value = 0
txtUser.SetFocus

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Login1")

MSFlexGrid.FormatString = "ID

" & vbTab & "User Name

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!UserName

Rs.MoveNext
srno = srno + 1
Wend

276

"

Rs.Close
Set Rs = Nothing
End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdSave_Click()


Dim a, B, c, d, e, f, g, h, i, j, k, l, m, n, o As Integer

If chDef.Value = 1 Then
a = 1
Else
a = 0
End If

If chApp.Value = 1 Then
B = 1
Else
B = 0
End If

If chEmpRec.Value = 1 Then
c = 1
Else
c = 0
End If

If chLAdmin.Value = 1 Then
d = 1

277

Else
d = 0
End If

If chPerform.Value = 1 Then
e = 1
Else
e = 0
End If

If chPayroll.Value = 1 Then
f = 1
Else
f = 0
End If

If chRecSearch.Value = 1 Then
g = 1
Else
g = 0
End If

If chReports.Value = 1 Then
h = 1
Else
h = 0
End If

If chEDMS.Value = 1 Then
i = 1
Else
i = 0
End If

278

If chSave.Value = 1 Then
j = 1
Else
j = 0
End If

If chDelete.Value = 1 Then
k = 1
Else
k = 0
End If

If chUpdate.Value = 1 Then
l = 1
Else
l = 0
End If

If chSearch.Value = 1 Then
m = 1
Else
m = 0
End If

If chRefresh.Value = 1 Then
n = 1
Else
n = 0
End If

If chExit.Value = 1 Then
o = 1

279

Else
o = 0
End If

Set Rs = New ADODB.Recordset

If txtPassword.Text = txtConPass.Text Then


If Rs.State = 1 Then Rs.Close
myConnection.Execute "Insert into Login1 (UserName,Password1,ConPass,
Def,App,EmpRec,LAdmin,Perform,Payroll,RecSearch,Reports,

EDMS,Save1,Delete1,Update1,Search1,Refresh1,Exit1) Values(" & Trim(txtUser.Text) & "," & Trim(


MsgBox "Record Saved Successfully...", vbInformation, App.ProductName

txtUser.Text = ""
txtPassword.Text = ""
txtConPass.Text = ""
chDef.Value = 0
chApp.Value = 0
chEmpRec.Value = 0
chLAdmin.Value = 0
chPerform.Value = 0
chPayroll.Value = 0
chRecSearch.Value = 0
chReports.Value = 0
chEDMS.Value = 0
chSave.Value = 0
chDelete.Value = 0
chUpdate.Value = 0
chSearch.Value = 0
chRefresh.Value = 0
chExit.Value = 0
txtUser.SetFocus

280

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Login1")

MSFlexGrid.FormatString = "ID

" & vbTab & "User Name

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!UserName

Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
Else
MsgBox "Please Enter Correct Password...", vbInformation,
App.ProductName
End If
End Sub

281

"

Private Sub cmdUpdate_Click()


Dim a, B, c, d, e, f, g, h, i, j, k, l, m, n, o As Integer

If chDef.Value = 1 Then
a = 1
Else
a = 0
End If

If chApp.Value = 1 Then
B = 1
Else
B = 0
End If

If chEmpRec.Value = 1 Then
c = 1
Else
c = 0
End If

If chLAdmin.Value = 1 Then
d = 1
Else
d = 0
End If

If chPerform.Value = 1 Then
e = 1
Else
e = 0

282

End If

If chPayroll.Value = 1 Then
f = 1
Else
f = 0
End If

If chRecSearch.Value = 1 Then
g = 1
Else
g = 0
End If

If chReports.Value = 1 Then
h = 1
Else
h = 0
End If

If chEDMS.Value = 1 Then
i = 1
Else
i = 0
End If

If chSave.Value = 1 Then
j = 1
Else
j = 0
End If

If chDelete.Value = 1 Then

283

k = 1
Else
k = 0
End If

If chUpdate.Value = 1 Then
l = 1
Else
l = 0
End If

If chSearch.Value = 1 Then
m = 1
Else
m = 0
End If

If chRefresh.Value = 1 Then
n = 1
Else
n = 0
End If

If chExit.Value = 1 Then
o = 1
Else
o = 0
End If

myConnection.Execute "Update Login1 Set Password1="


& Trim(txtPassword.Text) & ",ConPass="
& Trim(txtConPass.Text) & ",Def=" & Val(a) & ",App=" & Val(B)
& ",EmpRec=" & Val(c) & ",LAdmin=" & Val(d) & ",Perform=" & Val(e)

284

& ",Payroll=" & Val(f) & ",RecSearch=" & Val(g) & ",Reports="
& Val(h) & ",EDMS=" & Val(i) & ",Save1=" & Val(j) & ",Delete1="
& Val(k) & ",Update1=" & Val(l) & ",Search1=" & Val(m) & ",Refresh1="
& Val(n) & ",Exit1=" & Val(o) & "
where UserName=" & Trim(txtUser.Text) & ""
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName
txtUser.Text = ""
txtPassword.Text = ""
txtConPass.Text = ""
chDef.Value = 0
chApp.Value = 0
chEmpRec.Value = 0
chLAdmin.Value = 0
chPerform.Value = 0
chPayroll.Value = 0
chRecSearch.Value = 0
chReports.Value = 0
chEDMS.Value = 0
chSave.Value = 0
chDelete.Value = 0
chUpdate.Value = 0
chSearch.Value = 0
chRefresh.Value = 0
chExit.Value = 0
txtUser.SetFocus

Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
& App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

285

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Login1")

MSFlexGrid.FormatString = "ID

" & vbTab

& "User Name

"

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!UserName

Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing

End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset
Dim strConnString As String

Set con = New ADODB.Connection


strConnString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=" & App.Path & "\Admini.mdb;Persist Security Info=False"

con.Open strConnString

286

Set Rs = New ADODB.Recordset

Set Rs = con.Execute("Select * from Login1")

MSFlexGrid.FormatString = "ID

" & vbTab

& "User Name

"

MSFlexGrid.Rows = 1

srno = 1
While Not Rs.EOF

MSFlexGrid.AddItem srno & vbTab & Rs!UserName

Rs.MoveNext
srno = srno + 1
Wend

Rs.Close
Set Rs = Nothing
End Sub

Private Sub MSFlexGrid_Click()


Dim a As String
Dim B As String
If MSFlexGrid.MouseRow = 0 Or MSFlexGrid.MouseCol = 0 Then
Text1.Visible = False
Exit Sub
End If
Text1.Text = ""

Text1.Visible = True

287

Text1.Text = Grid1.Text
Dim irow, icol As Integer

For irow = MSFlexGrid.Row To MSFlexGrid.RowSel


For icol = MSFlexGrid.Col To MSFlexGrid.ColSel
txtUser.Text = MSFlexGrid.TextMatrix(irow, icol)
Next
Next

If txtUser.Text = "Administrator" Then


cmdExit.Enabled = False
cmdUpdate.Enabled = False
cmdSave.Enabled = False
cmdDelete.Enabled = False

End If

Set Rs = New ADODB.Recordset


If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from Login1 where UserName="
& Trim(txtUser.Text)& "", myConnection, 1, 1
If Not Rs.EOF Then
txtPassword.Text = Rs.Fields("Password1")
txtConPass.Text = Rs.Fields("ConPass")
chDef.Value = Rs.Fields("Def")
chApp.Value = Rs.Fields("App")
chEmpRec.Value = Rs.Fields("EmpRec")
chLAdmin.Value = Rs.Fields("LAdmin")
chPerform.Value = Rs.Fields("Perform")
chPayroll.Value = Rs.Fields("Payroll")
chRecSearch.Value = Rs.Fields("RecSearch")
chReports.Value = Rs.Fields("Reports")
chEDMS.Value = Rs.Fields("EDMS")

288

chSave.Value = Rs.Fields("Save1")
chDelete.Value = Rs.Fields("Delete1")
chUpdate.Value = Rs.Fields("Update1")
chSearch.Value = Rs.Fields("Search1")
chRefresh.Value = Rs.Fields("Refresh1")
chExit.Value = Rs.Fields("Exit1")

Else
MsgBox "Record not found..."
End If
End Sub

Payroll Manager
Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From EmpGrossPay where EmpNo="
& Trim(txtEmpNo.Text) & ""
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOA.Text = ""
txtDOB.Text = ""
txtGrade.Text = ""
txtACNo.Text = ""

289

txtBasicPay.Text = "0"
txtHRA.Text = "0"
txtMedical.Text = "0"
txtConveyance.Text = "0"
txtTGP.Text = "0"

txtMarriedAll.Text = "0"
txtExpPay.Text = "0"
txtTechPay.Text = "0"
txtQualiPay.Text = "0"
txtPerfPay.Text = "0"
txtDearAll.Text = "0"
txtInc.Text = "0"
txtSpecAll.Text = "0"
txtSpecInc.Text = "0"
txtAdminDir.Text = "0"
txtGP.Text = "0"
txtEmpNo.SetFocus

End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdGP_Click()


Dim MarriedAll As Long
Dim ExpPay As Long
Dim TechPay As Long
Dim QualiPay As Long
Dim PerfPay As Long
Dim DearAll As Long
Dim Inc As Long

290

Dim SpecAll As Long


Dim SpecInc As Long
Dim AdminDir As Long

Dim TGP As Long

MarriedAll = txtMarriedAll.Text
ExpPay = txtExpPay.Text
TechPay = txtTechPay.Text
QualiPay = txtQualiPay.Text
PerfPay = txtPerfPay.Text
DearAll = txtDearAll.Text
Inc = txtInc.Text
SpecAll = txtSpecAll.Text
SpecInc = txtSpecInc.Text
AdminDir = txtAdminDir.Text

TGP = txtTGP.Text

txtGP.Text = MarriedAll + ExpPay + TechPay + QualiPay + PerfPay + DearAll


+ Inc + SpecAll + SpecInc + AdminDir + TGP

End Sub

Private Sub cmdSave_Click()


Dim a As Integer
Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpGrossPay where EmpNo=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then

291

txtTemp.Text = Rs.Fields("EmpNo")
End If

If txtEmpNo.Text = txtTemp.Text Then


MsgBox "Data Already Exists..."
txtEmpNo.Text = ""
txtTemp.Text = ""
Else

myConnection.Execute "Insert into EmpGrossPay (EmpNo,Cat,Name,Appoint,Dte,DOA,DOB,Grade,A


TGP,MarriedAll,ExpPay,TechPay,QualiPay,PerfPay,Dearall,Inc,SpecAll,
SpecInc,AdminDir,GP) Values(" & Val(txtEmpNo.Text) & ","
& Trim(txtCat.Text) & "," & Trim(txtName.Text) & "," &
Trim(txtAppoint.Text) & "," & Trim(txtDte.Text) & "," &
Trim(txtDOA.Text) & "," & Trim(txtDOB.Text) & ","
& Trim(txtGrade.Text) & "," & Trim(txtACNo.Text)
& "," & Trim(txtBasicPay.Text) & "," & Trim(txtHRA.Text)
& "," & Trim(txtMedical.Text) & "," & Trim(txtConveyance.Text)
& "," & Trim(txtTGP.Text) & "," & Trim(txtMarriedAll.Text)
& "," & Trim(txtExpPay.Text) & "," & Trim(txtTechPay.Text)
& "," & Trim(txtQualiPay.Text) & "," & Trim(txtPerfPay.Text)
& "," & Trim(txtDearAll.Text) & "," & Trim(txtInc.Text)
& "," & Trim(txtSpecAll.Text) & "," & Trim(txtSpecInc.Text)
& "," & Trim(txtAdminDir.Text) & "," & Trim(txtGP.Text) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName
txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOA.Text = ""
txtDOB.Text = ""
txtGrade.Text = ""

292

txtACNo.Text = ""
txtBasicPay.Text = "0"
txtHRA.Text = "0"
txtMedical.Text = "0"
txtConveyance.Text = "0"
txtTGP.Text = "0"

txtMarriedAll.Text = "0"
txtExpPay.Text = "0"
txtTechPay.Text = "0"
txtQualiPay.Text = "0"
txtPerfPay.Text = "0"
txtDearAll.Text = "0"
txtInc.Text = "0"
txtSpecAll.Text = "0"
txtSpecInc.Text = "0"
txtAdminDir.Text = "0"
txtGP.Text = "0"
txtEmpNo.SetFocus
End If

End Sub

Private Sub cmdSearch_Click()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpGrossPay where EmpNo=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then

txtEmpNo.Text = Rs.Fields("EmpNo")
txtCat.Text = Rs.Fields("Cat")
txtName.Text = Rs.Fields("Name")

293

txtAppoint.Text = Rs.Fields("Appoint")
txtDte.Text = Rs.Fields("Dte")
txtDOA.Text = Rs.Fields("DOA")
txtDOB.Text = Rs.Fields("DOB")
txtGrade.Text = Rs.Fields("Grade")
txtACNo.Text = Rs.Fields("AcNo")

txtBasicPay.Text = Rs.Fields("BasicPay")
txtHRA.Text = Rs.Fields("HRA")
txtMedical.Text = Rs.Fields("Medical")
txtConveyance.Text = Rs.Fields("Convey")
txtTGP.Text = Rs.Fields("TGP")

txtMarriedAll.Text = Rs.Fields("MarriedAll")
txtExpPay.Text = Rs.Fields("ExpPay")
txtTechPay.Text = Rs.Fields("TechPay")
txtQualiPay.Text = Rs.Fields("QualiPay")
txtPerfPay.Text = Rs.Fields("PerfPay")
txtDearAll.Text = Rs.Fields("DearAll")
txtInc.Text = Rs.Fields("Inc")
txtSpecAll.Text = Rs.Fields("SpecAll")
txtSpecInc.Text = Rs.Fields("SpecInc")
txtAdminDir.Text = Rs.Fields("AdminDir")
txtGP.Text = Rs.Fields("GP")

End If
End Sub

Private Sub cmdTGP_Click()


Dim BP As Long
Dim HRA As Long
Dim Medical As Long
Dim Convey As Long

294

BP = txtBasicPay.Text
HRA = txtHRA.Text
Medical = txtMedical.Text
Convey = txtConveyance.Text

txtTGP.Text = BP + HRA + Medical + Convey


End Sub

Private Sub cmdRefresh_Click()


txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOA.Text = ""
txtDOB.Text = ""
txtGrade.Text = ""
txtACNo.Text = ""
txtBasicPay.Text = "0"
txtHRA.Text = "0"
txtMedical.Text = "0"
txtConveyance.Text = "0"
txtTGP.Text = "0"

txtMarriedAll.Text = "0"
txtExpPay.Text = "0"
txtTechPay.Text = "0"
txtQualiPay.Text = "0"
txtPerfPay.Text = "0"
txtDearAll.Text = "0"
txtInc.Text = "0"

295

txtSpecAll.Text = "0"
txtSpecInc.Text = "0"
txtAdminDir.Text = "0"
txtGP.Text = "0"
txtEmpNo.SetFocus
End Sub

Private Sub Command4_Click()

End Sub

Private Sub cmdUpdate_Click()


myConnection.Execute "Update EmpGrossPay Set BasicPay="
& Trim(txtBasicPay.Text) & ",HRA=" & Trim(txtHRA.Text)

& ",Medical=" & Trim(txtMedical.Text) & ",Convey=" & Trim(txtConveyance.Text) & ",TGP=" & T
& Trim(txtExpPay.Text) & ",TechPay=" & Trim(txtTechPay.Text) & ",QualiPay="
& Trim(txtQualiPay.Text) & ",PerfPay=" & Trim(txtPerfPay.Text) & ",DearAll="

& Trim(txtDearAll.Text) & ",Inc=" & Trim(txtInc.Text) & ",SpecAll=" & Trim(txtSpecAll.Text
& Trim(txtAdminDir.Text) & ",GP=" & Trim(txtGP.Text) & " where EmpNo="
& Trim(txtEmpNo.Text) & ""
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName

txtEmpNo.Text = ""
txtCat.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
txtDte.Text = ""
txtDOA.Text = ""
txtDOB.Text = ""
txtGrade.Text = ""
txtACNo.Text = ""
txtBasicPay.Text = "0"
txtHRA.Text = "0"

296

txtMedical.Text = "0"
txtConveyance.Text = "0"
txtTGP.Text = "0"

txtMarriedAll.Text = "0"
txtExpPay.Text = "0"
txtTechPay.Text = "0"
txtQualiPay.Text = "0"
txtPerfPay.Text = "0"
txtDearAll.Text = "0"
txtInc.Text = "0"
txtSpecAll.Text = "0"
txtSpecInc.Text = "0"
txtAdminDir.Text = "0"
txtGP.Text = "0"
txtEmpNo.SetFocus
End Sub

Private Sub Form_Load()


Set Rs = New ADODB.Recordset
End Sub

Private Sub Frame1_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub txtEmpNo_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpPayroll where EmpNo=" & Val(txtEmpNo.Text),
myConnection, 1, 1
If Not Rs.EOF Then

297

txtStatus.Text = Rs.Fields("Resigned")

If txtStatus.Text = 1 Then
MsgBox "This Employee is no more on job...... Please contact HR/OD"
txtEmpNo.Text = ""
Else
txtCat.Text = Rs.Fields("Cat")
txtEmpNo.Text = Rs.Fields("EmpNo")
txtName.Text = Rs.Fields("Name")
txtAppoint.Text = Rs.Fields("Appoint")
txtGrade.Text = Rs.Fields("Grade")
txtDOA.Text = Rs.Fields("DOA")
txtDte.Text = Rs.Fields("Dte")
txtDOB.Text = Rs.Fields("DOB")
txtACNo.Text = Rs.Fields("ACNo")
End If

End If
End Sub
-----------------------------------------------------------------------------------Private Sub cmdGPSlip_Click()
Dim Rs As New ADODB.Recordset

If Rs.State = 1 Then Rs.Close

Rs.Open "Select * from EmpNetPay where Month1=" & Trim(cmbMonth.Text)


& " and Year1 = " & Trim(cmbYear.Text) & " and Cat = " & Trim(cmbCat.Text)
& "

and Dte = " & Trim(cmbDte.Text) & "", myConnection, adOpenStatic, adLockReadOnly

If Not Rs.EOF Then


Set deMT.rscomADRA.DataSource = Rs
Set deHR.rscomAppl.DataSource = Rs

pImageFilePath = (App.Path & "\Pics\" & Rs.Fields("Pic") & ".jpg")

298

crptEmpRec.Pic2 = pImageFilePath

crptNetPayInd.DiscardSavedData
crptNetPayInd.Database.SetDataSource Rs, 3, 1
Set gCrystalObj = crptNetPayInd
frmCrystalReport.Show

End If
End Sub

Private Sub cmdPreview_Click()


Dim Rs As New ADODB.Recordset

If Rs.State = 1 Then Rs.Close

Rs.Open "Select * from EmpNetPay where Month1=" & Trim(cmbMonth.Text)


& " and Year1 = " & Trim(cmbYear.Text) & " and Cat = " & Trim(cmbCat.Text)
& "", myConnection, adOpenStatic, adLockReadOnly
If Not Rs.EOF Then
Set deMT.rscomADRA.DataSource = Rs
Set deHR.rscomAppl.DataSource = Rs

pImageFilePath = (App.Path & "\Pics\" & Rs.Fields("Pic") & ".jpg")

crptEmpRec.Pic2 = pImageFilePath

crptNetPay.DiscardSavedData
crptNetPay.Database.SetDataSource Rs, 3, 1
Set gCrystalObj = crptNetPay
frmCrystalReport.Show

End If
End Sub

299

Private Sub Form_Load()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from Dte ", myConnection, 1, 1
If Not Rs.EOF Then
Do While Not Rs.EOF
cmbDte.AddItem Rs.Fields("Dte")
Rs.MoveNext
Loop
End If
End Sub
-----------------------------------------------------------------------------------Option Explicit
Dim con As ADODB.Connection
Dim Rs As ADODB.Recordset
Dim srno As Integer

Private Sub cmbGrade_Change()

End Sub

Private Sub cmdDelete_Click()


myConnection.Execute "Delete From EmpPayRoll where EmpNo=" & Val(txtEmpNo)
MsgBox "Record Deleted Successfully...", vbInformation, App.ProductName
cmbCat.Text = ""
txtEmpNo.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
cmbGrade.Text = ""
txtDOA.Text = ""
cmbDte.Text = ""
txtDOB.Text = ""
txtACNo.Text = ""

300

chResigned.Value = 0
txtEmpNo.SetFocus
End Sub

Private Sub cmdSearch_Click()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpPayRoll where EmpNo=" & Val(txtEmpNo.Text),
myConnection, 1, 1
If Not Rs.EOF Then
cmbCat.Text = Rs.Fields("Cat")
txtEmpNo.Text = Rs.Fields("EmpNo")
txtName.Text = Rs.Fields("Name")
txtAppoint.Text = Rs.Fields("Appoint")
cmbGrade.Text = Rs.Fields("Grade")
txtDOA.Text = Rs.Fields("DOA")
cmbDte.Text = Rs.Fields("Dte")
txtDOB.Text = Rs.Fields("DOB")
txtACNo.Text = Rs.Fields("AcNo")
chResigned.Value = Rs.Fields("Resigned")

If chResigned.Value = 1 Then
chResigned.BackColor = &HFF&
End If

Else

End If
End Sub

Private Sub cmdUpdate_Click()


myConnection.Execute "Update EmpPayRoll Set Cat=" & Trim(cmbCat.Text)

301

& ",Name=" & Trim(txtName.Text) & ",Appoint=" & Trim(txtAppoint.Text)


& ",Grade=" & Trim(cmbGrade.Text) & ",DOA=" & Trim(txtDOA.Text)
& ",Dte=" & Trim(cmbDte.Text) & ",DOB=" & Trim(txtDOB.Text)
& ",AcNo=" & Trim(txtACNo.Text) & ",Resigned=" & Trim(chResigned.Value)
& " where EmpNo=" & Val(txtEmpNo)
MsgBox "Record Updated Successfully...", vbInformation, App.ProductName
cmbCat.Text = ""
txtEmpNo.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
cmbGrade.Text = ""
txtDOA.Text = ""
cmbDte.Text = ""
txtDOB.Text = ""
txtACNo.Text = ""
chResigned.Value = 0
txtEmpNo.SetFocus

End Sub

Private Sub cmdExit_Click()


Unload Me
End Sub

Private Sub cmdFind_Click()

End Sub

Private Sub cmdRefresh_Click()


cmbCat.Text = ""
txtEmpNo.Text = ""
txtName.Text = ""
txtAppoint.Text = ""

302

cmbGrade.Text = ""
txtDOA.Text = ""
cmbDte.Text = ""
txtDOB.Text = ""
txtACNo.Text = ""
chResigned.Value = 0
chResigned.BackColor = &HE0E0E0
txtEmpNo.SetFocus
End Sub

Private Sub cmdSave_Click()


Dim a As Integer
Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close

myConnection.Execute "Insert into EmpPayRoll (Cat,EmpNo,Name,Appoint,Grade,DOA,Dte,DOB,AcNo,Resig


& Trim(cmbCat.Text) & "," & Val(txtEmpNo.Text) & "," & Trim(txtName.Text)
& "," & Trim(txtAppoint.Text) & "," & Trim(cmbGrade.Text) & ","
& Trim(txtDOA.Text) & "," & Trim(cmbDte.Text) & ","
& Trim(txtDOB.Text) & "," & Trim(txtACNo.Text) & ","
& Trim(chResigned.Value) & ")"
MsgBox "Record Saved Successfully...", vbInformation, App.ProductName
cmbCat.Text = ""
txtEmpNo.Text = ""
txtName.Text = ""
txtAppoint.Text = ""
cmbGrade.Text = ""
txtDOA.Text = ""
cmbDte.Text = ""
txtDOB.Text = ""
txtACNo.Text = ""
chResigned.Value = 0
txtEmpNo.SetFocus

303

End Sub

Set Rs = New ADODB.Recordset

End Sub

Private Sub txtSrNo_Change()

End Sub

Private Sub Label11_Click()

End Sub

Private Sub txtEmpNo_Change()


Set Rs = New ADODB.Recordset
If Rs.State = 1 Then Rs.Close
Rs.Open "Select * from EmpRec where EmpID=" & Trim(txtEmpNo.Text)
& "", myConnection, 1, 1
If Not Rs.EOF Then
cmbCat.Text = Rs.Fields("Cat")
txtEmpNo.Text = Rs.Fields("EmpID")
txtName.Text = Rs.Fields("Name")
txtAppoint.Text = Rs.Fields("Appoint")
cmbGrade.Text = Rs.Fields("PayScale")
txtDOA.Text = Rs.Fields("DOJ")
cmbDte.Text = Rs.Fields("Dte")
txtDOB.Text = Rs.Fields("DOB")

304

txtACNo.Text = "Press Search"


chResigned.Value = 0

Else
MsgBox "Record not found..."

End If
End Sub

Private Sub txtName_Change()

End Sub

305

REFERENCES

[1] Dobkin, D., The RF in RFID. ELSEVIER Inc., 2007.


[2] Fred R. McFadden, J. A. H., Modern Database Management. The Benjamin/Cummings Publishing Compnay Inc., fifth
edition ed., 2000.
[3] George H. Bondar, W. S. H., Account Information System.
Prentice Hall, seventh edition ed., 2001.
[4] Gravina, E., INTRODUCTION TO ORACLE: SQL AND
PL/SQL,STUDENT GUIDE, vol. 1.1,1.2. Jerry brosnan, 2000.
[5] Harrison, R., RFID Technology. Cornerstone solutions, 2004.
[6] Larman, C., Applying UML and Patterns. Prentice Hall, second
edition ed., 2002.
[7] McNamara, C., Human Resources Management. PhD thesis,
2008.
[8] Microsoft, MSDN Library,. Microsoft Corporation., October
2005,.
[9] Petroutsos, E., Mastering Visual Basic 6.0. BPB Publications,
2001.
[10] Pressman, R., Software Engineering A PRACTIONARS APPROACH. McGraw-Hill Companies, fifth edition ed., 2002.
[11] Pressman, R., Software Engineering A PRACTIONARS APPROACH Page no(301,311,337,323). McGraw-Hill Companies,
fifth edition ed., 2002.
[12] WebSite, http://en.wikipedia.org/biometrics, tech. rep.
[13] WebSite, http://en.wikipedia.org/domain model, tech. rep.
[14] WebSite, http://en.wikipedia.org/software Developemntcycle,
tech. rep.
[15] WebSite, http://en.wikipedia.org/use case, tech. rep.
306

[16] Wenday Boggs, M. B., Mastering::UML with Rational Rose


2002. SyBex, 2003.
[17] Winning, E. A., When is an hr department necessary?,
http://www.ewin.com/wearts.htm, p. 4, Copyright 2005.

307

INDEX

chip, 32
Classes, 141
code, 188
collaboration Diagrams, 116
communication, iv
component diagram, 125
Conclusion, 154

Acceptance testing, 141


Actors, 38
AddEmloyee(), 130
administrator, 10
Adopted comversion, 129
AHRIS, 87, 139, 188
Analysis, 38
Analysis model, 75
antenna, 35
Applicants, 165
architecture, 87
Architecutre diagram, 98
Attendance, 36, 170
attendance, 19
Attendance Management, 187
Attendance system, 25
Attendance(), 132
authentication, 22
Authority, 5
automated, 14
automatic, 40
availability, 22

Data entry hall, 19


data flow diagram, 78
Database, 92
database, 10, 19
Database model Diagrams, 96
DBMS, 40
Delete(ID), 136
DEO, 19, 38
deployement diagram, 126
DFD 0, 78, 79
DFD 1, 80
DHA, 7, 24, 27, 154
DHA isamabad, 24
DHA Projects, 6
diagram, 78
Direct conversion, 128
domain, 77
drawbacks, 27
dynamic, 77

Biometrics, 30, 40
Black box testing, 140
BLL, 130
block Diagram, 86
buddy punching, 33

E-Card no, 168


E-R Diagram, 82
EDMS, 19, 87, 180
EDMS Manager, 17
EDMS(), 134

Calculator, 162
CFD, 81
Change password, 160
ChangePassword(), 130
308

Educational history, 168


embeded antenna, 18
Emp record system, 25
Empl perf manager, 16
Employees, 33
EMS, 87
Engineering, 5
Engineering and production, 13
Entity-Domain, 94
ERD, 96
errors, 28
Excel, 7

Management, 5
management, 40
manual system, 24
Many-to-Many, 96
memory, 21
model, 77
Module diagram, 87
Modules Diagram, 87

F1, 184
File menu, 159
fingerprint, 32
functional, 38

Objective, 9
Olympic, 31
One-to-Many, 96
One-to-one, 96

Gradual conversion, 129


GUI, 9, 157

Parallel conversion, 129


path testing, 141
Payroll Report, 180
payroll system, 26
planning, 13
Plotting, 5
Preview, 179
project, 12
Project domain model, 77
Promotion, 172
prototyping, 12
PS, 87

non-functional, 39
Normalization, 92
Notepad, 162

hardware interface, 21
Help, 186
Housing, 5
HR, 7, 25, 38
HR server, 19
HRM, 7
ID, 31, 33
ID card, 31
identification, 31, 33
implementation, 127

Radio Frequency, 33
range, 34
REcruitment, 164
Regression testing, 141
relational, 92
relationships, 82
reliablity, iv, 22

Leave manager, 16
level 0, 78
LoginClick(), 130
logoff, 163
maitainabality, 23
309

Report, 36
Reports, 177
Reports(), 134
requirements, 39
Reuirements, 38
RF, 33, 34
RFID, 14, 32, 34, 40
rights, 183
risk, 13
Risk Assesement, 13

State diagrams, 110


Subsystem Diagram, 85
survey, 24
system diagram, 42
system interface, 20
System Testing, 139
tables, 93
technology, iv, 33
Termination, 172
Test cases, 141
Test strategy, 139
testing, 139
transciever, 35

SDLC, 139
Search Manager, 175
Search(), 133
searching, 22
Security, 33
security, 34
secutiry, 22
Sequence Diagrams, 101
skimmed, 32
Software Architecture diagram,
100
software design, 75
Software Testing, 139
source code, 188
spiral model, 12
Splash Screen, 157
SQA, 139

ULL, 130
Unit testing, 141
US, 32
usecase, 43, 77
usecase diagram, 76
user manual, 157
validity, 13
Vb 6.0, 98
verification, 31
Vision, 5
waterfall, 12
White box testing, 140
wireless, 11

310

VITA

M.Muzammal Naseer Janjua was born in a small town,Now Living in


Lalazar is a student of BS Software engineering at FUIMCS(Lalazar).His
objective is To build himself as a pure professional and to work for
the betterment of the organization and country on the basis of skills
and abilities which he has.He has served as internee in developement
of Student Management System for Foundation Medical College.Taking
Challenges and to work in challeneging envirnoment is his quality.Good
in Programming languages,Software Engineering,Graphic Desiging and
Database developement fields.His first work was rejected due to some
careless but in small given period he proved the world that by hard
work, one can rise from nowhere to achieve the highest honors and outshine everyone else. It may take more time and it may take more effort,
but at the end of the day, it is worth it!.....Hard work pays!

Those Who Joyfully Leaves Everything in Allahs Hand Will Eventually See Allahs
Blessing in Everything,Because Worries End Where Faith Begins!!
Alls Well That Ends Well !!

311

You might also like