100% found this document useful (1 vote)
3K views

Ip Project On Employee Payroll Management

Ip Project on Employee Payroll Management
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
3K views

Ip Project On Employee Payroll Management

Ip Project on Employee Payroll Management
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 62

N.V.K.S.

SENIOR SECONDARY SCHOOL


ATTOOR

INFORMATICS PRACTICES
A Project Report On
“EMPLOYEE PAYROLL SYSTEM”
‘For
AISSCE 2019-2020 Examination
[As a part of the Informatics Practices Course]

SUBMITTED BY:
S.M.SREE AADITHYAN
CLASS : XII-B
REG NO : _______________
CERTIFICATE

This is to certify that the project entitled “EMPLOYEE

PAYROLL SYSTEM” has been satisifactorily performed by

S.M.SREE AADITHYAN studying in N.V.K.S.SENIOR

SECONDARY school Attoor,of class XII-B(Bio-Informatics)

under the guidanance of Mrs.R.H.Dhanya during the academic

year 2019-2020

………………………… ……………………………..
Signature of Teacher/Guide Signature of external examiner

…….…………………
Signature of Principal

Date:……………..
ACKNOWLEDGEMENT

We undertook this Project work, as the part of my XII-

Informatics Practices course. We had tried to apply my best of


knowledge and experience, gained during the study and class
work experience. However, developing software system is
generally a quite complex and time-consuming process. It
requires a systematic study, insight vision and professional
approach during the design and development. Moreover, the
developer always feels the need, the help and good wishes of
the people near you, who have considerable experience and
idea.
My thanks list can never begin with you ,dear god.I
would like to express my special thanks and gratitude to my
guide teacher Mrs.R.H.Dhanya for her contribution in
stimulating , ideas and and encouragement to complete this
project. My sincere thanks goes to Mr.D.S.Prasobh
Madhavn,our principal for his contribution in extending every
possible support for the completion this project
I would like to express thanks to parents and friends
who helped us a lot in finishing this project with in the limited
time.
Index
1. Introduction

2. Existing System

3. proposed System

4. Software description

5. System specification

6. Database Design

7. Table Used

8. Front End Design

9. Source Code

10. Conclusion

11. Bibiliography
INTRODUCTION

The project titled “Payroll Management

System” is software for monitoring and controlling the

transaction for an Employee. This project is designed &

coded in Net Beans & database management is handled

by MYSQL. This software mainly focuses on basic

operations in a Bank like updating new information and

Pin, searching balance and getting transactions,The

report generation facility of helps to get a good idea of

which .

The software has four main modules:


1. Insertion of database module- user friendly
input screen
2. Extracting from database module- attractive
output screen
3. Report generation module-

4. Search facility system-


SYSTEM ANALYSIS

EXISTING SYSTEM:
In our existing system,all the transaction of books
are done manually, so taking more time for a transaction
like borrowing a book and also for searching of members
and books. Another major disadvantage is that preparing
the list of books borrowed and the available books in the
library will take more time,currently a one day process
for verifying all records. So after conducting the
feasibility study we decided to make a computerized
payroll.
PROPOSED SYSTEM:
Proposed system is an automated payroll system.
Through our software user can add members, search
members, know details, update delete information, edit
information in quick time. Our proposed system has the
following advantages.

 user friendly interface


 fast access to database
 less error
 more storage capacity
 search facility
 look and feel environment
 quick transaction
All the manual difficulties in managing payroll have been
rectified by implementing computerization.
SOFTWARE DESCRIPTION

What is Database?

Introduction and Concepts:

A database is a collection of information related to a


particular subject or purpose, such as tracking customer
orders or maintaining a music collection. Using any
RDBMS application software like MS SQL Server,
MySQL, Oracle, Sybase etc, you can manage all your
information from a single database file. Within the file,
divide your data into separate storage containers called
tables. You may and retrieve the data using queries.

A table is a collection of data about a specific


topic, such as products or suppliers. Using a separate
table for each topic means you can store that data only
once, which makes your database more efficient and
reduces data-entry errors. Table organises data into
columns (called fields) and rows (called records).

A Primary key is one or more fields whose


value or values uniquely identify each record in a table.
In a relationship, a primary key is used to refer to specific
record in one table from another table. A primary key is
called foreign key when it is referred to from another
table.

To find and retrieve just the data that meets conditions


you specify, including data from multiple tables, create a
query. A query can also update or delete multiple records
at the same time, and perform built-in or custom
calculations on your data.

