Académique Documents
Professionnel Documents
Culture Documents
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
(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
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.
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:
Software Requirements:
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:
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.
ii) Find out whether the organization currently possesses the required
technologies:
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?
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
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:-
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:-
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:-
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)
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
Valid
Department Department
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
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:
2. Department:
3. Designation:
4. Employee:
6. Deduction:
7. Attendance:
8. Resignation Employee:
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
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.
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).
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.
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
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
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
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
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:
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.*;
}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;
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);
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);
}
}
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.*;
// 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");
// 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();
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)
{
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.*;
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.*;
panel2.add(Exit);