Vous êtes sur la page 1sur 92

TRAINING CERTIFICATE

COMPANY PROFILE
 NIIT (Meerut):-

NIIT is a leading skills and talent development corporation that is building a manpower
pool for global industry requirements. The company, which was setup in 1981 to help
nascent it industry overcome its human resource challenges, today ranks among the
world’s leading training companies owning to its vast, yet comprehensive array of talent
development programs. With a footprint across 40 nations, NIIT offers training and
development solutions to individuals, enterprises and institutions.

NIIT’s journey to success began with a dream, a dream to bring computers and people
together in a way that would allow the world to reap the benefits of IT education. To turn
this dream into reality we needed to create a talent pool of bright young minds who
would power the engines of growth of the global economy. This dream shaped NIIT –
organization which started as an IT training institute in 1981, is today an Indian
multinational that offers learning and knowledge solutions to million students across the
globe.
In the last three decades, NIIT has successfully trained IT professionals by pioneering
computer education in India-which, today, is in the forefront of global IT and BPO
services trade. Since, the beginning, the emphasis has been on the use of technology in
education. Not only are all the education programs technology – intensive but we also
provide technology- based learning solutions to leading corporate across the world.
COMPANY PROFILE

 HCL (CDC):-
HCL technologies limited are a global it services company, headquartered in Noida Uttar
Pradesh India. Originally the research and development division of HCL limited, it
emerged as an independent company in 1991whan HCL limited ventured into the
software services business. HCL technologies (often called Hindustan computers limited)
offers services including IT consulting, enterprise transformation, remote infrastructure
management, engineering and RND and Business Process Outsourcing.
The company has office in 31 countries and operates across a number of industry
verticals including aerospace and defense, automotive consumer electronics, energy and
utilities, financial services, industrial manufacturing, life sciences and healthcare, media
and entertainment, mining and natural resources, oil and gas, public services, retail and
consumer, semiconductor, server and storage, telecom, transportation, logistics and
hospitality.
HCL Technologies is on the Forbes global 2000 list and is one of the Asia’s fab 50
countries. It is among the top 20 largest publically traded companies in India.
DECLERATION

We hereby declare that this project report entitled“EMPLOYEE PAYROLL AND


ATTENDANCE MANAGEMENT SYSTEM” submitting for partial fulfillment of the
requirement for the certified Bachelor of computer application. This report is only for
educational purpose and not for any other purpose.

(9687)

(9687)
ACKNOWLEDGEMENT

First of all we would like to express our deep sense of gratitude and sincere thanks to our
honorable director Mr. Vipul Yadavof computer application and Mr. Nikhil Mittal
(HOD) of computer application, BIT Meerut. We pay our sincere thanks to Mrs. Aarti
Yadav lecture department of computer application for the cordial support during the
development of our project.
ABSTRACT
The client uses MS Access and maintain their record, however it is not possible for them
to share the data from multiple system in multi-user environment, there is a lot of
duplicate works and chance to mistake, When the record are changed they needed to
update each and every Access file. There is no option to find and print previous saved
record. The “EMPLOYEE PAYROLL AND ATTENDANCE MANAGEMENT
SYSTEM” is used to overcome the entire problem which they are facing currently, and
making complete atomization of manual system to computerized system.
CONTENTS
1. Introduction
1.1 Problem statement
1.2 Basic introduction of Project
1.3 Objective and scope
1.4 Tools and technologies used
2. System Analysis
2.1 Preliminary analysis and information gathering
2.2 Input / Output
2.3 Feasibility Study
2.4 System requirements Specification
2.5 Software Engineering Model used
2.6 Cost Estimation
3. System Design
3.1 Project Planning
3.2 Modules
3.3 Data Flow Diagram
3.4 E-R Diagram
3.5 Data Base Design / Data Dictionary
3.6 Screen Shots
4. Testing
5. Implementation & Maintenance
6. Limitation & Future Scope
7. Conclusion
8. References
9. Coding
10. CD
PROBLEM STATEMENT
A) EXISTING SYSTEM

The followings are the problems of the manual payroll system:-

 It is difficult to compute the salary of contractual and permanent employees.


 Passing of attendance is difficult and tends to be misplaced.
 Input the data in absence of employees is difficult.
 Double checking is time computing process.
 When a firm uses more than one software to handle different process instead of one
integrated one then the problem of different data structure arises. Data stored may
vary from one system to another.
 Inconsistency in data entry causes room for errors.
 Large ongoing staff training cost is incurred and system is dependent on good
individuals.
 Lack of security and redundancy are also the problems.
 Manual payroll systems cannot be integrated with attendance machine or with other
such kind of systems
 Changes in the taxes or such any changes cause problem in calculating the data.
B) PROPOSED SYSTEM

 The system may get outdated when new technology arises.


 It cannot use time card for getting the information.
 The system will store information of less number of employees.
 It needs to be handled by trained employee.
INTRODUCTION TO PROJECT

Design of the new system begins by elaborating the statement of requirements in terms of
more detailed objectives. The main aim of design process is to produce a model or
representation of the system, which can be used later to bind the system. The produced
model is called design of the system. A system design is a top down approach to
minimize complexity and make a problem manageable by subdividing it into smaller
segments.

The most changing phase of the system development of life cycle is system design. It
refers to the technical specification that will be applied in implementing the candidate
system. The potential objects are thoroughly analyzed. Class hierarchies are to check
whether the system is behaving the way it has to. There after the classes are individually
tested and subsequently they are integrated from the overall system. This level focuses on
deciding which modules are needed for system the specifications for those modules and
how these modules are interconnected.
Objective and Scope
 Objective:
Main objective of developing “Employee Payroll and Attendance Management
System” is to provide an easy way not only to automate all functionalities involved
managing attendance, leaves and Payroll for the employees of Company, but also to
provide full functional reports to management of Company with the details about usage
of leave facility.

We are committed to bring the best way of management in the various forms of EPAMS.
We understand that EPAMS in not a product to be sold, it is a tool to manage the inner
operation of Company related to employee leave and Payroll.

Some objectives of developing the computerized system are:

 An easy way to automate all functionalities of the employees of Company.


 Provides full functional reports to management of company.
 Committed to bring the best way of management in the various forms of EPLM.
 Tool to manage the inner operation of Company related to employee attendance
leave and payroll.

The system provides many reports such as Employee reports, Salary reports, Ex-
employee reports and Attendance reports of employees.
 Scope:
This Application works in Multiple PC’s installed on multiple Computers but sharing
same database by which users of different department can use it sitting at different
locations simultaneously. This project is especially designed for Company to take
appropriate step to improve the working standard and manage the employee records of
daily attendance, leave and provide the easy calculation of payroll of the employees.

But in future we can make the Application where the database will be hosted in order to
manage the all departments which will be located in different places and by keeping
domain of Application as Online.
Tools and Technique

Hardware Requirements:

Processor : Pentium IV 2GHz and Above