Role of RDBMS Application Program:

A computer database works as a electronic


filing system, which has a large number of ways of cross-
referencing, and this allows the user many different ways
in which to re-organize and retrieve data. A database can
handle business inventory, accounting and filing and use
the information in its files to prepare summaries,
estimates and other reports. The management of data in a
database system is done by means of a general-purpose
software package called a Database Management System
(DBMS). Some commercially available DBMS are MS
SQL Server, MS ACCESS, INGRES, ORACLE, and
Sybase. A database management system, therefore, is a
combination of hardware and software that can be used to
set up and monitor a database, and can manage the
updating and retrieval of database that has been stored in
it. Most of the database management systems have the
following capabilities:
• Creating of a table, addition, deletion, modification
of records.
• Retrieving data collectively or selectively.
• The data stored can be sorted or indexed at the user's
discretion and direction.
• Various reports can be produced from the system.
These may be either standardized report or that may
be specifically generated according to specific user
definition.
• Mathematical functions can be performed and the
data stored in the database can be manipulated with
these functions to perform the desired calculations.
• To maintain data integrity and database use.

The DBMS interprets and processes users' requests to


retrieve information from a database. In most cases, a
query request will have to penetrate several layers of
software in the DBMS and operating system before the
physical database can be accessed. The DBMS responds
to a query by invoking the appropriate subprograms, each
of which performs its special function to interpret the
query, or to locate the desired data in the database and
present it in the desired order.

• What is My SQL ?

The management of data in a database system is done by


means of a general-purpose software package called a
Database Management System (DBMS). Some
commercially available RDBMS are MS SQL Server,
MS ACCESS, INGRES, ORACLE, and Sybase.

MySQL, the most popular Open Source SQL


database management system, is developed, distributed,
and supported by Oracle Corporation. MySQL is named
after co-founder Monty Widenius's daughter, My. The
name of the MySQL Dolphin (our logo) is “Sakila,”.

• MySQL is a database management system.

A database is a structured collection of data. It may


be anything from a simple shopping list to a picture
gallery or the vast amounts of information in a
corporate network. To add, access, and process data
stored in a computer database, you need a database
management system such as MySQL Server. Since
computers are very good at handling large amounts
of data, database management systems play a central
role in computing, as standalone utilities, or as parts
of other applications.

• MySQL is based on SQL.

A relational database stores data in separate tables rather


than putting all the data in one big storeroom. This adds
speed and flexibility. The SQL part of “MySQL” stands
for “Structured Query Language.” SQL is the most
common standardized language used to access databases
and is defined by the ANSI/ISO SQL Standard. The SQL
standard has been evolving since 1986 and several
versions exist. In this manual, “SQL-92” refers to the
standard released in 1992, “SQL:1999” refers to the
standard released in 1999, and “SQL:2003” refers to the
current version of the standard.

• MySQL software is Open Source.

Open Source means that it is possible for anyone to


use and modify the software. Anybody can download
the MySQL software from the Internet and use it
without paying anything. If you wish, you may study
the source code and change it to suit your needs. The
MySQL software uses the GPL (GNU General
Public License),

• The MySQL Database Server is very fast, reliable,


and easy to use.

If that is what you are looking for, you should give it a


try. MySQL Server also has a practical set of features
developed in close cooperation with our users. You can
find a performance comparison of MySQL Server with
other database managers on our benchmark page.
MySQL Server was originally developed to handle large
databases much faster than existing solutions and has
been successfully used in highly demanding production
environments for several years. Although under constant
development, MySQL Server today offers a rich and
useful set of functions. Its connectivity, speed, and
security make MySQL Server highly suited for accessing
databases on the Internet.

• MySQL Server works in client/server or embedded


