0% found this document useful (0 votes)
7 views20 pages

Employee Management System Project

The document outlines a project for an employment system that manages employee records, including adding, searching, editing, and deleting employees, as well as generating pay slips. It includes acknowledgments to contributors and a detailed description of the functionalities provided by the system. The project is implemented using Python and MySQL for database management, with a user interface for interaction.

Uploaded by

kaizenith001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views20 pages

Employee Management System Project

The document outlines a project for an employment system that manages employee records, including adding, searching, editing, and deleting employees, as well as generating pay slips. It includes acknowledgments to contributors and a detailed description of the functionalities provided by the system. The project is implemented using Python and MySQL for database management, with a user interface for interaction.

Uploaded by

kaizenith001
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

INDEX

SL NO TITLE
ACKNOWLEDGEMENT
1
INTRODUCTION
2
PROJECT CODE
3
OUTPUT
4
BIBLIOGRAPHY
5
ACKNOWLEDGEMENT
MY SINCERE GRATITUDE TOWARDS OUR PRINCIPAL MRS PREETHI
CHAND FOR PROVIDING US ALL THE NECESSARY REQUIREMENTS.

I WOULD ALSO LIKE TO EXPRESS A DEEP SENSE OF GRATITUDE TO


MY COMPUTER SCIENCE TEACHER MRS BEEJAL NILESH FOR HER
CONSTANT SUPPORT AND GUIDANCE THROUGHT THE MAKING OF
THIS PROJECT. HER ADVICE AND MOTIVATION HAS HELPED ME A
LOT IN SUCCESFULLY COMPLETING THIS PROJECT.

I WOULD ALSO LIKE TO THANK MY TEAMMATES [Link] AND


REEYAN LAWRENCE TJOS FOR THEIR SUPPORT AND CO-
ORDINATION.
INTRODUCTION
This project is made to design employment system that
accepts a4ributes, shows an employee list, adds a new
employee, search for an employee, edit the details of an
employee, delete an employee details, genera:ng a pay slip,
provide details for contac:ng us, and an exit command.
§ The inser:on menu is used to accept and create a new
record onto the table with values provided by user.
§ “Show employee” list helps to show the number of
employees
§ “Add new employee” helps to add a new employee to
the table
§ “Search employee” helps to search any employee from
the table.
§ “Edit employee” helps to edit any details of that
employee.
§ “Delete employee” helps to delete any employee from
table.
§ “Generate Pay Slip” helps to generate pay slip of the
employee from the table.
§ “Contact us” will get you the details to contact the
administrator
§ “Exit” helps you end the program.
PROJECT
INPUT:
import [Link] as mycon
cn = [Link](host='localhost', user='root', password="123",
database="company")
cur = [Link]()
def showAll():
global cn
global cur
try:
query = "select * from emp;"
[Link](query)
results = [Link]()
print('%5s' % "eno", '%15s' % 'EMPNAME', '%12s' % 'dp', '%10s' % 'sl')
print("*********************************************")
count = 0
for row in results:
print('%5s' % row[0], '%15s' % row[1], '%12s' % row[2], '%10s' % row[3])

count = count + 1
print("***************TOTAL RECORD", count, "**********")
except:
print("error")
def addEmp():
global cn
global cur
print("****************ADD NEW EMPLOYEE******************")
eno = int(input("Enter employee number:"))
en = input("Enter employee name:")
dp = input("Enter dp:")
sl = int(input("Enter sl:"))
query = "insert into emp values(%s, %s, %s, %s)"
[Link](query, (eno, en, dp, sl))
[Link]()
print("\n## RECORD ADDED SUCCESFULLY!")
def searchEmp():
global cn
global cur
print("*****************SEARCH EMPLOYEEFORM*****************")

en = int(input("Enter employee number to search:"))


query = "select * from emp where eno=%s"
[Link](query, (en,))
results = [Link]()
if [Link] <= 0:
print("\## SORRY! NO MATCHING DETAILS AVAILABLE ##")
else:
print("*****************************************************")
print('%5s' % "eno", '%15s' % 'EMPNAME', '%12s' % 'dp', '%10s' % 'sl')

print("********************************************************")
for row in results:
print('%5s' % row[0], '%15s' % row[1], '%12s' % row[2], '%10s' % row[3])

print("-" * 50)
def editEmp():
global cn
global cur
print("************EDIT EMPLOYEE FORM***************")
en = int(input("Enter employee number to edit:"))
query = "select * from emp where eno=%s"
[Link](query, (en,))
results = [Link]()
if [Link] <= 0:
print("\##SORRY! NO MATCHING DETAILS AVAILABLE ##")
else:
print("****************************************************")
print('%5s' % "eno", '%15s' % 'EMPNAME', '%12s' % 'dp', '%10s' % 'sl')
print("***************************************************")
for row in results:
print('%5s' % row[0], '%15s' % row[1], '%12s' % row[2], '%10s' % row[3])

print("-" * 50)
ans = input("Are you sure you want to update? (y/n)")
if ans == "y" or ans == "Y":
d = input("Enter new dp to update(enter old value if not to update):")
s = int(input("Enter new sl to update(enter old value if not to update):"))
query = "update emp set dp=%s, sl=%s where eno=%s"
[Link](query, (d, s, en))
[Link]()
print("\n## RECORD UPDATED ##")
def delEmp():
global cn
global cur
print("*****DELETE EMPLOYEE FORM*******")
en = int(input("Enter Employee number to delete:"))
query = "select * from emp where eno=%s"
[Link](query, (en,))
results = [Link]()
if [Link] <= 0:
print("\## SORRY! NO MATCHING DETAILS AVAILABLE ##")
else:
print("***************************************************")
print('%5s' % "eno", '%15s' % 'EMPNAME', '%12s' % 'dp', '%10s' % 'sl')
print("**************************************************")
for row in results:
print('%5s' % row[0], '%15s' % row[1], '%12s' % row[2], '%10s' % row[3])

print("-" * 50)
ans = input("Are you sure to delete? (y/n)")
if ans == "y" or ans == "Y":
query = "delete from emp where eno=%s"
[Link](query, (en,))
[Link]()
print("\n## RECORD DELETED ##")
def clear():
for i in range(1, 50):
print()
def generateSlip():
global cn
global cur
print("******************sl SLIP ********************")
en = int(input("Enter employee number to print sl slip:"))
query = "select * from emp where eno=%s"
[Link](query, (en,))
results = [Link]()
if [Link] <= 0:
print("/## SORRY! NO MATCHING DETAILS AVAILABLE ##")
else:
clear()
print("eno :", results[0], " " * 20, "NAME :", results[1])
print("dp :", results[2])
print("*" * 50)
s = int(results[3])
hra = s * 12 / 100
da = s * 15 / 100
it = 1000
nps = (s + hra) * 10 / 100
gross = s + hra + da + nps
ded = it + nps
net = gross - ded
tded = it + nps
print("%19s" % "EARNING", "%27s" % "DEDUCTION")
print("---------------------------------")
print("%20s" % ("Basic :" + str(s)), "%22s" % ("INC. TAX :" + str(it)))
print("%20s" % ("HRA :" + str(hra)), "%20s" % ("NPS :" + str(nps)))
print("%20s" % ("DA :" + str(da)))
print("%20s" % ("NPS :" + str(nps)))
print("-" * 50)
print("GROSS:", gross, "NET sl:", net, "TOTAL DED:", tded)
print("-" * 50)
print("===PRESS ANY KEY===")
input()

while True:
print("[Link] EMPLOYEE LIST")
print("[Link] NEW EMPLOYEE")
print("[Link] EMPLOYEE")
print("[Link] EMPLOYEE")
print("[Link] EMPLOYEE")
print("[Link] PAY SLIP")
print("[Link] US")
print("[Link]")
ans = int(input("Enter your choice:"))
if ans == 1:
showAll()
elif ans == 2:
addEmp()
elif ans == 3:
searchEmp()
elif ans == 4:
editEmp()
elif ans == 5:
delEmp()
elif ans == 6:
generateSlip()
elif ans == 7:
print("*" * 60)
print(" " * 20, "AUTHOR: DANIEL,IMTHIYAZ,REEYAN")
print(" " * 20, "EMAIL: www.@[Link]")
print("*" * 60)
elif ans == 0:
print("\nGoodbye and have a nice day!! :)")
[Link]()
break