RAM : 512 MB RAM
Hard Disk : 40 GB
Monitor : 15” Color Monitor
Keyboard : Multimedia Keyboard
Mouse : Serial Scroll Mouse

Software Requirements:

Operating System : Windows 98,ME,XP,7


.Front End : JDK 1.5.0
Back End : MS ACCESS
System
Analysis
Preliminary Analysis and Information Gathering

Information gathering is art and science. Information gathering is the most important
activity of requirement analysis phase. If development has correct information they can
develop good quality software. Various techniques used for information gathering used
are as follows:

 Traditional survey Techniques


 Brainstorming session
 Onsite observation
 Record review
 Interview
 Questionnaire
Inputs/Outputs

Department:
This module must accept the new Departments and allows add, modify, delete, show
operation.
Input: The administrator must enter the department in the text box and click the button
ADD.
Output: As soon as the user clicks ADD it will display the message box “Department
added”.
Designation:
This module must accept the new Designations and allows add designation and clear
operations.
Input:The administrator must enter the designation and also enter the description
related to that designation and click on the ADD, DELETE DESIGNATION sub
modules.
Output: As soon as the user clicks ADD DESIGNATION, a message box will be
displayed “Record Inserted” and the details of the designation is shown in text fields.
Employee:
This module accepts the personal and employee information of the employee. It allows
the ADD and MODIFY, DELETE, SHOW operation.
Input: Here the administrator must enter all the personal details of the employee like the
code allocated to him, Full name, address, pin code, etc... The admin must also specify
his employee details like his department (selecting the department from the combo box),
designation (selecting the designation from the combo box), basic salary, date of join,
etc... and click on the ADD or EDIT button.
Output: When the ADD button is clicked it will display the message box “record
inserted”. When the edit button is clicked it will display “record updated”. The record
will be inserted and updated as per the user’s request.
Attendance:
Using this module the administrator can enter the daily attendance of the employees as
present or absent. It contains the SUBMIT operation.
Input:The administrator enters the attendance of the employee as present or absent and
the click on the SUBMIT button.
Output:When the administrator clicks on the SUBMIT button the message box will be
displayed as “Attendance Added Successfully”.
Allowance:
Using this module the administrator can add different allowances for different grades of
employee. It contains various operations like ADD and UPDATE.
Input: The administrator must add the different allowances for each employee and click
on the ADD button. If he has to change the entered details then the UPDATE must be
clicked.
Output: The message box will be displayed as “record inserted”.
Deduction:
Using this module the administrator can enter various types of deductions like PF,
deduction per leave. It contains various operations like update and cancel.
Input: The administrator will enter the PF for the specified salary range.
Output: The entered details will be update and a message box will be displayed as
“Values Inserted”.
REPORTS:
Employee Pay Slip Report:
Using this sub module the administrator can generate the pay slip which is given to the
employee. This pay slip contains all the details of the employee like his name, Id, basic
salary, ta, hra, da, etc… This form contains the GENERATE, PAY SALARY, and
PRINT operation.
Input: Here the employee id is selected and the GET DETAILS is clicked. After the
complete details are obtained the PRINT button is clicked.
Output: As soon as they GET DETAILS is clicked all the details about the employee
will be displayed like the number of leave taken, PF, ESI, etc... When the PRINT is
clicked the message box will be displayed as “Payment record inserted successfully”.
PF Report:
Using this sub module we can generate a PF report of employees which can be given to
the organization& employee as per requirement.
Input: Here the PF REPORT is selected then we can check all information status about
employee.
Output:As soon as the PF REPORT is clicked all the details about the employees will
be displayed like the number of leave taken, PF, etc...
Tools:
By using this module we can open application such asCalculator, Notepad.
Quit:
This module brings us out of the project. We can easily quit our Application by clicking
EXIT menu.
Feasibility Study

TECHNICAL FEASIBILITY:
Evaluating the technical feasibility is the trickiest part of a feasibility study. This is
because, at this point in time, not too many detailed design of the system, making it
difficult to access issues like performance, costs on (on account of the kind of technology
to be deployed) etc. A number of issues have to be considered while doing a technical
analysis.

i) Understand the different technologies involved in the proposed system:


Before commencing the project, we have to be very clear about what are the technologies
that are to be required for the development of the new system.

ii) Find out whether the organization currently possesses the required
technologies:

o Is the required technology available with the organization?

o If so is the capacity sufficient?


For instance –
Will the current printer be able to handle the new reports and forms required for
the new system?”
OPERATIONAL FEASIBILITY:
Proposed projects are beneficial only if they can be turned into information systems that
will meet the organizations operating requirements. Simply stated, this test of feasibility
asks if the system will work when it is developed and installed. Are there major barriers
to Implementation? Here are questions that will help test the operational feasibility of a
project:

 Is there sufficient support for the project from management from users? If the
current system is well liked and used to the extent that persons will not be able to
see reasons for change, there may be resistance.

 Are the current business methods acceptable to the user? If they are not, Users
may welcome a change that will bring about a more operational and useful
systems.

 Have the user been involved in the planning and development of the project?

 Early involvement reduces the chances of resistance to the system and in

 General and increases the likelihood of successful project.

Since the proposed system was to help reduce the hardships encountered. In the existing
manual system, the new system was considered to be operational feasible.
ECONOMIC FEASIBILITY:

Economic feasibility attempts 2 weigh the costs of developing and implementing a new
system, against the benefits that would accrue from having the new system in place. This
feasibility study gives the top management the economic justification for the new system.

A simple economic analysis which gives the actual comparison of costs and benefits are
much more meaningful in this case. In addition, this proves to be a useful point of
reference to compare actual costs as the project progresses. There could be various types
of intangible benefits on account of automation. These could include increased customer
satisfaction, improvement in product quality better decision making timeliness of
information, expediting activities, improved accuracy of operations, better documentation
and record keeping, faster retrieval of information, better employee morale.
SYSTEM REQUIREMENT SPECIFICATION

PURPOSE OF THE SYSTEM:


The aim of the project is to manage the attendance and payroll of employee in the
organization. This system is introduced for maintaining payroll with attendance by
introducing different employee, department, leave, pf, bonus, salary, payroll lists storing,
payments employee of different department efficiently with the help of the this
automated application. If they want to see the total attendance, leave and salary of
employee that easily see the information every employee. The administrator plays the
main role in organization that he has to manage all the functionalities like department,
attendance of employee’s, security, salary, and leave.

STUDY OF THE SYSTEM:


In the flexibility of uses the interface has been developed a graphics concepts in mind,
associated through a browser interface. The GUI’s at the top level has been categorized
as follows:

1. Administrative User Interface Design.

2. Employee User Interface.

3. Security User Interface.

4. Reports User Interface.

5. General User Interface.


Software Engineering Model

Waterfall Model:
This model follows the SDLC (Software development life cycle) approach, become
popular in 1970’s. The model states that the phases are organized in a linear order. In
other words, the output of one phase becomes input for the next phase.

Proposal Definition:-