systems.
The MySQL Database Software is a client/server system
that consists of a multi-threaded SQL server that supports
different backends, several different client programs and
libraries, administrative tools, and a wide range of
application programming interfaces (APIs).
The Main Features of MySQL
• Written in C and C++.
• Works on many different platforms.
• Uses multi-layered server design with independent
modules.
• Provides transactional and nontransactional storage
engines.
• Uses a very fast thread-based memory allocation
system.
• Executes very fast joins using an optimized nested-
loop join.
• Implements SQL functions using a highly optimized
class library that should be as fast as possible. Usually
there is no memory allocation at all after query
initialization.
• Provides the server as a separate program for use in a
client/server networked environment, and as a library
that can be embedded (linked) into standalone
applications. Such applications can be used in
isolation or in environments where no network is
available.
• Password security by encryption of all password
traffic when you connect to a server.
• Support for large databases. We use MySQL Server
with databases that contain 50 million records. We
also know of users who use MySQL Server with
200,000 tables and about 5,000,000,000 rows.
• MySQL client programs can be written in many
languages. A client library written in C is available
for clients written in C or C++, or for any language
that provides C bindings.
• APIs for C, C++, Eiffel, Java, Perl, PHP, Python,
Ruby, and Tcl are available, enabling MySQL clients
to be written in many languages.
• The Connector/ODBC (MyODBC) interface
provides MySQL support for client programs that
use ODBC (Open Database Connectivity)
connections.
• The Connector/J interface provides MySQL support
for Java client programs that use JDBC connections.
Clients can be run on Windows or Unix. Connector/J
source is available.

What is NetBeans IDE ?


NetBeans started as a student project (originally called
Xelfi) in the Czech Republic in 1996. The goal was to
write a Delphi-like Java IDE in Java. Xelfi was the first
Java IDE (Integrated Development Environment) written
in Java, with its first pre-releases in 1997. Xelfi was a fun
project to work on, especially since Java IDE space was
uncharted territory at that time. The project attracted
enough interest that these students, once they graduated,
decided that they could market it as a commercial
product. Soliciting resources from friends and relatives
for a web space, they formed a company around it.
Soon after, they were contacted by Roman Stanek, an
entrepreneur who had already been involved in several
startups in the Czech Republic. He was looking for a
good idea to invest in, and discovered Xelfi. He met with
the founders; they hit it off, and a business was born.
In the spring of 1999, NetBeans DeveloperX2 was
released, supporting Swing. The performance
improvements that came in JDK 1.3, released in the fall
of 1999, made NetBeans a viable choice for development
tools. By the summer of 1999, the team was hard at work
re-architecting DeveloperX2 into the more modular
NetBeans that forms the basis of the software today.
Something else was afoot in the summer of 1999: Sun
Microsystems wanted better Java development tools, and
had become interested in NetBeans. It was a dream come
true for the NetBeans team: NetBeans would become the
flagship tool set of the maker of Java itself! By the Fall,
with the next generation of NetBeans Developer in beta, a
deal was struck. Sun Microsystems had also acquired
another tools company, During the acqusition, the young
developers who had been involved in open-source
projects for most of their programming careers,
mentioned the idea of open-sourcing NetBeans. Fast
forward to less than six months later, the decision was
made that NetBeans would be open sourced. While Sun
had contributed considerable amounts of code to open
source projects over the years, this was Sun's first
sponsored open source project, one in which Sun would
be paying for the site and handling the infrastructure.

Features of NetBeans
A free,open-source Integrated Development Environment
for software developers. You get all the tools you need to
create professional desktop, enterprise, web, and mobile
applications with the Java platform, as well as C/C++,
PHP, JavaScript, Groovy, and Ruby.
NetBeans IDE 6.9 introduces the JavaFX Composer,
support for JavaFX SDK 1.3, OSGi interoperability,
support for the PHP Zend framework and Ruby on Rails
3.0, and more.
SYSTEM SPECIFICATION

MINIMUM HARDWARE REQUIREMENTS


o PROCESSOR:Pentium IV or better
o RAM:512 MB or more
o HARD DISK:100 GB
o MONITOR:Any
o KEY BOARD:122 keys

MINIMUM SOFTWARE REQUIREMENTS


o OPERATING
SYSTEM:WindowsXP,Windows 7 and
above
o LANGUAGE:Java 7 Runtime
Environment or better
o FRONT END:Netbeans 7.3.1 or above
o BACK END:MySQL server 5.0 or above
DATABASE DESIGN
The general theme behind a database is to handle
information as an integrated whole. A database is a
collection of interrelated data stored with minimum
redundancy to serve many users quickly and effectively.
After designing input and output, the analyst must
concentrate on databse design or how data should be
organized around user requirements. The general
objective is to make information access, easy quick,
inexpensive and flexible for other users. During
database design the following objectives are concerned:-
a. Controlled Redundancy
b. Data independence
c. Accurate and Integrating
d. More information at low cost
e. Recovery from failure
f. Privacy and security
g. Performance
h. Ease of learning and use
TABLES USED
FRONT END DESIGN