OUTPUT:
[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:21
Enter employee name:DANIEL LAWERENCE ROZARIO
Enter dp:SENIOR MANAGER
Enter sl:69000000

## RECORD ADDED SUCCESFULLY!


[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:25
Enter employee name:GAVIN GIGESH
Enter dp:MANAGER
Enter sl:670000

## RECORD ADDED SUCCESFULLY!


[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:16
Enter employee name:MADHAV DIPULAL
Enter dp:SALES MANAGMENT
Enter sl:65000
## RECORD ADDED SUCCESFULLY!
[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:12
Enter employee name:REEYAN LAWRENCE TJOS
Enter dp:EMPLOYEE
Enter sl:50000

## RECORD ADDED SUCCESFULLY!


[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:02
Enter employee name:IMTHIYAZ ILLIYAS
Enter dp:TECH SUPPORT
Enter sl:5000

## RECORD ADDED SUCCESFULLY!


[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:2
****************ADD NEW EMPLOYEE******************
Enter employee number:08
Enter employee name:HAZEL CHACKOLIL GEORGE
Enter dp:TECH SUPPORT MANAGR
Enter sl:500000

## RECORD ADDED SUCCESFULLY!


[Link] EMPLOYEE LIST
[Link] NEW EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] EMPLOYEE
[Link] PAY SLIP
[Link] US
[Link]
Enter your choice:1
eno EMPNAME dp sl
*********************************************
21 DANIEL LAWERENCE ROZARIO SENIOR MANAGER 69000000
25 GAVIN GIGESH MANAGER 670000
16 MADHAV DIPULAL SALES MANAGMENT 65000
12 REEYAN LAWRENCE TJOS EMPLOYEE 50000
2 IMTHIYAZ ILLIYAS TECH SUPPORT 5000
8 HAZEL CHACKOLIL GEORGE TECH SUPPORT MANAGR 500000
***************TOTAL RECORD 6 **********
mysql> select * from emp;
+------+--------------------------+---------------------+----------+
| eno | en | dp | sl |
+------+--------------------------+---------------------+----------+
| 21 | DANIEL LAWERENCE ROZARIO | SENIOR MANAGER | 69000000 |
| 25 | GAVIN GIGESH | MANAGER | 670000 |
| 16 | MADHAV DIPULAL | SALES MANAGMENT | 65000 |
| 12 | REEYAN LAWRENCE TJOS | EMPLOYEE | 50000 |
| 2 | IMTHIYAZ ILLIYAS | TECH SUPPORT | 5000 |
| 8 | HAZEL CHACKOLIL GEORGE | TECH SUPPORT MANAGR | 500000 |

+------+--------------------------+---------------------+----------+
6 rows in set (0.00 sec)
Enter your choice:3
*****************SEARCH EMPLOYEE FORM*****************
Enter employee number to search:21
*****************************************************
eno EMPNAME dp sl
********************************************************
21 DANIEL LAWERENCE ROZARIO SENIOR MANAGER 69000000

Are you sure you want to update? (y/n)y


Enter new dp to update(enter old value if not to update):CEO
Enter new sl to update(enter old value if not to update):70000000

## RECORD UPDATED ##
mysql> SELECT * FROM emp;
+------+--------------------------+---------------------+----------+
| eno | en | dp | sl |
+------+--------------------------+---------------------+----------+
| 21 | DANIEL LAWERENCE ROZARIO | CEO | 70000000 |
| 25 | GAVIN GIGESH | MANAGER | 670000 |
| 16 | MADHAV DIPULAL | SALES MANAGMENT | 65000 |
| 12 | REEYAN LAWRENCE TJOS | EMPLOYEE | 50000 |
| 2 | IMTHIYAZ ILLIYAS | TECH SUPPORT | 5000 |
| 8 | HAZEL CHACKOLIL GEORGE | TECH SUPPORT MANAGR | 500000 |

+------+--------------------------+---------------------+----------+
6 rows in set (0.00 sec)
Enter your choice:5
***********DELETE EMPLOYEE FORM***************
Enter Employee number to delete:02
***************************************************
eno EMPNAME dp sl
***************************************************
2 IMTHIYAZ ILLIYAS TECH SUPPORT 5000
--------------------------------------------------
Are you sure to delete? (y/n)y
## RECORD DELETED ##
mysql> select * from emp;
+------+--------------------------+---------------------+----------+
| eno | en | dp | sl |

+------+--------------------------+---------------------+----------+

| 21 | DANIEL LAWERENCE ROZARIO | CEO | 70000000 |


| 25 | GAVIN GIGESH | MANAGER | 670000 |

| 16 | MADHAV DIPULAL | SALES MANAGMENT | 65000 |


| 12 | REEYAN LAWRENCE TJOS | EMPLOYEE | 50000 |

| 8 | HAZEL CHACKOLIL GEORGE | TECH SUPPORT MANAGR | 500000 |

+------+--------------------------+---------------------+----------+
5 rows in set (0.00 sec)

Enter employee number to print sl slip:75

/## SORRY! NO MATCHING DETAILS AVAILABLE ##


Enter employee number to print sl slip:25

eno : 25 NAME : GAVIN GIGESH

dp : MANAGER
**************************************************

EARNING DEDUCTION

---------------------------------
Basic :670000 INC. TAX :1000

HRA :80400.0 NPS :75040.0

DA :100500.0
NPS :75040.0

--------------------------------------------------

GROSS: 925940.0 NET sl: 849900.0 TOTAL DED: 76040.0


Enter employee number to search:89

\## SORRY! NO MATCHING DETAILS AVAILABLE ##


Enter employee number to edit:65

\##SORRY! NO MATCHING DETAILS AVAILABLE ##


Enter your choice:7
************************************************************

AUTHOR: DANIEL,IMTHIYAZ,REEYAN

EMAIL: www.@[Link]
************************************************************

[Link] EMPLOYEE LIST

[Link] NEW EMPLOYEE


[Link] EMPLOYEE

[Link] EMPLOYEE

[Link] EMPLOYEE
[Link] PAY SLIP

[Link] US
[Link]

Enter your choice:0

Goodbye and have a nice day!! :)

X---------------------------------------------------------X
BIBLIOGRAPHY
1. [Link]
2. [Link]
3. Meta AI
4. [Link]
5. [Link]

You might also like