It is achieved through proper communication between client and developer. It includes


understanding the requirements to reduce failure.

Feasibility Study:-

All possible alternatives are checked and best one is selected. It includes technical and
financial overview.

Requirement Analysis:-

Software requirement analysis encompasses those tasks which include all the important
analysis for the purpose of requirement of the project. It forms in SRS.

System Design:-

Transforms the requirements into structure.

Coding and Testing:-

Transforming design into machine into readable form and removing all errors from
structure and function.
Implementation:-

It includes reviews from the user so that corrective actions and measures could be taken.

System Maintenance:-

It includes corrective, adaptive and persistent maintenance.


Cost Estimation

Economic feasibility attempts 2 weigh the costs of developing and implementing a new
system, against the benefits that would accrue from having the new system in place. This
feasibility study gives the top management the economic justification for the new system.

A simple economic analysis which gives the actual comparison of costs and benefits are
much more meaningful in this case. In addition, this proves to be a useful point of
reference to compare actual costs as the project progresses. There could be various types
of intangible benefits on account of automation. These could include increased customer
satisfaction, improvement in product quality better decision making timeliness of
information, expediting activities, improved accuracy of operations, better documentation
and record keeping, faster retrieval of information, better employee morale.
SYSTEM
DESIGN
Project Planning

Project planning is done after all the requirements are gathered. It is a process in which
proper schedule and deadline are setup and work is divided.

In this we planned the basis of our project. The basic idea is that we can add the
employees first of the problems were assumed and there solutions are reffered. We set the
priliminary goals, then several solutions, stratigies were set and constraints were also
regarded.

The priority list was made the major functions present in the system are that employees
can be added, deleted and the information can be edited. The running project size was
decided so that it takes less than 5 MB to run.
Modules
1. DEPARTMENT
2. DESIGNATION
3. EMPLOYEE
4. ALLOWANCE
5. DEDUCTION
6. ATTENDANCE
7. EMPLOYEE REPORTS
8. TOOLS
9. QUIT
Data Flow Diagram (DFD)

Top level DFD (DATA FLOW DIAGRAM):


Top level DFD shows the functional component in the software package. Each
component shown in the top level DFD is described in the subsections.
DFD AT LEVEL 0

ADD/ MODIFY/
DELETE/ SEARCH
USER Department Details Department

ADD/ MODIFY/
DELETE/ SEARCH
USER Designation Details Designation

Designation
ADD/ MODIFY/
DELETE/ SEARCH
USER Employee Details Employee

Resignation

ADD/ MODIFY

USER Allowance Allowance


DFD LEVEL 3

Invalid User ID/ Password

User Login Login

Valid

Designation Employee Employee


Details

Department Department
Details

Department Designation Designation


Details

Employee Allowance
Allowance

Employee Deduction
Deduction

Employee Attendance
Attendance
Employee

Allowance Employee
Salary
Pay Slip
Deduction

Duty Status

Employee PF Details
Employee
PF Details
ER – DIAGRAM

Deduction PF
Assigns

L_deduct Grade
Name

uname Allowance TA
Id
Department DA
Bonus
Des
pt HRA
Works
in
Add Emp-id
Admin
n s
Name
Employee
Pass-
Deptt
word
Design
Designation Has
Gender
Id Desc
Desg
r Addr

EmpId Submits Contact

Email_id
Name

Basic_
Deptt Attendance salary

DOJ
Date J

Status Grade

Pfaccno
.
Employee

Takes
Takes

Empid
Year

Emp Month
Name PF

Salary

Total_PF
Deduction NetSalary EmpId

Basicsalary

Name

Allowance
PFaccno.
Data Base Design / Data Dictionary
Data Structure:

1. Login:

Field name D a t a t y p e Constraints Description


U s e r n a m e T e x t N o t N u l l
P a s s w o r d T e x t N o t N u l l

2. Department:

Field name D a t a t y p e Constraints Description


D e p t t _ I d T e x t Primary key
Deptt_name T e x t N o t N u l l
Description T e x t N o t N u l l

3. Designation:

Field name Da ta t y p e Constraints Description


Deptt_Name T e x t Primary key
Designation T e x t N o t N u l l
Description T e x t N o t N u l l

4. Employee:

Field name D a ta t yp e Constraints Description


E m p _ I d N u m b e r Primary key
Emp_Name T e x t N o t N u l l
G e n d e r T e x t N o t N u l l
A d d r e s s T e x t N o t N u l l
Contact_No. N u m b e r N o t N u l l
E m a i l _ I d T e x t N o t N u l l
Department T e x t N o t N u l l
Designation T e x t N o t N u l l
BasicSalary N u m b e r N o t N u l l
D o j D a t e N o t N u l l
G r a d e T e x t N o t N u l l
P f a c c _ n o . N u m b e r N o t N u l l
5. Allowance:

Field name D a t a t y p e Constraints Description


G r a d e T e x t Primary key
T a N u m b e r N o t N u l l
D a N u m b e r N o t N u l l
H r a N u m b e r N o t N u l l
B o n u s N u m b e r N o t N u l l

6. Deduction:

Field name Da ta t yp e Constraints Description


G r a d e T e x t Primary key
P F N u m b e r N o t N u l l
Leave_deduct N u m b e r N o t N u l l

7. Attendance:

Field name D a t a t y p e Constraints Description


E m p _ i d N u m b e r Primary key
Emp_name T e x t N o t N u l l
Deptt_name T e x t N o t N u l l
D a t e D a t e N o t N u l l
Attendance T e x t N o t N u l l Present/Leave

8. Resignation Employee:

Field name D a ta t yp e Constraints Description


E m p _ I d N u m b e r Primary key
Emp_Name T e x t N o t N u l l
G e n d e r T e x t N o t N u l l
A d d r e s s T e x t N o t N u l l
Contact_No. N u m b e r N o t N u l l
E m a i l _ I d T e x t N o t N u l l
Department T e x t N o t N u l l
Designation T e x t N o t N u l l
BasicSalary N u m b e r N o t N u l l
D O J D a t e N o t N u l l
D O R D a t e N o t N u l l
G r a d e N u m b e r N o t N u l l
P f a c c _ n o . N u m b e r N o t N u l l
9. Salary:

Field name D a t a t y p e Constraints Description


E m p i d N u m b e r Primary key
E m p n a m e T e x t N o t N u l l
BasicSalary N u m b e r N o t N u l l
Allowance N u m b e r N o t N u l l
Deduction N u m b e r N o t N u l l
TotalSalary N u m b e r N o t N u l l
M o n t h T e x t N o t N u l l
Y e a r N u m b e r N o t N u l l

10. PF_Details Table:

Field name D a ta t yp e Constraints Description


E m p _ I d N u m b e r Primary key
Emp_Name T e x t N o t N u l l
P f a c c n o . N u m b e r N o t N u l l
T o t a l P F N u m b e r N o t N u l l
SCREEN SHOTS

Login Window:
Main Menu Window:
Add Department Window:
Modify Department Window:
Delete Department Window:
Show Department Window:
Delete Designation Window:
Add New Employee Window:
Modify Employee Details Window:
Search Employee Details Window:
Resignation Employee Window:
Set Allowance Window:
Set Deduction Window:
Feed Attendance Window:
Employee Pay slip Report Window:
PF Report Window:
TESTING

 Testing Methodologies
 Black box Testing:
 White box Testing.

 Levels of Testing
 Unit Testing.
 Module Testing.
 Integration Testing.
 System Testing.
 User Acceptance Testing.

 Types Of Testing
 Smoke Testing.
 Regression Testing.
 Re-Testing.
 Static Testing.
 Dynamic Testing.
 Alpha-Testing.
 Beta-Testing.
 Compatibility Testing.
Testing:
 The process of executing a system with the intent of finding an error.
 Testing is defined as the process in which defects are identified, isolated,
subjected for rectification and ensured that product is defect free in order to
produce the quality product and hence customer satisfaction.
 Quality is defined as justification of the requirements
 Defect is nothing but deviation from the requirements
 Defect is nothing but bug.
 Testing --- The presence of bugs
 Testing can demonstrate the presence of bugs, but not their absence
 Debugging and Testing are not the same thing!
 Testing is a systematic attempt to break a program or the AUT
 Debugging is the art or method of uncovering why the script /program did not
execute properly.

Testing Methodologies:
 Black box Testing:It is the testing process in which tester can perform testing
on an application without having any internal structural knowledge of
application.
Usually Test Engineers are involved in the black box testing.
 White box Testing:It is the testing process in which tester can
perform testing on an application with having internal structural
knowledge.
Usually The Developers are involved in white box testing.
Levels of Testing:

M o d u l e 1 M o d u l e 2 M o d u l e 3
U n i t s U n i t s U n i t s

i/p Integration o/p i/p Integration o/p

System Testing: Presentation + business +Database s


 U A T : u s e r a c c e p t a n c e t e s t i n g

STLC (SOFTWARE TESTING LIFE CYCLE)

Test Planning:
1.Test Plan is defined as a strategic document which describes the procedure how to
perform various testing on the total application in the most efficient way.
2.This document involves the scope of testing,
3. Objective of testing,
4. Areas that need to be tested,
5. Areas that should not be tested,
6. Scheduling Resource Planning,
7. Areas to be automated, various testing tools Used….
Test Development:
1. Test case Development (check list)
2. Test Procedure preparation. (Description of the Test cases).
1. Implementation of test cases. Observing the result.

Result Analysis:
1. Expected value: is nothing but expected behavior ofApplication.
2. Actual value: is nothing but actual behavior of application.

Bug Tracing:Collect all the failed cases, prepare documents.


Reporting:Prepare document (status of the application)

Types of Testing:

>Smoke Testing:It is the process of initial testing in which tester looks for the
availability of all the functionality of the application in order to perform detailed testing
on them. (Main check is for available forms).

>Re-Testing:It is the process in which testing is performed on some functionality


which is already tested before to make sure that the defects are reproducible and to rule
out the environments issues if at all any defects are there.

Static Testing:It is the testing, which is performed on an application when it is not


been executed.ex: GUI, Document Testing.

Dynamic Testing:It is the testing which is performed on an application when it is


being executed. ex: Functional testing.

Alpha Testing:It is a type of user acceptance testing, which is conducted on an


application when it is just before released to the customer.
 Beta-Testing:It is a type of UAT that is conducted on an application when it is
released to the customer, when deployed in to the real time environment and being
accessed by the real time users.

Compatibility testing:It is the testing process in which usually the products are tested
on the environments with different combinations of databases (application servers,
browsers…etc) In order to check how far the product is compatible with all these
environments platform combination.

Installation Testing:It is the process of testing in which the tester try to install or try
to deploy the module into the corresponding environment by following the guidelines
produced in the deployment document and check whether the installation is successful or
not.

TCD (Test Case Document):

Test Case Document Contains

 Test Scope (or) Test objective


 Test Scenario
 Test Procedure
 Test case

This is the sample test case document for the Product storage and discharge details of
Warehouse Executer project:

Test scope:
 Test coverage is provided for the screen “ Login check” form of a
Administration module of Warehouse executer application
 Areas of the application to be tested.
Test Scenario:
 When the office personals use this screen for the data entry, calculate the storages
stock, confirm payments, discharging products and saving the information on s
basis and quit the form.

Test Procedure:
 The procedure for testing this screen is planned in such a way that the data entry,
status calculation functionality, saving and quitting operations are tested in terms
of GUI testing, Positive testing, Negative testing using the corresponding GUI test
cases, Positive test cases, Negative test cases respectively.

Test Cases:
 Template for Test Case

Guidelines for Test Cases:

 GUI Test Cases:Total no of features that need to be check


 Look & Feel
 Look for Default values if at all any (date & Time, if at all any require)
 Look for spell check
Example for GUI Test cases:

T.C.No. D e s c r i p t i o n E x p e c t e d v a l u e Actual value R e s u l t

Check for all the features in the screen The screen must contain all the features
1

C h e c k f o r t h e
The alignment should be in proper way
2 alignment of the objects as per the validations

1. Positive Test Cases:

 The positive flow of the functionality must be considered


 Valid inputs must be used for testing
 Must have the positive perception to verify whether the requirements are justified.

Example for Positive Test cases:

E x p e c t e d
T . C . N oDescription Actual valueR e s u l t
V a l u e
Input User Redirect to
1 Redirect to HomePage Redirect to Home Page
Name and Password Home Page

2. Negative Test Cases:

 Must have negative perception.


 Invalid inputs must be used for test.

Example for Negative Test cases:

T . C . N o D e s c r i p t i o n Expected value A c t u a l v a l u e R e s u l t

1 Input username and password L o g i n P a g e L o g i n P a g e L o g i n P a g e


IMPLEMENTATION AND MAINTENANCE

A crucial phase in the systems life cycle is the successful implementation of the new
system design. Implementation simply means converting a new system design into
operation. Or in other words it can be said Implementation means the process of
converting a new or a revised system design into an operational one. This involves
creating computer compatible files, training the operating staff and installing hardware,
terminals before the system is up and running. The conversion of a old system into a new
one should be exciting because it is the last step before the candidate system begins to
show results.

In system implementation user training is crucial for minimizing resistance to change and
giving the new system a chance to prove its worth. Training aids such as user friendly
manuals, a data dictionary provide the user with a good start on the new system.

In the project “Employee Payroll and Attendance Management System” the end
user’s of the system are the Administrator of the organization. They have been provided
with all the necessary requirements that are required with the new system. They have also
been provided with the user manual that will guide in running the new system.