LOGIN
MENU
SEARCH
UPDATE
DEDUCTION
PAYMENTS
ADD NEW EMPLOYEE
DELETE ANEMPLOYEE
SOURCE CODE

LOGIN
package payroll;
importpayroll.Menu;
importpayroll.Search;
importjava.sql.Connection;
importjava.sql.DriverManager;
importjava.sql.ResultSet;
importjava.sql.Statement;
importjavax.swing.JOptionPan
e;

public class Login extends javax.swing.JFrame {

Connection con = null;


Statement stmt = null;
ResultSetrs = null;
String str = "jdbc:mysql://localhost:3306/payroll";

public Login() {
initComponents
();

}
private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
System.exit(0);
private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
String us = name.getText();
String ps = pass.getText();
if (us.isEmpty()) {
JOptionPane.showMessageDialog(this, "please
enter username");
}
if (ps.isEmpty()) {
JOptionPane.showMessageDialog(this, "please
enter password");
} else {
try {
Class.forName("java.sql.DriverManager")
;
con = (Connection) DriverManager.getConnection(str,
"root", "rsrs");
stmt = (Statement) con.createStatement();
String query = "select name,password from
details where name='" + us + "'and password='" + ps
+ "'";
rs = stmt.executeQuery(query);

if (rs.next()) {
String username = rs.getString("name");
String pass = rs.getString("password");
us =name.getText();
new Menu().setVisible(true);

} else {
JOptionPane.showMessageDialog(this,
"incorrect username or password");
name.setText("");
pass.setText("");
}
} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
newAddnew().setVisible(true);
}

MENU
package payroll;
import java.sql.*;
importjavax.swing.JOptionPan
e;
public class Menu extends javax.swing.JFrame {
Connection con =
null; Statement stmt
= null;
ResultSetrs =
null; public
Menu() {
initComponents
();
}

Menu(Login aThis) {
throw new UnsupportedOperationException("Not
yet implemented");
}

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
new Search ().setVisible(true);
dispose();
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
int a=JOptionPane.showConfirmDialog(this,"Do you
want to delete the logined employee?");
if(a==JOptionPane.YES_OPTION)
{
new Delete
().setVisible(true);
dispose();
}
}

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt
){
new Login ().setVisible(true);
dispose();
}

private void
jButton4ActionPerformed(java.awt.event.ActionEvente
vt
){
System.exit(0);
}

SEARCH
package payroll;

importjava.sql.DriverManager;
importjavax.swing.JOptionPan
e; importjava.sql.Connection;
importjava.sql.ResultSet;
importjava.sql.Statement;
import static
payroll.Update.Uid; import
static payroll.Login.name;
public class Search extends javax.swing.JFrame {

Connection con =
null; Statement stmt
= null;
ResultSetrs = null;

public Search()
{
initComponents
();

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
String n = name.getText();
{
try {

Class.forName("java.sql.DriverManager");

Connection co = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost
:3 306/payroll", "root", "rsrs");

Statement st =
(Statement) co.createStatement();

String query = "select


id,name,gender,contact,desig,basicsal from
details where name='" + n + "'";

rs =
st.executeQuery(query); if
(rs.next()) {
int id = rs.getInt("id");
Sid.setText("" + id);
String na = rs.getString("name");
Sname.setText(na);
String g =
rs.getString("gender"); Sgen.setText(g);
int c = rs.getInt("contact");
Scontact.setText("" + c);
String Desc = rs.getString("desig");
Sdesig.setText(Desc);

double s = rs.getDouble("basicsal");
Ssal.setText("" + s);

}
rs.close(
);
st.close(
);
co.close
();

} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
Sid.setText("");
Sname.setText("");
Sgen.setText("");
Scontact.setText("
");
Sdesig.setText("");
Ssal.setText("");
}

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt
){
new Update
().setVisible(true);
String id=Sid.getText();
Uid.setText(id);
dispose();
}

UPDATE
package payroll;
import static
payroll.Detection.Dcs; import
java.sql.*;
importjavax.swing.JOptionPane;
import static
payroll.Detection.Dcs; import
static payroll.Detection.Dpf;
import static
payroll.Detection.dtax;

public class Update extends javax.swing.JFrame {


Connection con =
null; Statement stmt
= null;
ResultSetrs = null;

public Update()
{
initComponents
();
}

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
String n = "";
n = Uid.getText();

{
try {

Class.forName("java.sql.DriverManager");

Connection co = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost
:3 306/payroll", "root", "rsrs");

Statement st =
(Statement) co.createStatement();
String query = "select id,name,desig,basicsal
from details where id ='" + n + "'";

rs =
st.executeQuery(query); if
(rs.next()) {
int id = rs.getInt("id");
Uid.setText("" + id);
String na = rs.getString("name");
Uname.setText(na);
String Desc = rs.getString("desig");
Udesig.setText(Desc);

double s = rs.getDouble("basicsal");
Ucs.setText("" + s);

}
rs.close(
);
st.close(
);
co.close
();

} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
if (Uus.getText().isEmpty()) {
JOptionPane.showMessageDialog(this, " Please
Enter Perncentage...");
return;
}
double s = Double.parseDouble(Ucs.getText());
double p = Double.parseDouble(Uus.getText());

this.setVisible(false);
new Detection().setVisible(true);
double Net = s + (s * p / 100);
Dcs.setText("" + Net);
}
}

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt
){
Uid.setText("");
Uname.setText("");
Udesig.setText("");
Ucs.setText("");
Uus.setText("");
}

ADD NEW EMPLOYEE


package payroll;

import java.sql.*;
importjavax.swing.JOptionPan
e;

public class Addnew extends javax.swing.JFrame {

Connection con = null;


Statement stmt = null;
ResultSetrs = null;

publicAddnew() {
initComponents();
Abasicsal.setText("10000");
}

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
int a = JOptionPane.showConfirmDialog(null,
"Want to Save Employee Details For Sure ?");
if(a=JOptionPane.YES_OPTION
) { try {
String i,n,p,d,g,c;
int b;
i = Aid.getText();
n=
Aname.getText();
p=Apass.getText()
;
d=Adesig.getText(
); g
=Agen.getText();
c =Acontact.getText();
b =Integer.parseInt(Abasicsal.getText());
String uid = "root";
String pwd = "rsrs";
String url =
"jdbc:mysql://localhost:3306/payroll";

con = DriverManager.getConnection(url, uid,


pwd); stmt = con.createStatement();

String qry = "INSERT INTO DETAILS


VALUES('" +i
+"','" +n +"','" +p +"','" +d +"','" +c +"','" +b +"','" +g
+"')";
stmt.executeUpdate(qry);
JOptionPane.showMessageDialog(null, "Employee
Details Saved Sucessfully.");

stmt.close();
con.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
Aid.setText("");
Aname.setText("");
Apass.setText("");
Adesig.setText("");
Agen.setText("");
Acontact.setText("");
Abasicsal.setText("");
}
private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt
){
new Login().setVisible(true);
}

DELETE AN EMPLOYEE
package payroll;

import java.sql.*;
importjavax.swing.JOptionPan
e; import static
payroll.Login.name;
public class Delete extends javax.swing.JFrame {

Connection con =
null; Statement stmt
= null;
ResultSetrs = null;

public Delete()
{
initComponents
();
}

private void
jButton1ActionPerformed(java.awt.event.ActionEvente
vt
){
String
na=name.getText(); try {

Class.forName("java.sql.DriverManager");

Connection co = (Connection)
DriverManager.getConnection("jdbc:mysql://localhost:3
306/payroll", "root", "rsrs");

Statement st =
(Statement) co.createStatement();

String query = "select


id,name,password,desig,gender,contact,basicsal from
details where name='" +na+ "'";

rs =
st.executeQuery(query); if
(rs.next()) {
int id =
rs.getInt("id");
Did.setText("" + id);
String n = rs.getString("name");
Dname.setText(n);
String p = rs.getString("password");
Dpass.setText(p);
String Desc = rs.getString("desig");
Ddesig.setText(Desc);
String g =
rs.getString("gender"); Dgen.setText(g);
int c = rs.getInt("contact");
Dcontact.setText("" + c);

double s = rs.getDouble("basicsal");
Dsal.setText("" + s);

}
rs.close(
);
st.close(
);
co.close
();

} catch (Exception e) {
JOptionPane.showMessageDialog(this, e.getMessage());
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
String Name=name.getText();
String Id=Did.getText();
try {

String uid =
"root"; String
pwd = "rsrs";
String url =
"jdbc:mysql://localhost:3306/payroll";

con = DriverManager.getConnection(url, uid,


pwd); stmt = con.createStatement();

String qry = " delete from DETAILS where


name='"+Name+"';";
String Qry = " delete from salary where
id='"+Id+"';";

stmt.executeUpdate(qry
);
stmt.executeUpdate(Qry
);

JOptionPane.showMessageDialog(null, "Employee
Details Deleted Sucessfully.");

stmt.close();
con.close();
} catch (Exception e) {
JOptionPane.showMessageDialog(null, e.getMessage());
}

Did.setText("");
Dname.setText("");
Dsal.setText("");
Ddesig.setText("");
Dcontact.setText("");
Dgen.setText("");
Dpass.setText("");
}

private void
jButton3ActionPerformed(java.awt.event.ActionEvente
vt
){
System.exit(0);
}

DETECTION
package payroll;

import static payroll.Update.Udesig;


import static payroll.Update.Uid;
import static
payroll.Update.Uname; import
static payroll.Payment.Pfs;
importjavax.swing.JOptionPane;

public class Detection extends

javax.swing.JFrame { public Detection() {


initComponents();
try {
Dpf.setText("1000
");
dtax.setText("2");
Did.setText(Uid.getText());
Dname.setText(Uname.getText());
Ddesig.setText(Udesig.getText());

} catch (Exception E) {
JOptionPane.showMessageDialog(null, E.getMessage());

}
Did.setEditable(false);
Dname.setEditable(false);
Ddesig.setEditable(false);
Dcs.setEditable(false);
Dpf.setEditable(false);
dtax.setEditable(false);
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
double Ns1 = Double.parseDouble(Dcs.getText());
double pf2 = Double.parseDouble(Dpf.getText());
double tax3 = Double.parseDouble(dtax.getText());

double d = pf2 + ((tax3 / 100) *

Ns1); double Ts = Ns1 - d;

new Payment().setVisible(true);

Pfs.setText("" + Ts);
System.out.println("" +
Ts); dispose();
}
PAYMENTS

package payroll;

import static
payroll.Update.Udesig; import
static payroll.Update.Uid; import
static payroll.Update.Uname;
import static payroll.Update.Ucs;
importjava.sql.Connection;
importjava.sql.DriverManager;
importjava.sql.Statement;
importjavax.swing.JOptionPane;

public class Payment extends javax.swing.JFrame {

Connection con = null;


Statement stmt = null;
String str = "jdbc:mysql://localhost:3306/Payroll";

public
Payment() {
initComponents
(); try {

Pid.setText(Uid.getText());
Pname.setText(Uname.getText());
Pdesig.setText(Udesig.getText());

} catch (Exception E) {
JOptionPane.showMessageDialog(null, E.getMessage());

}
Pid.setEditable(false);
Pname.setEditable(false);
Pdesig.setEditable(false);
Pfs.setEditable(false);
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
try{
String Id=Pid.getText();
String
Bs=Ucs.getText();
String Fs=Pfs.getText();

Class.forName("java.sql.DriverManager");
con=(Connection)
DriverManager.getConnection(str,"root","rsrs");
stmt=(Statement) con.createStatement();

stmt.executeUpdate("Insert into
Salary
values('"+Id+"','"+Bs+"','"+Fs+"');");
String Up="Update details set
BasicSal='"+Fs+"' where id='"+Id+"' ;";
stmt.executeUpdate(Up);

JOptionPane.showMessageDialog(this," Your
Payment is Successful...");

}
catch(Exception e){
JOptionPane.showMessageDialog(this,
e.getMessage());
}
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){

this.setVisible(false);
new Exit().setVisible(true);
}
EXIT
package payroll;
importjavax.swing.JOptionPane;
public class Exit extends
javax.swing.JFrame { public Exit() {
initComponents();
}

private void
jButton2ActionPerformed(java.awt.event.ActionEvente
vt
){
JOptionPane.showMessageDialog(this,"thank you
visit again");
System.exit(0);
}
Conclusion

This project help me to understand the payment

methods used to transfer Salary to their employee in

easy way.This is a simple application of transferring the

employee salary to them.There are lots of complicated

methods.I hope this simple program will fulfill your

basic requirements.I hope you like this.


BIBILIOGRAPHY

In order to work on this project titled Employee Payroll

System , the following order of spots material are refered by

me during the various phases of development of the project.

(1) The Complete Reference Java 2.0


My SQL, Black Book
(2) Understanding SQL

(3) http://www.mysql.org/

(4) http://www.netbeans.org/

(5) On-line Help of Net Beans ®

(6) Informatics Practices for class XIIB

(7) Together with Informatics Practices

Other than the above-mentioned books, the suggestions and


supervision of my teacher and my class experience also helped
me to develop this software project.

You might also like