Академический Документы
Профессиональный Документы
Культура Документы
ON
EMPLOYEE PORTAL
SUBMITTED BY:
ANIRUDH AGGARWAL
UE123014
CSE (1), 5th Semester
UIET
ACKNOWLEDGEMENT
Any accomplishment requires the effort of many people & this
work is no different.
I express my Gratitude to Talent Edge for her help, guidance
throughout the work for this project without which I would not
have been able to complete this project to such a success.
I would also like to thank my class mates who helped me directly
or indirectly in accomplishing this work. Finally, I would also like to
thank other faculty members who provided me with Moral support
during the course of this project.
To acknowledge all the persons who had helped for the fulfillment
of the project is not possible for any engineering student.
I would like to give my special thanks to the college UIET, Panjab
University for giving me a chance to do the project based summer
training, from the depth of my heart.
Rest all those people who helped me are not only matter of
acknowledgement but also authorized for sharing the credit.
-ANIRUDH AGGARWAL
ABSTRACT
The following report has been made in accordance with the 6
weeks training to be done by a student doing B.E. in UIET after
the completion of 2nd year during the summer holidays.
Employee Management System is a distributed
application, developed to maintain the details of employees
working in any organization. It maintains the information about
the personal details of their employees, also the details about the
salary and attendance. The application is actually a suite of
applications developed using Java.
It is simple to understand and can be used by anyone who is
not even familiar with simple employees system. It is user friendly
and just asks the user to follow step by step operations by giving
him few options. It is fast and can perform many operations of a
company.
This software package has been developed using the powerful
coding tools of JAVA and HTML at Front End and Oracle Server at
Back End. The software is very user friendly. The package
contains different modules like Employee info. This version of the
software has multi-user approach. For further enhancement or
development of the package, users feedback will be considered.
OBJECTIVES
During the past several decades personnel function has been
transformed from a relatively obscure record keeping staff to
central and top level management function.
There are many factors that have influenced this transformation
like technological advances, professionalism, and general
recognition of human beings as most important resources.
A computer based management system is designed to handle
all the primary information required to manage employee details.
Separate database is maintained to handle all the details required
for the correct salary and attendance generation.
This project intends to introduce more user friendliness in the
various activities such as record updating.
The entire information has maintained in the database or Files
and whoever wants to retrieve cant retrieve, only authorization
user can retrieve the necessary information which can be easily
be accessible from the file. Hence allows for separate
authorization of administrator and employee level users.
The main objective of the entire activity is to automate the
process of day to day activities of a company like:
1.
2.
3.
4.
5.
6.
SOFTWARE REQUIREMENT
SPECIFICATION (SRS)
The aim of the system is to develop EMPLOYEE MANAGEMENT
SYSTEM software, which should automate the process to create
and store employee details . The system is supposed to be used
as a subsystem in a large office system, which could be manual
system or a computerized one. Therefore, the proposed system
must be able to function under both circumstances.
The proposed system is not a freeware and due to the usage of
swings, becomes user interactive.
The project demand a page of employee details that include:
Employees personal detail.
Employees salary, designation.
MEMORY SPACE
Minimum
Recommended HDD -
32 MB
64 MB
Dual/Quad
core,
2.5GHZ or above
RAM -
4GB or above
VIDEO
KEYBOARD
Standard
104
Keys(QWERTY)
DEVELOPING LANGUAGE
DATABASE
Windows 7
-
JAVA (jdk-7)
ORACLE
10G
EXPRESS
EDITION
DEVELOPING ENVIRONMENT
WEBPAGE DEVELOPMENT -
HTML
JAVA
Java was conceived by James Gosling, Patrick Naughton, Chris
Warth , Ed Frank ,and Mike Sheridan at Sun Microsystems, Inc. in
1991.It took 18 months to develop the first working version. This
language was initially called Oak but was renamed Java in
1995.
Java has become the language of choice for implementing
Internet-based applications and software for devices that
communicate over a network.
The key that allows Java to solve both the security and the
portability is BYTECODE. It is a highly optimized set of instructions
Take a minute right now to observe the real-world objects that are
in your immediate area. For each object that you see, ask yourself
two questions: "What possible states can this object be in?" and
"What possible behavior can this object perform?". Make sure to
write down your observations. As you do, you'll notice that realworld objects vary in complexity; your desktop lamp may have
only two possible states (on and off) and two possible behaviors
(turn on, turn off), but your desktop radio might have additional
states (on, off, current volume, current station) and behavior (turn
on, turn off, increase volume, decrease volume, seek, scan, and
tune). You may also notice that some objects, in turn, will also
contain other objects. These real-world observations all translate
into the world of object-oriented programming.
Software objects are conceptually similar to real-world objects:
they too consist of state and related behavior. An object stores its
state in fields (variables in some programming languages) and
exposes its behavior through methods (functions in some
programming languages). Methods operate on an object's internal
state and serve as the primary mechanism for object-to-object
communication. Hiding internal state and requiring all interaction
to be performed through an object's methods is known as data
encapsulation a fundamental principle of object-oriented
programming.
By attributing state (current speed, current pedal cadence, and
current gear) and providing methods for changing that state, the
object remains in control of how the outside world is allowed to
use it. For example, if the bicycle only has 6 gears, a method to
change gears could reject any value that is less than 1 or greater
than 6.
Bundling code into individual software objects provides a number
of benefits, including:
1. Modularity: The source code for an object can be written
and maintained independently of the source code for other
Interface
As you've already learned, objects define their interaction
with the outside world through the methods that they expose.
Methods form the object's interface with the outside world; the
buttons on the front of your television set, for example, are the
interface between you and the electrical wiring on the other side
of its plastic casing. You press the "power" button to turn the
television on and off.
In its most common form, an interface is a group of related
methods with empty bodies. A bicycle's behavior, if specified as
an interface, might appear as follows:
Implementing an interface allows a class to become more
formal about the behavior it promises to provide. Interfaces form
a contract between the class and the outside world, and this
contract is enforced at build time by the compiler. If your class
claims to implement an interface, all methods defined by that
interface must appear in its source code before the class will
successfully compile.
Package
A package is a namespace that organizes a set of related
classes and interfaces. Conceptually you can think of packages as
being similar to different folders on your computer. You might
keep HTML pages in one folder, images in another, and scripts or
applications in yet another. Because software written in the Java
programming language can be composed of hundreds or
thousands of individual classes, it makes sense to keep things
organized by placing related classes and interfaces into packages.
FORMS LAYOUT
Package logic.
Class Summary
addemp
updateinfo
viewdb
salary
attends
Database Design:
Codes:
addemp:
package logic;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import pp.Emp;
String dob=request.getParameter("t4");
String address=request.getParameter("t5");
String city=request.getParameter("t6");
String state=request.getParameter("t7");
String contact=request.getParameter("t8");
long lg=Long.parseLong(contact);
String mail=request.getParameter("t10");
try {
SessionFactory fact= new
Configuration().configure().buildSessionFactory();
Session session=fact.openSession();
Transaction tr=session.beginTransaction();
Emp em=new Emp();
em.setEmpid(eid);
em.setAddress(address);
em.setCity(city);
em.setContact(lg);
em.setDob(dob);
em.setEmail(mail);
em.setJoindate(join);
em.setName(nm);
em.setPassword(ps);
em.setState(state);
session.save(em);
tr.commit();
HttpSession ht=request.getSession();
ht.setAttribute("emid", eid);
response.sendRedirect("salary.jsp");
}finally {
out.close();
}
}
Update info:
package logic;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import pp.Emp;
String nm=request.getParameter("t2");
String ps=request.getParameter("t9");
String join=request.getParameter("t3");
System.out.println("======================anirudh=====");
String dob=request.getParameter("t5");
String address=request.getParameter("t6");
String city=request.getParameter("t7");
String state=request.getParameter("t8");
String contact=request.getParameter("t10");
long lg=Long.parseLong(contact);
String mail=request.getParameter("t11");
try {
SessionFactory fact= new
Configuration().configure().buildSessionFactory();
Session session=fact.openSession();
Transaction tr=session.beginTransaction();
Emp em;
em=(pp.Emp) session.get(pp.Emp.class,un);
System.out.println("=========================anirudh
updates====");
em.setEmpid(un);
em.setAddress(address);
em.setCity(city);
em.setContact(lg);
em.setDob(dob);
em.setEmail(mail);
em.setJoindate(join);
em.setName(nm);
em.setPassword(ps);
em.setState(state);
session.save(em);
tr.commit();
response.sendRedirect("Update Employee.jsp");
}finally {
out.close();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click
on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
salary:
package logic;
import java.io.IOException;
import java.io.PrintWriter;
import java.math.BigDecimal;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import pp.Emp;
import pp.Salary;
String eid=request.getParameter("t1");
System.out.println("====================anirudh");
String nm=request.getParameter("t2");
System.out.println("====================shivam=====");
String des=request.getParameter("t3");
String salar=request.getParameter("t4");
System.out.println("================="+salar);
Integer sals=Integer.parseInt(salar);
System.out.println("==================="+sals);
try {
System.out.println("=============enter in
try==========");
SessionFactory fact= new
Configuration().configure().buildSessionFactory();
Session session=fact.openSession();
Transaction tr=session.beginTransaction();
System.out.println("======================"+tr);
Salary sal=new Salary();
sal.setEmpid(eid);
sal.setName(nm);
sal.setDesignation(des);
sal.setSalary(sals);
session.save(sal);
tr.commit();
response.sendRedirect("admn area.jsp");
}
catch(Exception e)
{
e.printStackTrace();
}
finally {
out.close();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click
on the + sign on the left to edit the code.">
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
Attends:
package logic;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Calendar;
import java.util.GregorianCalendar;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
import pp.Attends;
public class attends extends HttpServlet {
protected void processRequest(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
HttpSession ht=request.getSession();
String un=(String)ht.getAttribute("emids");
//Long numid= Long.parseLong(un);
System.out.println("u r on profile
page...=========================
Calendar cal = new GregorianCalendar();
int dd = cal.get(Calendar.DATE);
int mon = cal.get(Calendar.MONTH)+1;
"+un);
int yy = cal.get(Calendar.YEAR);
String dat = dd + "-" + mon + "-" + yy;
int hh = cal.get(Calendar.HOUR);
System.out.println("=================="+hh);
int mm = cal.get(Calendar.MINUTE);
String tim = hh + "." + mm ;
System.out.println("==============="+tim);
try {
SessionFactory fact= new
Configuration().configure().buildSessionFactory();
Session sess=fact.openSession();
Transaction tr=sess.beginTransaction();
Attends at=new Attends();
System.out.println("=================== "+at);
at.setEmpid(un);
at.setAdate(dat);
at.setTimein(tim);
sess.save(at);
tr.commit();
sess.close();
//System.out.println("=================================
== "+no);
response.sendRedirect("Attendance week.jsp");
}
catch(Exception ee)
{
ee.printStackTrace();
}
}
// <editor-fold defaultstate="collapsed" desc="HttpServlet methods. Click
on the + sign on the left to edit the code.">
protected void doGet(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException {
processRequest(request, response);
}
@Override
public String getServletInfo() {
return "Short description";
}// </editor-fold>
}
Login:
package logic;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.cfg.Configuration;
public class emplogin extends HttpServlet
{
public void service(HttpServletRequest request, HttpServletResponse
response)
throws ServletException, IOException
{
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();
String id=request.getParameter("t1");
String pass=request.getParameter("t2");
System.out.println("======================="+id);
System.out.println("==============================="+pa
ss);
try
{
SessionFactory fact= new
Configuration().configure().buildSessionFactory();
Session session=fact.openSession();
Transaction tr=session.beginTransaction();
pp.Emp em;
em=(pp.Emp) session.get(pp.Emp.class,id);
System.out.println("=====hhhhhiiiiiiiiiiii========="+em);
String ids=em.getEmpid();
System.out.println("============="+ids);
String ps=em.getPassword();
System.out.println("============="+ps);
if((id.equals(ids))&&(pass.equals(ps)))
{
HttpSession ht=request.getSession();
ht.setAttribute("emid", id);
response.sendRedirect("EMP AREA.jsp");
}
else
{
response.sendRedirect("sorryemp.jsp");
}
}
finally {
out.close();
}
}
}
SCREENSHOTS
CONCLUSION
Since this project has been designed exclusively as a project,
many complexities that can be faced by any real life manual
problem like total no. of employee, address redundancy, updating
problem etc. are considered in this project. Errors are bound to
occur as project has not undergone any rigorous testing. But any
enhancement to the project can easily be made without changing
the current design and programming structure.