The subject matter of this project has been presented in simple language and lucid style.
The use of an interactive programming style is emphasized throughout the project. The
new system may be totally new replacing an existing manual or automated system, or it
may be a major modification to an existing system. In either case, proper implementation
is essential to provide a reliable system to meet organizational requirements. Successful
implementation may not guarantee improvement in the organization using the new
system (that is a design question), but improper will prevent it.
Implementation is process of having systems personnel check out and put new equipment
into use, train user, install the new application and construct any files of data needed to
use it. This phase is less creative than system design. Depending on the size of the
organization that will be involved in using the application and the risk involved in its use,
system developers may choose to at test the operation in only one area of the firm with
only one or two persons. Sometimes, they will run both old and new system in parallel
way to compare the result. In still other situation, system developers stop using the old
system one day and start using the new one the next. The implementation of the web
based or LAN based networked project has some extra steps at the time of
implementation. We need to configure the according the requirement of the software.
LIMITATION AND FUTURE ASPECTS

LIMITATIONS:

 The proposed system can be accessed only by authorized person.


 It does not support network topology implementation, online program, and other
transactions.

FUTURE SCOPE:

This Application works in Multiple PC’s installed on multiple Computers but sharing
same database by which users of different department can use it sitting at different
locations simultaneously. This project is especially designed for Company to take
appropriate step to improve the working standard and manage the employee records of
daily attendance, leave and provide the easy calculation of payroll of the employees.

But in future we can make the Application where the database will be hosted in order to
manage the all departments which will be located in different places and by keeping
domain of Application as Online.
CONCLUSION

This allows completing the calculations with the tax reductions and works faster than the
manual system. This can be linked to attendance system easily and information about
working hours of employees can be received. This allows in depth analysis of staff cost
for the business as a whole across departments. This package can help u to plan staff cost
and budget based on the cost employed on each individual. Tax updates need to be
modified only once at a single place. Company removes the uncertainty that comes with
sending of private employee information to the third party. Comprehensive validation
procedures and checks stop you from entering wrong information.
REFERENCES

 www.studentsprojectsguide.com
 www.ieeeexplore.ieee.org
 www.iaeng.org
 www.scribd.com
 www.1000projects.com
 www.projectmanager.com
 www.dotnetspider.com
 Java2: the complete reference, fifth edition by Hebert Scheldt
Database System Concepts, fifth edition by Abraham Silberschatz,
Henry F. Korth, S.Sudarshan
CODING
Code for DSN Connection:
import java.io.IOException;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import javax.swing.JDialog;
import java.io.*;
import java.util.*;
import java.net.*;

public class clsConnection {


String url = "";
String username = "";
String password = "";

public Connection setConnection(Connection conn, String username, String password )


{
try
{

Properties props = new Properties();


String fileName = "MakeDataBase.ini";
FileInputStream in = new FileInputStream(fileName);
props.load(in);
String drivers = props.getProperty("jdbc.drivers");
if(drivers != null)
System.setProperty("jdbc.drivers", drivers);
url = props.getProperty("jdbc.url");
username = props.getProperty("jdbc.username");
password = props.getProperty("jdbc.password");
conn = DriverManager.getConnection(url,username,password);

}catch(SQLException e)
{
System.err.println("SQl Exception");
e.printStackTrace();
}

catch(IOException e)
{
System.out.println("\nIO Exception");
}
catch (Exception e)
{
System.out.println("\nAnother Error");
}
return conn;

}
Code for Login:

import java.awt.*;
import java.awt.event.*;
import java.sql.*;
import java.io.*;
import java.util.*;
import java.net.*;
import javax.swing.*;
import java.util.Date;
public class LoginFrame implements ActionListener
{
JFrame frame;
private String username;
private String password;
private static JFrame loginFrame;
private static JPanel panel1;
private static JPanel panel2;
private static JPanel panel3;
private JButton loginBtn;
private JButton exitBtn;
int dialogtype = JOptionPane.PLAIN_MESSAGE;
String dialogmessage;
String dialogs;
private JLabel nameLbl;
private JLabel userLbl;
private JLabel passwordLbl;
private static JTextField userTxt;
private static JPasswordField passwordTxt;

public String loginname;


public String loginpass;
Connection conn;
Statement stmt;
ResultSet rs;
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();

// static Date td = new Date();


public LoginFrame()
{
panel1 = new JPanel();
panel1.setLayout(new FlowLayout());
nameLbl = new JLabel("WELCOME TO ABC'S PAYROLL & ATTENDANCE
SYSTEM");

panel2 = new JPanel();


panel2.setLayout(new GridLayout(2,2));
userLbl = new JLabel("Username :");
userTxt = new JTextField(20);

passwordLbl = new JLabel("Password :");


passwordTxt = new JPasswordField(20);
panel3 = new JPanel();
panel3.setLayout(new FlowLayout());

loginBtn = new JButton("Login", new ImageIcon("images/officer.png"));

loginBtn.addActionListener(this);
exitBtn = new JButton("Exit", new ImageIcon("images/Keys.gif"));

exitBtn.addActionListener(this);
panel1.add(nameLbl);
panel2.add(userLbl);
panel2.add(userTxt);
panel2.add(passwordLbl);
panel2.add(passwordTxt);
panel3.add(loginBtn);
panel3.add(exitBtn);
frame = new JFrame("PayRoll User Login...");
frame.setSize(350,200);

Container pane = frame.getContentPane();


pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS));
pane.add(panel1);
pane.add(panel2);
pane.add(panel3);
frame.setLocation((screen.width - 500)/2,((screen.height-350)/2));
frame.setVisible(true);
frame.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
System.exit(0);
}
});
}

public void actionPerformed(ActionEvent event)


{
if(event.getSource()==loginBtn)
{
login();
}
else if(event.getSource()==exitBtn)
{
System.exit(0);
}
}

public void login()


{
loginname = userTxt.getText().trim();
loginpass = passwordTxt.getText().trim();
try
{
clsConnection cn=new clsConnection();
conn = cn.setConnection(conn,"","");
Statement stmt = conn.createStatement();
String query = "SELECT * FROM Login WHERE USERNAME='" +
loginname +
"' AND PASSWORD='"+loginpass+"'";
ResultSet rs = stmt.executeQuery(query);
boolean recordfound = rs.next();

if (recordfound)
{
dialogmessage = "Welcome To Payroll And Attendance Management System- ";
dialogtype = JOptionPane.INFORMATION_MESSAGE;
JOptionPane.showMessageDialog(null, dialogmessage, dialogs, dialogtype);
userTxt.setText("");
passwordTxt.setText("");
frame.setVisible(false);
frame.dispose();
MainMenu me = new MainMenu(loginname); // FOR MAIN SCREEN

}
else
{
dialogmessage = "Login Failed!";
JOptionPane.showMessageDialog(null, "INVALID ID OR PASSWORD!",
"WARNING!!",JOptionPane.WARNING_MESSAGE);

userTxt.setText("");
passwordTxt.setText("");
}
conn.close();
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.getMessage(),
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}

public static void main(String[] args)


{

LoginFrame frame1 = new LoginFrame();


}
}
Code for Main Menu:

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import java.util.*;
import java.text.DateFormat;
import java.util.Date;
import java.text.*;
import java.lang.*;

