Professional Documents
Culture Documents
ACKNOWLEDGEMENT
CERTIFICATE
REQIUREMENTS
CODING
OUTPUT
LIMITATIONS
FEATURES
BIBLIOGRAPHY
ACKNOWLEDGEMENT
DATE: ___________
ROLL NO. :___________
SIGNATURE OF SIGNATURE OF
INTERNAL EXAMINER: EXTERNAL EXAMINER:
___________________ ___________________
REQUIREMENTS
HARDWARE REQUIRED
➢PRINTER- TO PRINT THE REQUIRED
DOCUMENTS OF THE PROJECT
➢PROCESSOR- PENTINUM III
➢RAM- 4GB
➢HARD DISK- 20 GB
SOFTWARE REQUIRED
➢ OPERATING SYSTEM:WINDOW 10
➢ PYTHON IDLE 3.8,FOR
EXECUTION OF PROGRAM
➢ MS WORD FOR PRESENTATION
OF OUTPUT
INTRODUCTION
Table: cred
Table: staff
Table: department
Table: post
CODE:-
import mysql.connector as my
f0="n"
while f0=="n":
print("--1-FOR LOGIN-"
print("--2-FOR SIGNUP")
print("--0-EXIT")
a6=input("ENTER:-")
if a6="1":
uname=input("ENTER USERNAME:-")
pswd=input("ENTER PASSWORD:-")
con=my.connect(host="localhost",user="root",passwd="manager";database="emp
manage ")
cur-con.cursor()
row=cur.fetchall()
for r in row:
ifr[0]=pswd:
print("Sucessfully Login!")
cur.close()
while fo=="n":
print("""
---1-Employee Details...
---2-Department Functions→→→
---3-Post Details--
---0-LOGOUT--")
a=input("ENTER:-"))
if a=="1":
f1 ="n"
while f1=="n":
print(***)
a1=input("ENTER:-"}
# !!!all details!!!
if al="1":
con=my.connect(host="localhost",user="root",passwd="manager",
database="empmanage")
cur-con.cursor()
for i in cur:
print(1)
con.close()
#. !!!searcher!!!
if al=="2":
y="y"
while y=="y":
con-my.connect(host="localhost",user="root",passwd="manager"
database="empmanage ")
curacon.cursor()
x=cur.fetchone()
if x=None:
print("invalid id!")
else:
for i in cur:
print(i)
con.close()
if al="3":
con-
my.connect(host="localhost",user="root",passwd="manager",database="empman
age")
cur=con.cursor()
x=cur.fetchone[]
if x==None:
print("Invalid id!")
else:
print("""
---1-Change name---
---2-Change Contact---
--3-Change Address-
---4-Change Salary--""")
a10=input("ENTER:-")
if a10="1":
con-my.connect(host="localhost",user
"root",passwd="manager",database="empmanage")
cur=con.cursor()
con.commit()
con.close()
print("Record Updated!")
if a10="2":
con=my.connect(host="localhost",user="root",passwd="manager",
database="empmanage")
cur=con.cursor()
con.commit()
con.close()
print("Record Updated!")
if a10="3":
con-my.connect(host-"localhost",user-
"root",passwd="manager",database="empmanage
cur=con.cursor()
con.commit()
con.close()
print("Record Updated!")
if a10="4":
con-my.connect(host="localhost",user="root",passwd="manager",
database="empmanage")
cur-con.cursor()
con.commit()
con.close()
print("Record Updated!")
# !!!ladder!!!
if al="4":
nid=input("Enter ID:>")
nna=input("Enter name:-")
nad=input("Enter address:-")
nap=input("Enter Contact:>"}
nsa=input("Enter Salary:-")
npa=input("Enter post:-")
con-my.connect(host "localhost",user
"root",passwd="manager",database="empmanage")
cur=con.cursor()
x=cur.fetchone()
con.commit()
con.close()
print("Details Saved!")
else:
print("ID Already Exists Or Invalid Contact!")
# !!!remover!!!
if al="5":
con=my.connect(host="localhost",user="root",passwd="manager",database="emp
manage")
cur-con.cursor()
x=cur.fetchone()
if x=None:
print("Invalid Id!")
else:
con.commit()
con.close()
print("Record Removed!")
if a1="0":
f1="y"
# !!!Department Functions!!!
if a=="2":
f1="n"
while fl="n":
print("""
---1-See Department--
---2-Search Department---
---3-Add Department-
-4-Remove Department-
---5-Upadate Department-
a2-input("ENTER:-''')
# !!!see Department!!!
if a2=="1":
con=my.connect(host "localhost",user
"root",passwd="manager",database="empmanage")
cur=con.cursor()
for i in cur:
print(i)
# !!!search item!!!
if a2="2":
ad="y"
con=my.connect(host="localhost",user="root",passwd="manager",database="emp
manage")
cur-con.cursor()
if x=None:
print("Invalid Id!")
else:
for i in cur:
print(i)
# !!!Add Department!!!
if a2="3":
ad="y"
con-my.connect(host="localhost",user="root",passwd="manager"
database="empmanage")
cur=con.cursor()
x=cur.fetchall()
if x==None:
print( ")
else:
print("Sucessfully Added!")
con.commit()
con.close()
# !!!remover!!!
if a2="4":
ad="y"
con=my.connect(host="localhost",user
"root",passwd="manager",database="empmanage")
curacon.cursor()
x=cur.fetchone()
if x==None:
print("Invalid Id!")
else:
con.commit()
con.close()
print("Deleted Sucessfully!")
# !!!updater!!!
if a2="5":
ad="y""
print("""
i=input("ENTER:-"
if i=="1":
e="y"
con=my.connect(host="localhost",user="root",passwd="manager",database="emp
manage")
curacon.cursor()
x=cur.fetchone()
if x===None:
print("Invalid id!")
else:
con.commit()
con.close()
e="y"
con=my.connect(host="localhost",user="root",passwd="manager",database="emp
manage")
cur-con.cursor()
x-cur.fetchone()
if x==None:
print("Invalid id!")
else:
con.commit()
con.close()
print("Record Updated!")
if a2="0":
f1="y"
print("Department Closed!")
# !!!post functions!!!
if a =="3":
qp="n"
while qp=="n":
print("""
---2-Update Post---
a3-input("ENTER: ")
if a3="1":
con-my.connect(host="localhost",user="root",passwd="manager",
database="empmanage")
cur-con.cursor()
for i in cur:
print(i)
con.close()
# !!!Updater!!!
if a3="2":
er="y"
con=my.connect(host="localhost,user="root",passwd="manager",
database="empmanage")
cur=con.cursor()
x=cur.fetchone()
if x=None:
print("Invalid Code!")
else:
con.commit()
con.close()
print("Post Updated!")
if a3=="3":
ui="y"
---2-Remove Post-”)
rty=input("ENTER:-")
if rty=="1":
df="y"
cur-con.cursor()
x=cur.fetchall()
if x==None:
con.commit()
con.close()
print("Post Added!")
else:
op="y"
con=my.connect(host=localhost,user="root",passwd="manager",
database="empmanage")
curecon.cursor()
x=cur.fetchone()
if x==None:
con.commit()
con.close()
print("Post Removed!")
if a3="0":
ap="y"
print("Posts Closed!")
if a=="4":
ik="n"
print("""
---0-For Exit---""")
jkl-input("ENTER:-")
if jkl="1":
ty="y"
while ty="y":
print("""
---1-Update LoginID---
---2-Update Password---""")
rt=input("ENTER:-")
if rt=="1"
nm="y"
con=my.connect(host=localhost",user="root",passwd="manager"
database="empmanage")
cur=con.cursor()
x=cur.fetchone()
if x=None:
else:
user_n="+oid+""")
con.commit()
con.close()
print("LoginID Updated!")
if rt=="2"
nm="y"
curscon.cursor()
old-input("Enter LoginID:-")
x=cur.fetchone()
if x===None:
else:
con.commit()
con.close()
print("Password Updated!")
if jkl="2":
nm="y"
con=my.connect(host="localhost,user="root",passwd="manager",
database="empmanage")
curacon.cursor()
oid=input("Enter LoginID:-")
x-cur.fetchone()
if x==None:
else:
print("LoginID Removed!")
if jkl=="0":
ik="y"
print("Sucessfully Exit!")
if a=="0":
f0="y"
print("Sucessfully LOGOUT!")
else:
print("Try Again!!")
# !!!Signup Function!!!
if a6=="2":
y="y"
con=my.connect(host="localhost",user="root",passwd="manager",database="emp
manage")
cur=con.cursor()
x=cur.fetchone()
if x==None:
con.commit()
con.close()
else:
# !!!Programme Closer!!!
if a6=="0":
yu="y"
print("Programme Closed!")
OUTPUT: