Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Submitted By:
Submitted To:
Shubham Barnwal
Abstarc
This project has the many features which are useful for the payroll management
purpose. In this software the user can store the information of the personnels,
store the information of distribution of salaries, manage accounts of the
personnel, store information of tax payed by the personnels.
The Project is an endeavor to improve efficiency in the process of registration
time duration. How schema the allot and how much the time direction.
The above mentioned process till date is totally manual leaching to transaction
processing system has resulted in reasonable solution to current problem.
The after I Modified versions Modules, considering. The various validation checks
and security measures. Which are prerequisite of on-line system. It is apparent the
besides in traducing efficient customer management, improved accuracy access to
customer status etc. the new system relieve the concerned dept. of the redundant
workload.
cAknowledgmt
The projecT work PAYROLL MANAGEMENT SYSYTEM is completed and now it is
before you. It is a result of our efforts.
With the help of Mr.Sanjeev Saxena Sir, our project guide and Mr.Nitin Kannojiya
Sir, our Java instructor only this project is possible. We could collect the various
information about the PAYROLL and the tools used in its preparing and the result is
in the form of our project work named
PAYROLL MANAGEMENT SYSTEM.
We are also greatful to our parents who not only helped us but also inspired and
encouraged us in completing the project work successfully and carefully. We hope
this project work will prove itself a milestone to others but the evaluation of this
project is in your hands.
With due regards to our elders, we pay our respect to them and dedicate this
project to them.
[TYPE
THE
CO M PA N Y
ADDRESS
tuSdenDarcoliPrefac
I am student of BCA (Bachelors Of Computer Application) declared that this project
report submitted for the fulfillment of BCA course 2009-2012. This project is
original and is not submitted anywhere.
Shubham Barnwal
Objectivs
development. The entire scenario has been changed after this growth, now
peoples & organization are more likely to be depend on softwares like Property
Management, Financial Accounting, Sales order, Hospital etc.
Each software has its own strength and points of emphasis, depending on the
analysis of the systems have emphasized the computational and model based
assumption in softwares. This emphasized arises from the experience obtained in
software development unit with higher end professionals in IT sector.
The level of presentation for the best of end user in the organization. However it is
an attempt to provide the best in the industry.
SHUBHAM BARNWAL
Our team has decided to work on very popular topic Student Management that
keep all the maintenance of record of any data.
roPblemDfint
The system will be very much prevalent in coming to help the user friendly manner
to reduce paper work given rise to voluminous records and also to eliminate
difficulties which were being faced while using the manual system.
In the preparation of this project, we got full support of our college , our project
guide and also from the proprietor running Computer Labs for providing us
necessary information which is being required during course of development
software.
I was very overwhelmed doing this project and this project will serve us better
opportunities in future.
It is not easy to maintain this software with this short period of time. It takes our
hard efforts to work under this project. Sometimes we faced the problem of
connectivity with the database the hardware configuration, calculation processes
problem faced when data was not centralized.
PAYROLL MANAGEMENT SYSTEM|
aTbleofCnts
The documentation must be in scheduled and there must be the index of the
documentation by which one can search out any problem.
NetBeans IDE
System Analysis
bAouthePrjc
Preliminary investigation
Feasibility Study
Technical Feasibility
Economic Feasibility
Operational Feasibility
Request Approval
Hardware requirement
Software requirement
Database Design
Coding
System We Worked.
o Testing
Testing
Conclusion
Future Enhancements
Bibliography
onameLcwDCSpvytrfil
This project provides the facility for payroll management . User can store the
information about properties and payment. Its also provides the facility for
maintain information about personnels and different users.
The software uses Ms-Access 8.1.5.0.0 (Enterprise Edition) as the back end and Net
Beans IDE as the front end. The choice of the software was definitely driven by
current demand of the software in todays market.
The software development life cycle (SDLC) (sometimes referred to as the system
development life cycle) is the process of creating or altering software systems, and
the models and methodologies that people use to develop these systems. In any
such lifecycle, people, process and technology all play a role in success. PTC is
committed to developing solutions for engineering (Software System Lifecycle
Management) and IT (Application Lifecycle Management) organizations along with
PAYROLL MANAGEMENT SYSTEM|
System analysis
The goal of system analysis is to determine where the problem is in an attempt to
fix the system. This step involves breaking down the system in different pieces to
analyze the situation, analyzing project goals, breaking down what needs to be
created and attempting to engage users so that definite requirements can be
defined.
Design
In systems design the design functions and operations are described in detail,
including screen layouts, business rules, process diagrams and other
documentation. The output of this stage will describe the new system as a
collection of modules or subsystems.
The design stage takes as its initial input the requirements identified in the
approved requirements document. For each requirement, a set of one or more
design elements will be produced as a result of interviews, workshops, and/or
prototype efforts.
10
Design elements describe the desired software features in detail, and generally
include functional hierarchy diagrams, screen layout diagrams, tables of business
rules, business process diagrams, pseudocode, and a complete entity-relationship
diagram with a full data dictionary. These design elements are intended to
describe the software in sufficient detail that skilled programmers may develop
the software with minimal additional input design.
Implementation
After testing is done of all those modules of the proposed project, the software is
now implemented into operational software. It involves programmers, users, &
operational managements. Implementation is the process of converting a new
software design.
Testing
The code is tested at various levels in software testing. Unit, system and user
acceptance testings are often performed. This is a grey area as many different
opinions exist as to what the stages of testing are and how much, if any iteration
occurs. Iteration is not generally part of the waterfall model, but usually some
occur at this stage. In the testing the whole system is test one by one
Following are the types of testing:
Defect testing the failed scenarios, including defect tracking
Path testing
Data set testing
Unit testing
System testing
Integration testing
Black-box testing
White-box testing
Regression testing
Automation testing
User acceptance testing
Software performance testing
Operations and maintenance
The deployment of the system includes changes and enhancements before the
decommissioning or sunset of the system. Maintaining the system is an important
aspect of SDLC. As key personnel change positions in the organization, new
changes will be implemented, which will require system.
11
etNBansDE6.91I
NetBeans refers to both a platform framework for Java desktop applications, and
an integrated development environment (IDE) for developing with Java,
JavaScript, PHP, Python (no longer supported after NetBeans 7), Groovy, C, C++,
Scala, Clojure, and others. The NetBeans IDE 7.0 no longer officially supports Ruby
and Ruby on Rails, but a third party plugin allows for development.
The NetBeans IDE is written in Java and can run on Windows, Mac OS, Linux, Solaris
and other platforms supporting a compatible JVM. A pre-existing JVM or a JDK is
not required.
The NetBeans platform allows applications to be developed from a set of modular
software components called modules. Applications based on the NetBeans platform
(including the NetBeans IDE) can be extended by third party developers.
Developer(s)
Oracle Corporation
Stable release
12
etNBansDEcIi
Website
netbeans.org
It is not necessary to learn every feature of the NetBeans IDE before exploring its
GUI creation capabilities. In fact, the only features that you really need to
understand are the Palette, the Design Area, the Property Editor, and the
Inspector. We will discuss these features below.
PAYROLL MANAGEMENT SYSTEM|
13
The Palette
The Palette contains all of the components offered by the Swing API. You can
probably already guess what many of these components are for, even if this is your
first time using them (JLabel is a text label, JList is a drop-down list, etc.)
From this list, our application will use only JLabel (a basic text label), JTextField
(for the user to enter the temperature), and JButton (to convert the temperature
from Celsius to Fahrenheit.)
The Design Area
The figure above shows a single JFrame object, as represented by the large shaded
rectangle with blue border. Commonly expected behavior (such as quitting when
the user clicks the "close" button) is auto-generated by the IDE and appears in the
source view between uneditable blue sections of code known as guarded blocks.
PAYROLL MANAGEMENT SYSTEM|
14
A quick look at the source view reveals that the IDE has created a private method
named initComponents, which initializes the various components of the GUI. It also
tells the application to "exit on close", performs some layout-specific tasks, then
packs the (soon to be added) components together on screen.
Don't feel that you need to understand this code in any detail; we mention it here
simply to explore the source tab. For more information about these components,
see:
How to Make Frames (Main Windows) and Laying Out Components Within a
Container.
The Property Editor
The Property Editor does what its name implies: it allows you to edit the
properties of each component. The Property Editor is intuitive to use; in it you will
see a series of rows one row per property that you can click and edit without
entering the source code directly. The following figure shows the Property Editor
for the newly added JFrame object:
15
The screenshot above shows the various properties of this object, such as
background color, foreground color, font, and cursor.
The Inspector
The last component of the NetBeans IDE that we will use in this lesson is the
Inspector:
The Inspector
The Inspector provides a graphical representation of your application's
components. We will use the Inspector only once, to change a few variable names
to something other than their defaults.
16
ySstemAnali
Analysis is the detailed study of the various operations performed by the system
and their relationship within or outside the system. One aspect of analyzing the
system is defining the boundaries of the system and determining whether or not a
candidate.
System should consider other related system. During analysis, data are collection
on all available files. Decision points, and transactions handled by the present
system. Ones analysis is completed, the analyst has firm understanding of what is
done.
Preliminary Investigation
This phase is one in which a request is made by business system to receive the
assistance from system developers. The request may be made for various reasons.
17
Request Clarification
Feasibility Study
an important outcome of the first phase is the determination of the project
requests feasibility.
There are three aspects of feasibility: Technical Feasibility
Determines whether the work for the project can be done with the existing
equipment, software technology and available personnel.
Economic Feasibility
Determine whether there are sufficient benefits in creating the system to make
cost acceptable, or the cost of the system is too high.
Operational feasibility
Finds out whether the system if developed will be used or will there be any strong
resistance from any component of the system.
Request Approval
The last part is request approval. Not all requested projects are both desirable
and feasible. Many projects requests are received from employees only a few of
whom can be perused. However, those projects that are both feasible and
desirable and desirable should be put into use so approval of the users has to be
got in order to start on other issues, such as cost, priority, completion time and
personal requirement.
18
tMCAnbduSEoac-Iri
19
20
Keep this advantage in mind as we switch back and forth between personalities
and different computing paradigms.
Access database
Although the term database typically refers to a collection of related data
table, an Access database includes more than just data. In addition to table, an
Access database file contains several different types of database objects.
You can store general-purpose Microsoft Visual Basic for application procedures in a
library database. An Access database application can call procedures from a library
database. After establishing a link to the database. Called a reference. You can
create or purchase tools called add-ins to add custom feature to Access. Access
user-level security account information is stored in a database. Called a workgroup
information file.
21
TABLES:In Microsoft Access, you store data in table. Table organizes data into columns and
rows. Each row in a table is called a record. Each column in a record is called a
field. For example, each record in a Customer table contains information about
one customer. Each customers record contain fields name for each piece of
information you want to store about the customer, such as last name, first name,
address, city, state/province, postal code and phone. Users can enter and modify
data in table directly or through queries and data entry forms.
Storing related data in separate tables :You can create a separate table for each topic of data. Such as customers,
employees, or products. Using a separator table for each topic means that you
store that data only once, which makes your database .more efficient and reduces
data entry errors. For example If you, if you store both customer and order
information in one table, whenever a customer places an additional order, you
have to reenter information about that customer. Not only is this inefficient, but
errors can occur when information is reentered. If you keep separate table for
customer and orders, each customer has only one record in the Customer table. If
you need to update or correct information about a customer, you need to change
data in only one record. This method eliminates redundant entries and reduces
datacenter errors.
The process of eliminating redundancy by dividing data into separate related table
is called normalization. Access providers a wizard called the Table analyzer Wizard
to help you normalize your database.
Defining Relationships
To bring the data from multiple tables together for a query, form or report, you
define relationship between the tables based on a common piece of information
stored in both tables. For example a Customer table typically contains a Customer
ID field whose value uniquely identifies each customer. If the order table also has a
PAYROLL MANAGEMENT SYSTEM|
22
Customer_ID field, you can define a relationship between the two tables, so that
when you enter orders, you can enter a customers ID number to relate information
from the Customer table to that order. Instead of actually typing the
Customer_ID.you can use a lookup list box, as shown in the orders form the north
wind sample database.
23
ARHDWEMQUNTSI
System Type
Personal Computers
Processor Type
RAM
64 MB or Higher
HDD
Good performance
SVGA Modes
24
TCP/IP
LAN Cards
25
OFSTWAREMQUNI
Operating System
: MS Access2007
versions
26
27
ADTBSEIGN
LOGIN TABLE
FIELD NAME
TYPE
SIZE
USERNAME
TEXT
50
PASSWORD
TEXT
50
28
PERSONNEL TABLE
FIELD NAME
TYPE
SIZE
ID
LONG
NAME
TEXT
50
FSTHERS NAME
TEXT
50
DOB
DATE/TIME
DOJ
DATE/TIME
GENDER
TEXT
50
DEPARTMENT
TEXT
50
POST
TEXT
50
CONTACT
LONG
ADDRESS
TEXT
50
TEXT
50
SALARY
DOUBLE
SALARY TABLE
FIELD NAME
TYPE
SIZE
SLIP NO.
LONG
ID
LONG
NAME
TEXT
50
POST
TEXT
50
MONTH
TEXT
50
WORKINGDAYS
INTEGER
SALARY
DOUBLE
DA
DOUBLE
HRA
DOUBLE
TOTAL SAL
DOUBLE
29
TAX TABLE
FIELD NAME
TYPE
SIZE
ID
LONG
SLIP NO.
LONG
NAME
TEXT
50
DEPTT.
TEXT
50
POST
TEXT
50
TOTAL SALARY
DOUBLE
TAX
DOUBLE
30
CODINGMDIForm
PAYROLL MANAGEMENT SYSTEM|
31
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* mdi.java
*
* Created on Jun 9, 2012, 11:05:02 PM
*/
32
package rol;
/**
*
* @author Shubham Barnwal
*/
public class mdi extends javax.swing.JFrame {
d1 = new javax.swing.JDesktopPane();
menuBar = new javax.swing.JMenuBar();
fileMenu = new javax.swing.JMenu();
openMenuItem = new javax.swing.JMenuItem();
saveMenuItem = new javax.swing.JMenuItem();
PAYROLL MANAGEMENT SYSTEM|
33
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("PayRoll Management System");
fileMenu.setText("Personnel Management");
PAYROLL MANAGEMENT SYSTEM|
34
menuBar.add(fileMenu);
35
editMenu.setText("Salary Management");
36
deleteMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
deleteMenuItemActionPerformed(evt);
}
});
editMenu.add(deleteMenuItem);
menuBar.add(editMenu);
helpMenu.setText("Tax Management");
contentMenuItem.setText("Calculate Tax");
contentMenuItem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
contentMenuItemActionPerformed(evt);
}
});
helpMenu.add(contentMenuItem);
37
menuBar.add(helpMenu);
jMenu1.setText("Administrator");
jMenuItem2.setText("Add User");
jMenuItem2.setName("jMenuItem2"); // NOI18N
jMenuItem2.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem2ActionPerformed(evt);
}
});
jMenu1.add(jMenuItem2);
jMenuItem3.setText("Remove User");
jMenuItem3.setName("jMenuItem3"); // NOI18N
jMenuItem3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem3ActionPerformed(evt);
PAYROLL MANAGEMENT SYSTEM|
38
}
});
jMenu1.add(jMenuItem3);
menuBar.add(jMenu1);
jMenu2.setText("About Us");
jMenu2.setName("jMenu2"); // NOI18N
jMenuItem4.setText("Click Here");
jMenuItem4.setName("jMenuItem4"); // NOI18N
jMenuItem4.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jMenuItem4ActionPerformed(evt);
}
});
jMenu2.add(jMenuItem4);
menuBar.add(jMenu2);
jMenu3.setText("Log out");
jMenu3.setName("jMenu3"); // NOI18N
jMenuItem5.setText("Log Out");
jMenuItem5.setName("jMenuItem5"); // NOI18N
jMenuItem5.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
PAYROLL MANAGEMENT SYSTEM|
39
jMenuItem5ActionPerformed(evt);
}
});
jMenu3.add(jMenuItem5);
menuBar.add(jMenu3);
setJMenuBar(menuBar);
javax.swing.GroupLayout
javax.swing.GroupLayout(getContentPane());
layout
new
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(d1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 743, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(d1, javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 504, Short.MAX_VALUE)
);
pack();
}// </editor-fold>
40
d1.add(pp);
pp.setVisible(true);
}
41
42
43
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new mdi().setVisible(true);
}
});
}
PAYROLL MANAGEMENT SYSTEM|
44
}
PAYROLL MANAGEMENT SYSTEM|
45
LoginFrm
PAYROLL MANAGEMENT SYSTEM|
46
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* LogIn.java
47
*
* Created on May 14, 2012, 7:34:13 PM
*/
package rol;
import java.sql.*;
import java.lang.String.*;
import javax.swing.JOptionPane;
/**
*
* @author Administrator
*/
public class LogIn extends javax.swing.JFrame {
48
jPanel2.setName("jPanel2"); // NOI18N
49
);
setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
setTitle("PayRoll System");
setBackground(new java.awt.Color(51, 255, 0));
50
51
});
jLabel1.setIcon(new javax.swing.ImageIcon("D:\\pay\\Payroll-management
(2).jpg")); // NOI18N
jLabel1.setText("jLabel1");
jLabel1.setBorder(new javax.swing.border.MatteBorder(null));
PAYROLL MANAGEMENT SYSTEM|
52
jLabel1.setName("jLabel1"); // NOI18N
53
54
.addContainerGap()
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 961,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
jPanel1Layout.createSequentialGroup()
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.BASELINE)
.addComponent(tid, javax.swing.GroupLayout.PREFERRED_SIZE,
25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 30,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.BASELINE)
PAYROLL MANAGEMENT SYSTEM|
55
.addComponent(tpwd,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 34,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4))
.addGap(8, 8, 8)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment
.BASELINE)
.addComponent(jButton1)
.addComponent(jButton3))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 26,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addComponent(jLabel5))
.addGap(428, 428, 428))
);
56
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 519,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
if(id.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter User Name");
}
else if(pwd.length() == 0)
{
JOptionPane.showMessageDialog(null,"Enter the Password");
}
else
57
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps;
ps=con.prepareStatement("select *
from log where uname=?");
ps.setString(1,id);
ResultSet res=ps.executeQuery();
if(res.next())
{
String
str=res.getString(2).trim();
if(str.equals(pwd))
{
JOptionPane.showMessageDialog(null,"Valid User");
this.setVisible(false);
mdi md=new mdi();
md.setVisible(true);
}
else
{
JOptionPane.showMessageDialog(null,"Invalid
Password");
}
PAYROLL MANAGEMENT SYSTEM|
58
}
else
{
JOptionPane.showMessageDialog(null,"Invalid User
Name");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
59
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new LogIn().setVisible(true);
}
});
}
60
bAoutUsFrm
// End of variables declaration
61
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* About.java
PAYROLL MANAGEMENT SYSTEM|
62
*
* Created on Jun 10, 2012, 6:07:51 PM
*/
package rol;
/**
*
* @author Shubham Barnwal
*/
public class About extends javax.swing.JInternalFrame {
63
jSeparator1.setName("jSeparator1"); // NOI18N
64
65
jSeparator2.setName("jSeparator2"); // NOI18N
66
.addContainerGap(32, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(356, Short.MAX_VALUE)
.addComponent(jLabel8)
.addGap(322, 322, 322))
.addGroup(layout.createSequentialGroup()
.addGap(103, 103, 103)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addGroup(layout.createSequentialGroup()
.addGap(10, 10, 10)
.addComponent(jLabel2))
.addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jSeparator2))
.addContainerGap(96, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(322, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel4)
.addComponent(jLabel3))
PAYROLL MANAGEMENT SYSTEM|
67
68
.addComponent(jLabel8)
.addGap(26, 26, 26)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE, 11,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 35,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 27,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 22,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(42, 42, 42))
);
pack();
}// </editor-fold>
69
AnaohMwNRdSeycrtfl
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
70
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Addsal.java
PAYROLL MANAGEMENT SYSTEM|
71
*
* Created on Jun 10, 2012, 1:09:05 AM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham
*/
public class Addsal extends javax.swing.JInternalFrame {
72
73
jTextField5.setText("jTextField5");
jTextField5.setName("jTextField5"); // NOI18N
74
jLabel3.setName("jLabel3"); // NOI18N
75
jLabel9.setName("jLabel9"); // NOI18N
76
77
78
});
79
});
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
jSeparator3.setName("jSeparator3"); // NOI18N
80
.addComponent(jLabel7)
.addGap(49, 49, 49)))
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addComponent(r6,
javax.swing.GroupLayout.PREFERRED_SIZE, 133,
javax.swing.GroupLayout.PREFERRED_SIZE)
PAYROLL MANAGEMENT SYSTEM|
81
82
.addGroup(layout.createSequentialGroup()
.addComponent(r9, javax.swing.GroupLayout.PREFERRED_SIZE,
133, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap()))
.addGroup(layout.createSequentialGroup()
.addComponent(r3, javax.swing.GroupLayout.PREFERRED_SIZE,
133, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())))
.addGroup(layout.createSequentialGroup()
.addGap(168, 168, 168)
.addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE,
132, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(92, 92, 92)
.addComponent(r10, javax.swing.GroupLayout.PREFERRED_SIZE, 133,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(128, 128, 128))
.addGroup(layout.createSequentialGroup()
.addGap(32, 32, 32)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel1)
.addContainerGap())
.addGroup(layout.createSequentialGroup()
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(94, 94, 94)
PAYROLL MANAGEMENT SYSTEM|
83
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jSeparator3,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addComponent(jSeparator2,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addComponent(jButton2,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addComponent(jButton3,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE)
.addComponent(jButton4,
javax.swing.GroupLayout.DEFAULT_SIZE, 423, Short.MAX_VALUE))
.addGap(106, 106, 106))))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(29, 29, 29)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
35, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(r1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
PAYROLL MANAGEMENT SYSTEM|
84
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel3)
.addComponent(r2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel4)
.addComponent(r3, javax.swing.GroupLayout.PREFERRED_SIZE, 19,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(17, 17, 17)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel5)
.addComponent(r4, javax.swing.GroupLayout.PREFERRED_SIZE, 19,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(11, 11, 11)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel6)
.addComponent(r5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
85
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel7)
.addComponent(r6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(7, 7, 7)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator3,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel8)
.addComponent(r7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
86
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel11)
.addComponent(r8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel12)
.addComponent(r9, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jButton1)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel10)
.addComponent(r10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(11, 11, 11)
87
pack();
}// </editor-fold>
88
{
JOptionPane.showMessageDialog(null," Enter
Employee ID..");
return;
}
String name=r3.getText().trim();
if(name.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee Name..");
return;
}
String post=r4.getText().trim();
if(post.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee Post");
return;
}
String month=(String) r5.getSelectedItem();
if(month.length()==0) {
JOptionPane.showMessageDialog(null,"Select month");
return;
}
String work=r6.getText().trim();
if(work.length()==0)
PAYROLL MANAGEMENT SYSTEM|
89
{
JOptionPane.showMessageDialog(null,"Enter No Of
Working Day");
return;
}
String sal=r7.getText().trim();
if(sal.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee Salaryr");
return;
}
String da=r8.getText().trim();
if(da.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter Da");
return;
}
String hra=r9.getText().trim();
if(hra.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee HRA");
return;
PAYROLL MANAGEMENT SYSTEM|
90
}
String total=r10.getText().trim();
if(total.length()==0)
{
JOptionPane.showMessageDialog(null,"Calculate
Employee Total Salary ");
return;
}
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement
ps=con.prepareStatement("insert into sal values(?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,slip);
ps.setString(2,id);
ps.setString(3,name);
ps.setString(4,post);
ps.setString(5,month);
ps.setString(6,work);
ps.setString(7,sal);
ps.setString(8,da);
PAYROLL MANAGEMENT SYSTEM|
91
ps.setString(9,hra);
ps.setString(10,total);
int i=ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null,"Eployee Details
Add");
}
else
{
JOptionPane.showMessageDialog(null,"Record not
Save");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
int d,h,s,sum;
PAYROLL MANAGEMENT SYSTEM|
92
String sal=r7.getText();
String da=r8.getText();
String hra=r9.getText();
d=Integer.parseInt(da);
h=Integer.parseInt(hra);
s=Integer.parseInt(sal);
sum=(d+h+s);
String str=String.valueOf(sum);
r10.setText(str);
// TODO add yourhandling code here:
}
r1.setText("");
r2.setText("");
r3.setText("");
r4.setText("");
r6.setText("");
r7.setText("");
r8.setText("");
r9.setText("");
r10.setText("");
93
this.setVisible(false);
// TODO add your handling code here:
}
94
ewNUsrRtagoni
private javax.swing.JSeparator jSeparator1;
private javax.swing.JSeparator jSeparator2;
private javax.swing.JSeparator jSeparator3;
private javax.swing.JTextField jTextField5;
private javax.swing.JTextField r1;
95
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Aduser.java
*
PAYROLL MANAGEMENT SYSTEM|
96
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Administrator
*/
public class Aduser extends javax.swing.JInternalFrame {
97
98
99
});
jLabel3.setName("jLabel3"); // NOI18N
100
jLabel4.setText("Confirm Password");
jLabel4.setName("jLabel4"); // NOI18N
jLabel5.setIcon(new
javax.swing.ImageIcon("D:\\pay\\payroll_management_02_5.jpg")); // NOI18N
jLabel5.setText("jLabel5");
jLabel5.setName("jLabel5"); // NOI18N
jSeparator1.setName("jSeparator1"); // NOI18N
101
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(124, 124, 124)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addGroup(layout.createSequentialGroup()
.addGap(35, 35, 35)
.addComponent(jButton1,
javax.swing.GroupLayout.PREFERRED_SIZE, 100,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 98,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton3,
javax.swing.GroupLayout.PREFERRED_SIZE, 91,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(jSeparator1,
javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
PAYROLL MANAGEMENT SYSTEM|
102
.addComponent(jLabel1)
.addComponent(jLabel2)
.addComponent(jLabel4))
.addGap(93, 93, 93)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(ad1,
javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
.addComponent(ad2)
.addComponent(ad3))))))
.addGroup(layout.createSequentialGroup()
.addGap(31, 31, 31)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 591,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel7,
javax.swing.GroupLayout.PREFERRED_SIZE, 131,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 309,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel6, 0, 0, Short.MAX_VALUE)))))
.addContainerGap(22, javax.swing.GroupLayout.PREFERRED_SIZE))
PAYROLL MANAGEMENT SYSTEM|
103
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel5, javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE,
151, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE,
149, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 68,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(ad1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel1))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
104
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
19, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(ad2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(ad3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4))
.addGap(17, 17, 17)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(22, 22, 22)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jButton1)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
25, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE,
25, javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(38, 38, 38))
);
pack();
}// </editor-fold>
PAYROLL MANAGEMENT SYSTEM|
105
if(username.length() == 0)
{
JOptionPane.showMessageDialog(null,"Enter User
PassWord");
}
String cn=ad3.getText().trim();
if (cn.length() == 0)
106
{
JOptionPane.showMessageDialog(null,"Enter ConFirm
PassWord");
else
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps;
ps=con.prepareStatement("insert into log
values(?,?)");
ps.setString(1,id);
ps.setString(2,username);
int i=ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null,"User
Add");
PAYROLL MANAGEMENT SYSTEM|
107
con.close();
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
108
eDltUsrFom
private javax.swing.JPasswordField ad3;
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JButton jButton3;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel4;
private javax.swing.JLabel jLabel5;
private javax.swing.JLabel jLabel6;
private javax.swing.JLabel jLabel7;
109
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* RemoveUser.java
*
* Created on May 14, 2012, 7:54:10 PM
PAYROLL MANAGEMENT SYSTEM|
110
*/
package rol;
import java.sql.*;
import java.lang.String.*;
import javax.swing.JOptionPane;
/**
*
* @author Administrator
*/
public class RemoveUser extends javax.swing.JInternalFrame {
111
112
113
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(31, 31, 31)
.addComponent(jLabel7,
javax.swing.GroupLayout.PREFERRED_SIZE, 502,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(76, 76, 76)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel1)
.addComponent(jLabel2)))
.addGroup(layout.createSequentialGroup()
.addGap(255, 255, 255)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(RU1,
javax.swing.GroupLayout.PREFERRED_SIZE, 84,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jButton2,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.Alignment.TRAILING,
PAYROLL MANAGEMENT SYSTEM|
114
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))))
.addContainerGap(39, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(29, 29, 29)
.addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 61,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(RU1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(49, 49, 49)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(17, 17, 17)
.addComponent(jLabel2))
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
PAYROLL MANAGEMENT SYSTEM|
115
.addComponent(jButton2,
javax.swing.GroupLayout.PREFERRED_SIZE, 29,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(33, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
116
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement
ps=con.prepareStatement("delete from log where uname=? ");
ps.setString(1,username.trim());
int i=ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null,"User Deleted");
}
else
{
JOptionPane.showMessageDialog(null,"User not
Present in DataBase");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
117
StlRcFamoMysdhnerf
private javax.swing.JButton jButton1;
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel7;
// End of variables declaration
118
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* Searchpay.java
PAYROLL MANAGEMENT SYSTEM|
119
*
* Created on Jun 10, 2012, 7:41:11 AM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class Searchpay extends javax.swing.JInternalFrame {
120
121
jScrollBar1.setName("jScrollBar1"); // NOI18N
122
}
});
123
124
125
126
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
jSeparator3.setName("jSeparator3"); // NOI18N
127
.addGroup(layout.createSequentialGroup()
.addGap(37, 37, 37)
.addComponent(jLabel3))
.addGroup(layout.createSequentialGroup()
.addGap(247, 247, 247)
.addComponent(jLabel9))
.addGroup(layout.createSequentialGroup()
.addGap(280, 280, 280)
.addComponent(p2, javax.swing.GroupLayout.PREFERRED_SIZE,
68, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(32, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(249, 249, 249)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel12,
javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel8,
javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel11,
javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jLabel10,
javax.swing.GroupLayout.Alignment.TRAILING))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(p10)
.addComponent(p9)
PAYROLL MANAGEMENT SYSTEM|
128
.addComponent(p8)
.addComponent(p7, javax.swing.GroupLayout.PREFERRED_SIZE, 83,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(221, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(159, 159, 159)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jSeparator3,
javax.swing.GroupLayout.Alignment.TRAILING,
javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addComponent(jSeparator2,
javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 187,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(p3,
javax.swing.GroupLayout.PREFERRED_SIZE, 144,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(25, 25, 25)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel4)
.addComponent(jLabel5)
PAYROLL MANAGEMENT SYSTEM|
129
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 75,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addComponent(p1,
javax.swing.GroupLayout.PREFERRED_SIZE, 144,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(p4,
javax.swing.GroupLayout.PREFERRED_SIZE, 144,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(p5,
javax.swing.GroupLayout.PREFERRED_SIZE, 144,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(p6,
javax.swing.GroupLayout.PREFERRED_SIZE, 144,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addGap(29, 29, 29))
.addComponent(jSeparator1,
javax.swing.GroupLayout.DEFAULT_SIZE, 385, Short.MAX_VALUE))
.addGap(298, 298, 298))
.addGroup(layout.createSequentialGroup()
.addGap(270, 270, 270)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
130
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
84, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(225, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGap(27, 27, 27)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel3)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 10,
Short.MAX_VALUE)
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(p2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jButton1)
.addComponent(jButton2))
.addGap(19, 19, 19)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE,
PAYROLL MANAGEMENT SYSTEM|
131
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE,
35, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel4)
.addComponent(p4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
132
.addComponent(p5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel7)
.addComponent(p6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel8)
.addComponent(p7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel11)
.addComponent(p8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
PAYROLL MANAGEMENT SYSTEM|
133
.addGap(5, 5, 5)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel12)
.addComponent(p9, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel10)
.addComponent(p10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addComponent(jSeparator3,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(24, 24, 24))
);
pack();
}// </editor-fold>
134
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement
ps=con.prepareStatement("select * from sal where id=?");
ps.setString(1,id);
ResultSet res=ps.executeQuery();
if(res.next())
{
p1.setText(res.getString(1).trim());
p3.setText(res.getString(4).trim());
p4.setText(res.getString(3).trim());
PAYROLL MANAGEMENT SYSTEM|
135
p5.setText(res.getString(5).trim());
p6.setText(res.getString(6).trim());
p7.setText(res.getString(7).trim());
p8.setText(res.getString(8).trim());
p9.setText(res.getString(9).trim());
p10.setText(res.getString(10).trim());
p2.setText(res.getString(2).trim());
}
else
{
JOptionPane.showMessageDialog(null,"Enter Valid
Employee Id");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
136
137
wmrgNtRneoaPFsil
private javax.swing.JTextField p3;
private javax.swing.JTextField p4;
private javax.swing.JTextField p5;
private javax.swing.JTextField p6;
private javax.swing.JTextField p7;
private javax.swing.JTextField p8;
private javax.swing.JTextField p9;
// End of variables declaration
138
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* addpersonal.java
PAYROLL MANAGEMENT SYSTEM|
139
*
* Created on Jun 8, 2012, 12:56:39 AM
*/
package rol;
import java.sql.*;
import java.lang.String.*;
import javax.swing.JOptionPane;
/**
*
* @author Shubham Barnwal
*/
public class addpersonal extends javax.swing.JInternalFrame {
140
141
jInternalFrame1.setBorder(javax.swing.BorderFactory.createMatteBorder(1,
1, 1, 1, new java.awt.Color(204, 51, 0)));
jInternalFrame1.setClosable(true);
jInternalFrame1.setIconifiable(true);
jInternalFrame1.setTitle("College Mgmt System");
jInternalFrame1.setName("jInternalFrame1"); // NOI18N
142
jInternalFrame1.getContentPane().setLayout(jInternalFrame1Layout);
jInternalFrame1Layout.setHorizontalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGap(0, 0, Short.MAX_VALUE)
);
jInternalFrame1Layout.setVerticalGroup(
jInternalFrame1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LE
ADING)
.addGap(0, 0, Short.MAX_VALUE)
);
143
jLabel11.setText("Email Id");
jLabel11.setName("jLabel11"); // NOI18N
144
jScrollPane1.setName("jScrollPane1"); // NOI18N
145
}
});
146
jLabel1.setIcon(new javax.swing.ImageIcon("D:\\pay\\Untitled6.png")); //
NOI18N
jLabel1.setText("
Add Profile");
jLabel1.setName("jLabel1"); // NOI18N
147
jLabel3.setName("jLabel3"); // NOI18N
148
jLabel14.setName("jLabel14"); // NOI18N
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
149
150
.addComponent(jLabel2)
.addComponent(jLabel3)
.addComponent(jLabel14)
.addComponent(jLabel6)
.addComponent(jLabel13)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel10)
.addComponent(jLabel8))
.addGap(27, 27, 27)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addGroup(layout.createSequentialGroup()
.addComponent(g1)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, false)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(p8,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(p7,
javax.swing.GroupLayout.Alignment.LEADING, 0,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
PAYROLL MANAGEMENT SYSTEM|
151
.addComponent(p6,
javax.swing.GroupLayout.Alignment.LEADING, 0,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(p5,
javax.swing.GroupLayout.Alignment.LEADING)))
.addGroup(layout.createSequentialGroup()
.addGap(40, 40, 40)
.addComponent(g2,
javax.swing.GroupLayout.PREFERRED_SIZE, 70,
javax.swing.GroupLayout.PREFERRED_SIZE))))
.addComponent(p3)
.addComponent(p2)
.addComponent(p1, javax.swing.GroupLayout.DEFAULT_SIZE,
121, Short.MAX_VALUE)
.addComponent(p4))))
.addGap(207, 207, 207)
.addComponent(jLabel7)
.addContainerGap())
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(63, Short.MAX_VALUE)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
593, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(61, 61, 61))
.addGroup(layout.createSequentialGroup()
.addGap(111, 111, 111)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 480,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(126, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
PAYROLL MANAGEMENT SYSTEM|
152
153
154
.addComponent(p1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel3)
.addComponent(p2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p3,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel13))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p4,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4))
.addGap(18, 18, 18)
PAYROLL MANAGEMENT SYSTEM|
155
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(g1)
.addComponent(g2,
javax.swing.GroupLayout.PREFERRED_SIZE, 23,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel5))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(25, 25, 25)
.addComponent(p5,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(p6,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(p7,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(p8,
javax.swing.GroupLayout.PREFERRED_SIZE, 20,
javax.swing.GroupLayout.PREFERRED_SIZE))
PAYROLL MANAGEMENT SYSTEM|
156
.addGroup(layout.createSequentialGroup()
.addGap(31, 31, 31)
.addComponent(jLabel14)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel9)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel10)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel8)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE, 62,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p10,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
157
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(p11,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12,
javax.swing.GroupLayout.PREFERRED_SIZE, 20,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(35, 35, 35)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jButton1)
.addComponent(jButton2))
.addComponent(jButton3)))))
.addGroup(layout.createSequentialGroup()
.addGap(99, 99, 99)
.addComponent(jLabel15)
.addGap(1, 1, 1)
.addComponent(jLabel16)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(460, 460, 460)
158
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap(42, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(0, 346, Short.MAX_VALUE)
.addComponent(jInternalFrame1,
javax.swing.GroupLayout.PREFERRED_SIZE, 0,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 346, Short.MAX_VALUE)))
);
pack();
}// </editor-fold>
String id=p1.getText().trim();
if(id.length()==0) {
JOptionPane.showMessageDialog(null,"Enter ID");
return;
}
String name=p2.getText().trim();
if(name.length()==0) {
JOptionPane.showMessageDialog(null," Enter Name");
return;
PAYROLL MANAGEMENT SYSTEM|
159
}
String father=p3.getText().trim();
if(father.length()==0) {
JOptionPane.showMessageDialog(null," Enter Father Name");
return;
}
String date=p4.getText().trim();
if(date.length()==0) {
JOptionPane.showMessageDialog(null,"Enter Date of Birth");
return;
}
String gender;
if(g1.isSelected()) {
gender=g1.getText();
} else {
gender=g2.getText();
}
String jon=p5.getText().trim();
if(jon.length()==0) {
JOptionPane.showMessageDialog(null,"Date OF Joinig ");
return;
}
String dep=(String) p6.getSelectedItem();
if(dep.length()==0) {
JOptionPane.showMessageDialog(null,"Select Deptt");
return;
}
PAYROLL MANAGEMENT SYSTEM|
160
String mail=p10.getText().trim();
if(mail.length()==0) {
JOptionPane.showMessageDialog(null,"Enter Mail Id");
return;
}
String sal=p11.getText().trim();
if(sal.length()==0) {
JOptionPane.showMessageDialog(null,"Enter Employee salary");
return;
}
161
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps=con.prepareStatement("insert into personal
values(?,?,?,?,?,?,?,?,?,?,?,?)");
ps.setString(1,id);
ps.setString(2,name);
ps.setString(3,father);
ps.setString(4,date);
ps.setString(5,gender);
ps.setString(6,jon);
ps.setString(7,dep);
ps.setString(8,post);
ps.setString(9,contact);
ps.setString(10,add);
ps.setString(11,mail);
ps.setString(12,sal);
int i=ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null,"Add Profile");
} else {
JOptionPane.showMessageDialog(null,"Not Add Profile");
}
} catch (Exception ex) {
162
JOptionPane.showMessageDialog(null, ex.toString());
}
// TODO add your handling code here:
}
p4.setText("");
p5.setText("");
p8.setText("");
p9.setText("");
p10.setText("");
p11.setText("");
this.setVisible(false);
// TODO add your handling code here:
}
163
164
axTcuContFrmli
private javax.swing.JTextField p1;
165
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
PAYROLL MANAGEMENT SYSTEM|
166
* addtax.java
*
* Created on Jun 10, 2012, 2:46:43 PM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class addtax extends javax.swing.JInternalFrame {
167
168
setBorder(javax.swing.BorderFactory.createMatteBorder(1, 1, 1, 1, new
java.awt.Color(153, 51, 0)));
setClosable(true);
setIconifiable(true);
setTitle("Payroll Management System");
Calculate Tax");
jLabel1.setName("jLabel1"); // NOI18N
169
jTextField1.setText("jTextField1");
jTextField1.setName("jTextField1"); // NOI18N
170
171
172
jButton2ActionPerformed(evt);
}
});
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
173
174
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(jLabel3)
.addComponent(jLabel2))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, false)
.addComponent(s3,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(s2,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(s1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
.addComponent(s5,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(s4,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 141, Short.MAX_VALUE)
.addComponent(s6,
javax.swing.GroupLayout.PREFERRED_SIZE, 149,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(18, 18, 18)
.addComponent(jLabel8)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 115,
Short.MAX_VALUE)
.addComponent(s7,
javax.swing.GroupLayout.PREFERRED_SIZE, 145,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(13, 13, 13))
PAYROLL MANAGEMENT SYSTEM|
175
.addGroup(layout.createSequentialGroup()
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jSeparator2,
javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)
.addComponent(jButton5,
javax.swing.GroupLayout.DEFAULT_SIZE, 364, Short.MAX_VALUE)))))
.addComponent(jLabel1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 483,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(39, 39, 39)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(231, 231, 231)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG, false)
.addComponent(jButton1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton2,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 203,
javax.swing.GroupLayout.PREFERRED_SIZE))
176
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 79,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(30, 30, 30))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(37, 37, 37)
.addComponent(jLabel1)
.addGap(11, 11, 11)
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE,
287, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.LEADING,
layout.createSequentialGroup()
.addGap(12, 12, 12)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILI
NG)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel3)
.addGap(8, 8, 8)
PAYROLL MANAGEMENT SYSTEM|
177
.addComponent(jLabel4)
.addGap(12, 12, 12)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel6)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel7))
.addGroup(layout.createSequentialGroup()
.addComponent(s1,
javax.swing.GroupLayout.PREFERRED_SIZE, 19,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(s2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(8, 8, 8)
.addComponent(s3,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(12, 12, 12)
.addComponent(s4,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(s5,
javax.swing.GroupLayout.PREFERRED_SIZE,
PAYROLL MANAGEMENT SYSTEM|
178
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(s6,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jButton5)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel8)
.addComponent(s7, javax.swing.GroupLayout.PREFERRED_SIZE,
19, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14,
Short.MAX_VALUE)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
PAYROLL MANAGEMENT SYSTEM|
179
.addComponent(jButton2)
.addGap(52, 52, 52))
);
layout.linkSize(javax.swing.SwingConstants.VERTICAL, new
java.awt.Component[] {s1, s2, s3, s4, s5, s6, s7});
pack();
}// </editor-fold>
180
181
JOptionPane.showMessageDialog(null,"Enter
Employee dept");
return;
}
String post=s5.getText().trim();
if(post.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee post ");
return;
}
String sal=s6.getText().trim();
if(sal.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter
Employee Anual Salary ");
return;
}
String tax=s7.getText().trim();
if(tax.length()==0)
PAYROLL MANAGEMENT SYSTEM|
182
{
JOptionPane.showMessageDialog(null,"Calculate Tax
");
return;
}
else
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement
ps=con.prepareStatement("insert into tax values(?,?,?,?,?,?,?)");
ps.setString(1,id);
ps.setString(2,slip);
ps.setString(3,name);
ps.setString(4,dept);
ps.setString(5,post);
ps.setString(6,sal);
ps.setString(7,tax);
int i=ps.executeUpdate();
if(i>0)
{
PAYROLL MANAGEMENT SYSTEM|
183
JOptionPane.showMessageDialog(null,"Eployee Details
Add");
}
else
{
JOptionPane.showMessageDialog(null,"Record not
Save");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
184
185
DmnSeoayPFsrtl
// End of variables declaration
186
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* removepay.java
*
PAYROLL MANAGEMENT SYSTEM|
187
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author shubham
*/
public class removepay extends javax.swing.JInternalFrame {
188
189
t1.setName("t1"); // NOI18N
190
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(20, 20, 20)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 592,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 588,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(265, 265, 265)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G, false)
.addComponent(jButton2,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(t1, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 105, Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
.addContainerGap(26, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
PAYROLL MANAGEMENT SYSTEM|
191
pack();
}// </editor-fold>
192
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps=con.prepareStatement("delete from sal where id=?
");
ps.setString(1,id.trim());
int i=ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null,"Employee Pay Details
Remove");
} else {
JOptionPane.showMessageDialog(null,"Enter Valid Employee Id");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
193
eDPsonmFrtl
private javax.swing.JButton jButton2;
private javax.swing.JLabel jLabel1;
private javax.swing.JLabel jLabel2;
private javax.swing.JTextField t1;
// End of variables declaration
194
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* removepersonal.java
PAYROLL MANAGEMENT SYSTEM|
195
*
* Created on Jun 8, 2012, 12:57:19 AM
*/
package rol;
import java.sql.*;
import java.lang.String.*;
import javax.swing.JOptionPane;
/**
*
* @author Shubham Barnwal
*/
public class removepersonal extends javax.swing.JInternalFrame {
196
Remove Profile");
jLabel1.setName("jLabel1"); // NOI18N
197
198
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGap(26, 26, 26)
.addComponent(jLabel1,
javax.swing.GroupLayout.PREFERRED_SIZE, 592,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(138, 138, 138)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 375,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(283, 283, 283)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(s1, javax.swing.GroupLayout.DEFAULT_SIZE, 93,
Short.MAX_VALUE)
.addComponent(jButton1,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE)
.addComponent(jButton2,
javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
Short.MAX_VALUE))))
.addContainerGap(26, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
PAYROLL MANAGEMENT SYSTEM|
199
pack();
}// </editor-fold>
200
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps=con.prepareStatement("delete
from personal where id=?");
ps.setString(1,id.trim());
int i=ps.executeUpdate();
if(i>0)
{
JOptionPane.showMessageDialog(null,"Profile
Deleted");
}
else
{
JOptionPane.showMessageDialog(null,"Enter valid
Eployee ID");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
201
eDamoxiFsTtrl
this.setVisible(false);
202
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* removetax.java
*
PAYROLL MANAGEMENT SYSTEM|
203
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class removetax extends javax.swing.JInternalFrame {
204
205
206
207
208
pack();
}// </editor-fold>
209
ps.setString(1,id.trim());
int i=ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null,"Employee Tax Details
Remove");
} else {
JOptionPane.showMessageDialog(null,"Enter Valid Employee Id");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
210
eaSchPsonmFrl
PAYROLL MANAGEMENT SYSTEM|
211
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
PAYROLL MANAGEMENT SYSTEM|
212
* searchpersonal.java
*
* Created on Jun 10, 2012, 12:15:07 AM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class searchpersonal extends javax.swing.JInternalFrame {
213
214
a9 = new javax.swing.JTextField();
jButton1 = new javax.swing.JButton();
jButton2 = new javax.swing.JButton();
jButton3 = new javax.swing.JButton();
jLabel7 = new javax.swing.JLabel();
jSeparator1 = new javax.swing.JSeparator();
jSeparator2 = new javax.swing.JSeparator();
jSeparator3 = new javax.swing.JSeparator();
215
jLabel3.setName("jLabel3"); // NOI18N
216
jLabel14.setText("Date Of Joining");
jLabel14.setName("jLabel14"); // NOI18N
217
jScrollPane1.setName("jScrollPane1"); // NOI18N
218
Search Profile");
jLabel1.setName("jLabel1"); // NOI18N
219
jLabel4.setName("jLabel4"); // NOI18N
220
jLabel7.setName("jLabel7"); // NOI18N
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
jSeparator3.setName("jSeparator3"); // NOI18N
221
.addGroup(layout.createSequentialGroup()
.addGap(28, 28, 28)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel7)
.addGap(30, 30, 30)
.addComponent(jLabel2))
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
591, javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(29, Short.MAX_VALUE))
.addGroup(layout.createSequentialGroup()
.addGap(299, 299, 299)
.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE, 77,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap(272, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(271, Short.MAX_VALUE)
.addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE,
140, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(237, 237, 237))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(173, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel3)
.addComponent(jLabel13)
PAYROLL MANAGEMENT SYSTEM|
222
.addComponent(jLabel4)
.addComponent(jLabel5))
.addGap(76, 76, 76)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G, false)
.addComponent(a5, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(a4, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(a3, javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(a2, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
.addGap(146, 146, 146))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(169, Short.MAX_VALUE)
.addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE,
150, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jButton3, javax.swing.GroupLayout.PREFERRED_SIZE,
147, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(164, 164, 164))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addGap(119, 119, 119)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
.addComponent(jSeparator3,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 434, Short.MAX_VALUE)
223
.addComponent(jSeparator2,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 434, Short.MAX_VALUE)
.addGroup(layout.createSequentialGroup()
.addGap(46, 46, 46)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel9)
.addComponent(jLabel14)
.addComponent(jLabel10)
.addComponent(jLabel8)
.addComponent(jLabel6)
.addGroup(layout.createSequentialGroup()
.addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel12)
.addComponent(jLabel11))))
.addGap(76, 76, 76)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
224
.addComponent(a12,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.Alignment.LEADING, 0, 0, Short.MAX_VALUE)
.addComponent(a13,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 130, Short.MAX_VALUE))
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G, false)
.addComponent(a7,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(a6,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 121, Short.MAX_VALUE)
.addComponent(a9,
javax.swing.GroupLayout.Alignment.LEADING)))
.addGap(49, 49, 49))
.addComponent(a10,
javax.swing.GroupLayout.PREFERRED_SIZE, 112,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addComponent(jSeparator1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 434, Short.MAX_VALUE))
.addGap(95, 95, 95))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addContainerGap()
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
60, javax.swing.GroupLayout.PREFERRED_SIZE)
PAYROLL MANAGEMENT SYSTEM|
225
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel7)
.addComponent(jLabel2))
.addGap(10, 10, 10)
.addComponent(a1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(9, 9, 9)
.addComponent(jButton1)
.addGap(7, 7, 7)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel3)
.addComponent(a2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
PAYROLL MANAGEMENT SYSTEM|
226
.addComponent(jLabel13)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel4)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel5,
javax.swing.GroupLayout.PREFERRED_SIZE, 22,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addComponent(a3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(a4, javax.swing.GroupLayout.PREFERRED_SIZE,
20, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(a5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(15, 15, 15)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G)
PAYROLL MANAGEMENT SYSTEM|
227
.addComponent(jLabel14)
.addComponent(a6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(a7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel6))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(a9, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel9))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel10)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel8))
.addGroup(layout.createSequentialGroup()
228
.addComponent(a10, javax.swing.GroupLayout.PREFERRED_SIZE,
20, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(jScrollPane1,
javax.swing.GroupLayout.PREFERRED_SIZE, 62,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(a12,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11))))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(a13, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12,
javax.swing.GroupLayout.PREFERRED_SIZE, 20,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(9, 9, 9)
.addComponent(jSeparator3,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
PAYROLL MANAGEMENT SYSTEM|
229
.addComponent(jButton2)
.addComponent(jButton3))
.addContainerGap())
);
pack();
}// </editor-fold>
a2.setText(res.getString(2).trim());
PAYROLL MANAGEMENT SYSTEM|
230
a3.setText(res.getString(3).trim());
a4.setText(res.getString(4).trim());
a5.setText(res.getString(5).trim());
a6.setText(res.getString(6).trim());
a7.setText(res.getString(7).trim());
a9.setText(res.getString(8).trim());
a10.setText(res.getString(9).trim());
a11.setText(res.getString(10).trim());
a12.setText(res.getString(11).trim());
a13.setText(res.getString(12).trim());
a1.setText(res.getString(1).trim());
}
else
{
JOptionPane.showMessageDialog(null,"Id Not
Valid");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
PAYROLL MANAGEMENT SYSTEM|
231
this.setVisible(false);
// TODO add your handling code here:
}
232
233
eaShDmoxciFsTtrl
private javax.swing.JLabel jLabel7;
private javax.swing.JLabel jLabel8;
private javax.swing.JLabel jLabel9;
234
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* searchtax.java
PAYROLL MANAGEMENT SYSTEM|
235
*
* Created on Jun 10, 2012, 5:24:26 PM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class searchtax extends javax.swing.JInternalFrame {
236
237
jLabel1.setName("jLabel1"); // NOI18N
238
239
t3.setName("t3"); // NOI18N
240
jButton1ActionPerformed(evt);
}
});
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
241
242
.addGroup(layout.createSequentialGroup()
.addGap(103, 103, 103)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel3)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel6)
.addComponent(jLabel7)
.addComponent(jLabel8))
.addGap(40, 40, 40)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(t7)
.addComponent(t6)
.addComponent(t5)
.addComponent(t4)
.addComponent(t3)
.addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE,
102, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 107,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(layout.createSequentialGroup()
.addGap(190, 190, 190)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G, false)
243
.addComponent(jButton1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(t1, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 77,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 226,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(jButton3,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE)
.addComponent(jButton2,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 493, Short.MAX_VALUE)))
.addGap(75, 75, 75))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(30, 30, 30)
.addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE,
57, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jLabel2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(t1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
PAYROLL MANAGEMENT SYSTEM|
244
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton1)
.addGap(7, 7, 7)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel3)
.addComponent(t2, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel4)
.addComponent(t3, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel5)
.addGap(18, 18, 18)
.addComponent(jLabel6))
.addGroup(layout.createSequentialGroup()
PAYROLL MANAGEMENT SYSTEM|
245
.addComponent(t4, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(t5, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addGroup(layout.createSequentialGroup()
.addComponent(jLabel7)
.addGap(18, 18, 18)
.addComponent(jLabel8))
.addGroup(layout.createSequentialGroup()
.addComponent(t6, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(t7, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGap(13, 13, 13)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(8, 8, 8)
.addComponent(jButton2)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
246
.addComponent(jButton3)
.addGap(51, 51, 51))
);
pack();
}// </editor-fold>
this.setVisible(false);
// TODO add your handling code here:
}
String id=t1.getText().trim();
PAYROLL MANAGEMENT SYSTEM|
247
if(id.length()==0)
{
JOptionPane.showMessageDialog(null,"Enter Employee
Id");
}
try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps=con.prepareStatement("select *
from tax where id=?");
ps.setString(1,id);
ResultSet res=ps.executeQuery();
if(res.next())
{
t2.setText(res.getString(1).trim());
t3.setText(res.getString(2).trim());
t4.setText(res.getString(3).trim());
t5.setText(res.getString(4).trim());
t6.setText(res.getString(5).trim());
t7.setText(res.getString(6).trim());
t1.setText(res.getString(7).trim());
}
else
PAYROLL MANAGEMENT SYSTEM|
248
{
JOptionPane.showMessageDialog(null,"Id Not
Valid");
}
}
catch(Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
249
haCngePsdwomFr
private javax.swing.JSeparator jSeparator2;
private javax.swing.JTextField t1;
private javax.swing.JTextField t2;
private javax.swing.JTextField t3;
private javax.swing.JTextField t4;
private javax.swing.JTextField t5;
private javax.swing.JTextField t6;
private javax.swing.JTextField t7;
// End of variables declaration
250
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/*
* updatepass.java
PAYROLL MANAGEMENT SYSTEM|
251
*
* Created on Jun 6, 2012, 7:06:15 AM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class updatepass extends javax.swing.JFrame {
252
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
setTitle("PayRoll System");
253
254
jButton1.setText("Update");
jButton1.setName("jButton1"); // NOI18N
jButton1.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton1ActionPerformed(evt);
}
});
255
jButton3.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
jButton3ActionPerformed(evt);
}
});
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
256
257
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.
TRAILING)
.addComponent(s2, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 122,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(s1, javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.PREFERRED_SIZE, 122,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addContainerGap(112, Short.MAX_VALUE))
);
jPanel1Layout.setVerticalGroup(
jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(jPanel1Layout.createSequentialGroup()
.addGap(6, 6, 6)
.addComponent(jLabel5)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(jLabel1)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator1,
javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(7, 7, 7)
.addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.
BASELINE)
258
259
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
);
pack();
}// </editor-fold>
260
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con;
con=DriverManager.getConnection("jdbc:odbc:pay");
PreparedStatement ps=con.prepareStatement("update log set upass=?
where uname=?");
ps.setString(1,s2.getText().trim());
ps.setString(2,s1.getText().trim());
int i=ps.executeUpdate();
if(i>0) {
JOptionPane.showMessageDialog(null,"User Password Updated");
} else
{
JOptionPane.showMessageDialog(null,"User Not present Data Base");
}
} catch (Exception ex) {
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
261
/**
* @param args the command line arguments
*/
public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new updatepass().setVisible(true);
}
});
}
262
pdUateSryFoml
private javax.swing.JLabel jLabel3;
private javax.swing.JLabel jLabel5;
263
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
264
/*
* updatepay.java
*
* Created on Jun 10, 2012, 8:14:41 AM
*/
package rol;
import java.sql.*;
import javax.swing.JOptionPane;
import java.lang.String.*;
/**
*
* @author Shubham Barnwal
*/
public class updatepay extends javax.swing.JInternalFrame {
265
266
a6 = new javax.swing.JTextField();
jSeparator1 = new javax.swing.JSeparator();
jSeparator2 = new javax.swing.JSeparator();
jSeparator3 = new javax.swing.JSeparator();
jLabel1.setName("jLabel1"); // NOI18N
267
268
jLabel3.setText("Slip No.");
jLabel3.setName("jLabel3"); // NOI18N
269
270
271
jButton3ActionPerformed(evt);
}
});
jSeparator1.setName("jSeparator1"); // NOI18N
jSeparator2.setName("jSeparator2"); // NOI18N
272
jSeparator3.setName("jSeparator3"); // NOI18N
273
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel9)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G)
.addComponent(jLabel2,
javax.swing.GroupLayout.PREFERRED_SIZE, 159,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel3,
javax.swing.GroupLayout.PREFERRED_SIZE, 82,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel4)
.addComponent(jLabel5)
.addComponent(jLabel8))
.addGap(42, 42, 42))
.addComponent(jLabel11)
.addComponent(jLabel12)
.addComponent(jLabel10)
.addComponent(jLabel7))
.addGap(158, 158, 158)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADIN
G, false)
.addComponent(a10)
.addComponent(a9)
.addComponent(a8)
.addComponent(a7)
.addComponent(a6)
PAYROLL MANAGEMENT SYSTEM|
274
.addComponent(a5)
.addComponent(a4)
.addComponent(a3)
.addComponent(a2)
.addComponent(a1, javax.swing.GroupLayout.DEFAULT_SIZE, 114,
Short.MAX_VALUE))
.addContainerGap(104, Short.MAX_VALUE))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
layout.createSequentialGroup()
.addContainerGap(212, Short.MAX_VALUE)
.addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE,
317, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(198, 198, 198))
.addGroup(layout.createSequentialGroup()
.addGap(117, 117, 117)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILIN
G, false)
.addComponent(jSeparator3,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator2,
javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jSeparator1,
javax.swing.GroupLayout.Alignment.LEADING,
javax.swing.GroupLayout.DEFAULT_SIZE, 505, Short.MAX_VALUE))
.addContainerGap(105, Short.MAX_VALUE))
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
275
276
277
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(a8, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel11))
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(a9, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(jLabel12))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jSeparator2,
javax.swing.GroupLayout.PREFERRED_SIZE, 2,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
.addComponent(jButton4)
.addGap(13, 13, 13)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jLabel10)
.addComponent(a10, javax.swing.GroupLayout.PREFERRED_SIZE,
javax.swing.GroupLayout.DEFAULT_SIZE,
javax.swing.GroupLayout.PREFERRED_SIZE))
.addGap(3, 3, 3)
278
.addComponent(jSeparator3,
javax.swing.GroupLayout.PREFERRED_SIZE, 10,
javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELI
NE)
.addComponent(jButton3)
.addComponent(jButton1)
.addComponent(jButton2))
.addContainerGap(26, Short.MAX_VALUE))
);
pack();
}// </editor-fold>
279
ps.setString(1,a2.getText().trim());
ps.setString(2,a3.getText().trim());
ps.setString(3,a4.getText().trim());
ps.setString(4,a5.getText().trim());
ps.setString(5,a6.getText().trim());
ps.setString(6,a7.getText().trim());
ps.setString(7,a8.getText().trim());
ps.setString(8,a9.getText().trim());
ps.setString(9,a10.getText().trim());
ps.setString(10,a1.getText().trim());
int i=ps.executeUpdate();
if(i>0)
{
PAYROLL MANAGEMENT SYSTEM|
280
JOptionPane.showMessageDialog(null,"Pay
details UPdate");
}
else
{
JOptionPane.showMessageDialog(null,"Entet Valid
Employee id");
}
}
catch (Exception ex)
{
JOptionPane.showMessageDialog(null,ex.toString());
}
// TODO add your handling code here:
}
int d,h,s,sum;
String sal=a7.getText();
String da=a8.getText();
String hra=a9.getText();
d=Integer.parseInt(da);
h=Integer.parseInt(hra);
s=Integer.parseInt(sal);
sum=(d+h+s);
PAYROLL MANAGEMENT SYSTEM|
281
String str=String.valueOf(sum);
a10.setText(str);
// TODO add yourhandling code here:
}
282
283
TESING
}
284
CONLUSI
The aim of the problem is to identify all defects existing in a software product.
However, for the most practical system, ever after satisfactorily carrying out
the testing phase, IT is not possible to guarantee that the software is error
free. This is because of the fact that the input domain is very large, it is not
practical to test the software exhaustively with respect to each value that the
input data may assume even with this practical limitation of the testing
process, we should not underestimate the importance of testing . We must
remember that testing does expose many defects existing in a software
product. Therefore, we can safely conclude that the testing provides a
practical way of reducing defect in a system and increasing the users
confidence in a developed system.
285
UTFRENHACMS
Our Project can be extended we are unable to work more on this now because of
lack of time. We will work more on it after some time we can make it useful for
many other Regulation. We can add some sorting method in it. We also add some
other facilities which help in it. We also can add some other facilities which help
in formatting students enquiry. We can extend it for making records of marks etc.
If we done this work also in our project we can sell it in market even as a self
package.
ADVANTAGES
Very user-friendly
system by including more facilities like billing system,adding more than one
286
IBLOGRAPHY
distributors of same company,adding more handsets of other companies other than
added ones.
Providing such features enable the users to include more comments into the
system.
Database concept
BY HENRY KORTH & ABHRAHAM SIBERSCHATZ
287
Site Address
www.associatedcontent.com
www.members.tripod.com
http://www.jdbc-tutorial.com/
http://www.javaworld.com/javaworld/jw-01-1998/jw-01-bookreview.html
www.vbcodesource.com
PAYROLL MANAGEMENT SYSTEM|
288
289