class MainMenu implements ActionListener


{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container desktop;
// Menu Bar Variable
JMenuBar menubar = new JMenuBar();
JMenu menuEmployee = new JMenu("Employee");
JMenu menuDepartment = new JMenu("Department");
JMenu menuDesignation = new JMenu("Designation");
JMenu menuAllowance = new JMenu("Allowance");
JMenu menuDeduction = new JMenu("Deduction");
JMenu menuAttendance = new JMenu("Attendance");
JMenu menuReports = new JMenu("Reports");
JMenu menuTools = new JMenu("Tools");
JMenu menuQuit = new JMenu("Quit");

// Menu Item
JMenuItem empAdd = new JMenuItem("Add New");
JMenuItem empModify = new JMenuItem("Modify Emp");
JMenuItem empShow = new JMenuItem("Search Employee");
JMenuItem empResign = new JMenuItem("Resignation");

JMenuItem depAdd = new JMenuItem("Add Department");


JMenuItem depModify = new JMenuItem("Modify Department");
JMenuItem depDelete = new JMenuItem("Delete Department");
JMenuItem depShow = new JMenuItem("Show Department");

JMenuItem desAdd = new JMenuItem("Add Designation");


JMenuItem desDelete = new JMenuItem("Show/Delete Designation");

JMenuItem allowance = new JMenuItem("Set Allowance");


JMenuItem deduction = new JMenuItem("Set Deduction");

JMenuItem attendance = new JMenuItem("Feed Daily Attendence");


JMenuItem salaryPayslip = new JMenuItem("Salary Payslip");

JMenuItem empPayslip = new JMenuItem("Payslip");


JMenuItem empPFRep = new JMenuItem("P.F. Details");

JMenuItem itemCalculator = new JMenuItem("Calculator");


JMenuItem itemNotepad = new JMenuItem("Notepad");

// JMenuItem itemAuthor = new JMenuItem("Author");


// JMenuItem itemHelp = new JMenuItem("Help");
JMenuItem itemExit = new JMenuItem("Exit");

// JPanel
JPanel panel_Bottom = new JPanel();
JPanel panel_Top = new JPanel();

// Label
JLabel lblUsername = new JLabel("User Name:");
JLabel lblLogDetails = new JLabel("Time Login :");
JLabel lblTimeNow = new JLabel();
Code for Delete Department:
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import java.net.*;
public class DeleteDeptt implements ActionListener , ItemListener
{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container c;
private JPanel panel1;
private JPanel panel2;
private JButton DelBtn;
private JButton ExitBtn;
private JLabel Deptt_Id,Deptt_Name,Deptt_Descn;
private JTextField Txt_Name, Txt_Descn;
private JComboBox Txt_Id;
String dialogmessage;
String dialogs;
int dialogtype = JOptionPane.PLAIN_MESSAGE;
public static int record;
String id,name,descn;
clsConnection cn;
Connection conn;
Statement stmt;
ResultSet rs;
public DeleteDeptt()
{
f=new JFrame("DELETE DEPARTMENT");
f.setSize(screen.width,screen.height);
c=f.getContentPane();

panel1 = new JPanel();


panel1.setLayout(new GridLayout(3,3));

Deptt_Id = new JLabel ("Department Id:");


Deptt_Name = new JLabel (" Department Name :");
Deptt_Descn = new JLabel ("Description :");

Txt_Id = new JComboBox();


Txt_Name = new JTextField();
Txt_Descn = new JTextField();
Txt_Name.setEditable(false);
Txt_Descn.setEditable(false);
panel1.add(Deptt_Id);
panel1.add(Txt_Id);
panel1.add(Deptt_Name);
panel1.add(Txt_Name);
panel1.add(Deptt_Descn);
panel1.add(Txt_Descn);

panel2 = new JPanel();


panel2.setLayout(new FlowLayout());
DelBtn = new JButton("Delete");
ExitBtn = new JButton("Exit");

panel2.add(DelBtn);
DelBtn.addActionListener(this);
panel2.add(ExitBtn);
ExitBtn.addActionListener(this);
panel1.setBounds(150,100,300,150);
panel2.setBounds(140,400,200,50);
c.add(panel1);
c.add(panel2);
try
{
clsConnection cn=new clsConnection();
conn = cn.setConnection(conn,"","");
stmt = conn.createStatement();
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
}
addValue();
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
f.dispose();
}
});
Txt_Id.addItemListener(this);
f.show();
}
protected void addValue()
{
try
{
rs=stmt.executeQuery("select deptt_id from department");
while(rs.next())
{
String en=rs.getString(1);
Txt_Id.addItem(en);
}
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
}

}
public void itemStateChanged(ItemEvent ie)
{
id=(String)Txt_Id.getSelectedItem();
try
{
rs=stmt.executeQuery("select * from department where deptt_id='"+id+"'");
if(rs.next())
{
name=rs.getString(2) ;
descn=rs.getString(3) ;
Txt_Name.setText(name);
Txt_Descn.setText(descn);
}
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
JOptionPane.showMessageDialog(null,"GENERAL EXCEPTION",
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}
public void actionPerformed(ActionEvent event)
{
Object s=event.getSource();
name=Txt_Name.getText();
descn=Txt_Descn.getText();
id=(String)Txt_Id.getSelectedItem();
if(s==ExitBtn)
{
f.dispose();
}
else if(s==DelBtn)
{

int DResult = JOptionPane.showConfirmDialog((Component) null,"Are you sure you


want to delete Record?");
if (DResult == JOptionPane.YES_OPTION)
{
try
{
stmt.executeUpdate("delete from DEPARTMENT where deptt_id='" + id + "'");
stmt.executeUpdate("delete from DESIGNATION where deptt_id='" + id + "'");
System.out.print("\n Deleted Successfully");
// Txt_Id.removeItemListener(this);
Txt_Id.removeAllItems();
Txt_Id.removeItemListener(this);
Txt_Name.setText("");
Txt_Descn.setText("");
JOptionPane.showMessageDialog(null,"RECORD DELETED SUCCESSFULLY",
"SUCCESS!!!",JOptionPane.INFORMATION_MESSAGE);
conn.close();
addValue();
Txt_Id.addItemListener(this);
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
JOptionPane.showMessageDialog(null,"GENERAL EXCEPTION",
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}
}
}
}
Code for Show Department:
import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import java.net.*;
public class ShowDeptt implements ActionListener , ItemListener
{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container c;
private JPanel panel1;
private JPanel panel2;
private JButton ExitBtn;
private JLabel Deptt_Id,Deptt_Name,Deptt_Descn;
private JTextField Txt_Name, Txt_Descn;
private JComboBox Txt_Id;
String id,name,descn;
clsConnection cn;
Connection conn;
Statement stmt;
ResultSet rs;
public ShowDeptt()
{
f=new JFrame("DEPARTMENTS DETAIL");
f.setSize(screen.width,screen.height);
c=f.getContentPane();
panel1 = new JPanel();
panel1.setLayout(new GridLayout(3,3));
Deptt_Id = new JLabel ("Department Id:");
Deptt_Name = new JLabel (" Department Name :");
Deptt_Descn = new JLabel ("Description :");
Txt_Id = new JComboBox();
Txt_Name = new JTextField();
Txt_Descn = new JTextField();
Txt_Name.setEditable(false);
Txt_Descn.setEditable(false);
panel1.add(Deptt_Id);
panel1.add(Txt_Id);
panel1.add(Deptt_Name);
panel1.add(Txt_Name);
panel1.add(Deptt_Descn);
panel1.add(Txt_Descn);
panel1.setOpaque(true);
panel2 = new JPanel();
panel2.setLayout(new FlowLayout());
ExitBtn = new JButton("Exit");
ExitBtn.addActionListener(this);
panel2.add(ExitBtn);
panel1.setBounds(150,100,300,150);
panel2.setBounds(140,400,200,50);
c.add(panel1);
c.add(panel2);
try
{
cn=new clsConnection();
conn = cn.setConnection(conn,"","");
stmt = conn.createStatement();
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
JOptionPane.showMessageDialog(null,"GENERAL EXCEPTION",
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}

addValue();
f.addWindowListener(new WindowAdapter();
Code for Add New Employee:

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import java.util.Date;
import java.net.*;

class AddEmp implements ActionListener, ItemListener


{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container c;
JPanel panel1,panel2;
JButton adddetail,resetdetail,Exit;;
JComboBox txt_deptt,txt_design,txt_grade, txt_gender;
JLabel emp_id,emp_name,emp_gender,emp_add,emp_contno,emp_emailid;
JLabel emp_deptt,emp_design,emp_bsalary,emp_doj,emp_grade,emp_pfacno;;
JTextField txt_id,txt_name,txt_addr,txt_contno,txt_emailid;
JTextField txt_bsalary,txt_doj,txt_pfaccno;
String
empname,empgender,empaddr,empcontno,empmailid,empdeptt,empdesign,empbsalary,e
mpdoj,empgrade,date;
int empid,emppfaccno,d,m,y;
clsConnection cn;
Connection conn;
Statement stmt;
ResultSet rs;
Date dt=new Date();
AddEmp()
{
f=new JFrame("ADD NEW EMPLOYEE");
f.setSize(screen.width,screen.height);
c=f.getContentPane();
panel1 = new JPanel();
panel1.setLayout(new GridLayout(12,2));
emp_id = new JLabel ("Emp_Id:");
emp_name = new JLabel ("Emp_Name:");
emp_gender = new JLabel ("Emp_Gender:");
emp_add = new JLabel ("Emp_Address:");
emp_contno = new JLabel ("Emp_Contactno:");
emp_emailid = new JLabel ("Emp_Emailid:");
emp_deptt = new JLabel ("Emp_Department:");
emp_design = new JLabel ("Emp_Designation:");
emp_bsalary = new JLabel ("Emp_BasicSalary:");
emp_doj = new JLabel ("Date Of Joining:");
emp_grade = new JLabel ("Emp_Grade:");
emp_pfacno = new JLabel ("Emp_PFAccountNo:");

txt_id = new JTextField();


txt_id.setEditable(false);
txt_name = new JTextField();

txt_gender = new JComboBox();


txt_addr = new JTextField();
txt_contno = new JTextField();
txt_emailid = new JTextField();
txt_deptt = new JComboBox ();
txt_design = new JComboBox();
txt_bsalary = new JTextField();
txt_doj = new JTextField();
txt_grade = new JComboBox();
txt_pfaccno = new JTextField();
txt_pfaccno.setEditable(false);
panel1.add(emp_id);
panel1.add(txt_id);
panel1.add(emp_name);
panel1.add(txt_name);
panel1.add(emp_gender);
panel1.add(txt_gender);
panel1.add(emp_add);
panel1.add(txt_addr);
panel1.add(emp_contno);
panel1.add(txt_contno);
panel1.add(emp_emailid);
panel1.add(txt_emailid);
panel1.add(emp_deptt);
panel1.add(txt_deptt);
panel1.add(emp_design);
panel1.add(txt_design);
panel1.add(emp_bsalary);
panel1.add(txt_bsalary);
panel1.add(emp_doj);
panel1.add(txt_doj);
panel1.add(emp_grade);
panel1.add(txt_grade);
panel1.add(emp_pfacno);
panel1.add(txt_pfaccno);
panel1.setOpaque(true);
panel2 = new JPanel();
panel2.setLayout(new FlowLayout());
adddetail = new JButton("ADD");
resetdetail = new JButton("Reset");
Exit = new JButton("Exit");
panel2.add(adddetail);
adddetail.addActionListener(this);
panel2.add(resetdetail);
resetdetail.addActionListener(this);
panel2.add(Exit);
Exit.addActionListener(this);
panel2.setOpaque(true);
panel1.setBounds(150,150,500,300);
panel2.setBounds(150,600,100,50);
c.add(panel1);
c.add(panel2);
try
{
cn=new clsConnection();
conn = cn.setConnection(conn,"","");
stmt = conn.createStatement();
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
}
createid();
addValue();
f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)
{
f.dispose();
}
});
txt_deptt.addItemListener(this);
f.show();
}
void createid()
{
try
{
rs=stmt.executeQuery("select max(empid) from EMPLOYEE");
if(rs.next())
{
empid=rs.getInt(1)+1;
}
else
{
empid=1;
}
txt_id.setText(String.valueOf(empid));
rs=stmt.executeQuery("select max(emppfaccno) from EMPLOYEE");
if(rs.next())
{
emppfaccno=rs.getInt(1)+1;
}
else
{
emppfaccno=5001;
}
txt_pfaccno.setText(String.valueOf(emppfaccno));
d=dt.getDate()+1;
m=dt.getMonth()+1;
y=dt.getYear()+1900;
date=d+"/"+m+"/"+y;
txt_doj.setText(date);
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.getMessage(),
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}
protected void addValue()
{
txt_gender.addItem("Male");
txt_gender.addItem("Female");
txt_grade.addItem("A");
txt_grade.addItem("B");
txt_grade.addItem("C");
txt_grade.addItem("D");
try
{
rs=stmt.executeQuery("select deptt_name from department");
while(rs.next())
{
String en=rs.getString(1);
txt_deptt.addItem(en);
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.getMessage(),
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}

public void itemStateChanged(ItemEvent ie)


{
empdeptt=(String)txt_deptt.getSelectedItem();
if(ie.getSource()==txt_deptt)
{
try
{
rs=stmt.executeQuery("select * from DESIGNATION where
deptt_name='"+empdeptt+"'");
txt_design.removeAllItems();
while(rs.next())
{
empdesign=rs.getString(2) ;
txt_design.addItem(empdesign);
}
}
catch(Exception ex)
{
System.out.print(ex.getMessage());
JOptionPane.showMessageDialog(null,"GENERAL EXCEPTION",
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
}
}

public void actionPerformed(ActionEvent e)


{
if(e.getSource()==Exit)
{
f.dispose();
}
else if(e.getSource()==adddetail)
{
empid=Integer.parseInt(txt_id.getText());
empname=txt_name.getText();
empgender=(String)txt_gender.getSelectedItem();
empaddr=txt_addr.getText();
empcontno=txt_contno.getText();
empmailid=txt_emailid.getText();
empdeptt= (String)txt_deptt.getSelectedItem();
empdesign= (String)txt_design.getSelectedItem();
empbsalary=txt_bsalary.getText();
empdoj=txt_doj.getText();
empgrade=(String)txt_grade.getSelectedItem();
emppfaccno=Integer.parseInt(txt_pfaccno.getText());
try
{
stmt.executeUpdate("insert into employee
values('"+empid+"','"+empname+"','"+empgender+"','"+empaddr+"','"+empcontno+"','"+
empmailid+"','"+empdeptt+"','"+empdesign+"','"+empbsalary+"','"+empdoj+"','"+empgra
de+"',"+emppfaccno+")");
stmt.executeUpdate("insert into PFTABLE
values("+emppfaccno+","+empid+",'"+empname+"',"+0+")");
System.out.print("data added successfully");
txt_id.setText("");
txt_name.setText("");
txt_addr.setText("");
txt_contno.setText("");
txt_emailid.setText("");
txt_bsalary.setText("");
txt_doj.setText("");
txt_pfaccno.setText("");
JOptionPane.showMessageDialog(null,"Congn.Record Added Successfully",
"SUCCESSFUL!!!",JOptionPane.INFORMATION_MESSAGE);
}
catch(Exception w)
{
JOptionPane.showMessageDialog(null,"!Please insert the appropriate values",
"WARNING!!!",JOptionPane.INFORMATION_MESSAGE);
}
createid();
}
else if(e.getSource()==resetdetail)
{
txt_name.setText("");
txt_addr.setText("");
txt_contno.setText("");
txt_emailid.setText("");
txt_bsalary.setText("");
}
}
}
Code For Modify Employee Record:

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import java.net.*;
class ModifyEmp implements ActionListener, ItemListener
{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container c;
JPanel panel1,panel2;
JButton btn_modify,Exit,find;
JComboBox txt_deptt,txt_design,txt_grade, txt_gender;
JLabel emp_id,emp_name,emp_gender,emp_add,emp_contno,emp_emailid;
JLabel emp_deptt,emp_design,emp_bsalary,emp_doj,emp_grade,emp_pfacno;;
JTextField txt_id,txt_name,txt_addr,txt_contno,txt_emailid;
JTextField txt_bsalary,txt_doj,txt_pfaccno;
String
empname,empgender,empaddr,empmailid,empdeptt,empdesign,empdoj,empgrade,empco
ntno;
int empid,empbsalary,emppfaccno;
clsConnection cn;
Connection conn;
Statement stmt;
ResultSet rs;
ModifyEmp()
{
Code for Search Employee:

import java.awt.*;
import java.awt.event.*;
import java.io.*;
import java.sql.*;
import javax.swing.*;
import java.util.*;
import java.net.*;

class SearchEmp implements ActionListener, ItemListener


{
Dimension screen = Toolkit.getDefaultToolkit().getScreenSize();
JFrame f;
Container c;
JPanel panel1,panel2;
JButton Exit;;
JComboBox txt_id;
JLabel emp_id,emp_name,emp_gender,emp_add,emp_contno,emp_emailid;
JLabel emp_deptt,emp_design,emp_bsalary,emp_doj,emp_grade,emp_pfacno;;
JTextField txt_deptt,txt_design,txt_grade,
txt_gender,txt_name,txt_addr,txt_contno,txt_emailid;
JTextField txt_bsalary,txt_doj,txt_pfaccno;
String
empname,empgender,empaddr,empmailid,empdeptt,empdesign,empdoj,empgrade;
int empid,empbsalary,emppfaccno;
long empcontno;
Connection conn;
Statement stmt;
ResultSet rs;
SearchEmp()
{
f=new JFrame("Modify EMPLOYEE");
f.setSize(screen.width,screen.height);
System.out.print(screen.width);
c=f.getContentPane();
panel1 = new JPanel();
panel1.setLayout(new GridLayout(12,2));
emp_id = new JLabel ("Emp_Id:");
emp_name = new JLabel ("Emp_Name:");
emp_gender = new JLabel ("Emp_Gender:");
emp_add = new JLabel ("Emp_Address:");
emp_contno = new JLabel ("Emp_Contactno:");
emp_emailid = new JLabel ("Emp_Emailid:");
emp_deptt = new JLabel ("Emp_Department:");
emp_design = new JLabel ("Emp_Designation:");
emp_bsalary = new JLabel ("Emp_BasicSalary:");
emp_doj = new JLabel ("Date Of Joining:");
emp_grade = new JLabel ("Emp_Grade:");
emp_pfacno = new JLabel ("Emp_PFAccountNo:");
txt_id = new JComboBox();
txt_name = new JTextField();
txt_gender = new JTextField();
txt_addr = new JTextField();
txt_contno = new JTextField();
txt_emailid = new JTextField();
txt_deptt = new JTextField ();
txt_design = new JTextField();
txt_bsalary = new JTextField();
txt_doj = new JTextField();
txt_grade = new JTextField();
txt_pfaccno = new JTextField();
txt_name.setEditable(false);
txt_gender.setEditable(false);
txt_addr.setEditable(false);
txt_contno.setEditable(false);
txt_emailid.setEditable(false);
txt_deptt.setEditable(false);
txt_design.setEditable(false);
txt_bsalary.setEditable(false);
txt_doj.setEditable(false);
txt_grade.setEditable(false);
txt_pfaccno.setEditable(false);
panel1.add(emp_id);
panel1.add(txt_id);
panel1.add(emp_name);
panel1.add(txt_name);
panel1.add(emp_gender);
panel1.add(txt_gender);
panel1.add(emp_add);
panel1.add(txt_addr);
panel1.add(emp_contno);
panel1.add(txt_contno);
panel1.add(emp_emailid);
panel1.add(txt_emailid);
panel1.add(emp_deptt);
panel1.add(txt_deptt);
panel1.add(emp_design);
panel1.add(txt_design);
panel1.add(emp_bsalary);
panel1.add(txt_bsalary);
panel1.add(emp_doj);
panel1.add(txt_doj);
panel1.add(emp_grade);
panel1.add(txt_grade);
panel1.add(emp_pfacno);
panel1.add(txt_pfaccno);
panel1.setOpaque(true);

panel2 = new JPanel();


panel2.setLayout(new FlowLayout());
Exit = new JButton("Exit");

panel2.add(Exit);

Vous aimerez peut-être aussi