Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Wa0012.

Download as pdf or txt
Download as pdf or txt
You are on page 1of 48

LEAVE MANAGEMENT SYSTEM

A MINI PROJECT REPORT

Submitted By

VIDHYA B (622019104077)

SWEATHASHREE V (622019104069)

BACHELOR OF ENGINEERING

IN

COMPUTER SCIENCE DEPARTMENT

PAAVAI COLLEGE OF ENGINEERING

PACHAL, NAMAKKAL – 637408

ANNA UNIVERSITY: CHENNAI – 600025

JUNE – 2022
BONAFIDE CERTIFICATE

Certified that this project report “LEAVE MANAGEMENT


SYSTEM” is the Bonafide work of “VIDHYA B
(622019104077), SWEATHASHREE V (622019104069)
who carried out the project work under my supervision.

SIGNATURE SIGNATURE

Mr. R. MURUGESAN, M.E(Ph.D.) Mr. S. PRABHU, M. TECH

ASSISTANT PROFESSOR ASSOCIATE PROFESSOR

HEAD OF THE DEPARTMENT SUPERVISOR

Department of CSE Department of CSE

Certified that candidate was examined in the Anna University project


viva – voice Examination held on

INTERNAL EXAMINER EXTERNAL EXAMINAR


ACKNOWLEDGEMENT

We express our profound gratitude with pleasure to our most


respected Chairman Shri. CA, N.V. Natarajan, B. Com.,
FCA, and also to our beloved correspondent Smt. N. Mangai
Natarajan, M.Sc., for giving motivation and providing all necessary
facility for the successful completion of this project.

It is our privilege to thank our beloved Director – Administration


K.K. Ramasamy, M.E, Ph.D., and our principal Dr.A.
Immanuvel M.E Ph.D., for their moral support and deeds in
bringing out this project successful.

We extend our gratefulness to Mr. R. Murugesan, M.E., (Ph.


D)., Head of the department, Department of Computer science and
Engineering, for his encouragement and constant support in successful
completion of project.

We convey our thanks to Mr. P. Prabhu, M. Tech Assistant


Professor, Department of Computer Science and Engineering, our
project coordinator for being more informative.
TABLE OF CONTENT

CHAPTER TITLE PAGE

ABSTRACT

LIST OF ABBREVATION

1. INTRODUCTION 1

2. SYSTEM ANALYSIS 5

2.1 EXISTING SYSTEM

2.2 DRAWBACKS OF EXISTING SYSTEM

2.3 PROPOSED SYSTEM

2.4 ADVANTAGE OF PROPOSED SYSTEM

3. FEASIBILITY STUDY 8

3.1 TECHNICAL FEASIBILITY

3.2 OPERATIONAL FEASIBILITY


4. SYSTEM SPECIFICATION 9

4.1 HARDWARE REQUIREMENTS

4.2 SOFTWARE REQUIREMENTS

4.3 SYSTEM ARCHITECTURE

5. SOFTWARE DESCRIPTION 10

5.1 BACK END

5.1.1 PYTHON 3.10

5.1.2 FEATURES OF PYTHON

6. SYSTEM DESIGN&DEVELOPMENT 13

6.1 DATAFLOW DIAGRAM

7. PROJECT DESCRIPTION 14

7.1 MODULE DESCRIPTION

7.1.1 LOGIN

7.1.2 STUDENT REGISTER

7.1.3 SELECTION

7.1.4 UPDATE

7.1.5 VIEW

7.1.6 CANCEL
8. CONCLUSION & FUTURE ENHANCEMENT 18

8.1 CONCLUSION

8.2 FUTURE ENHANCEMENT

9. APPENDIX 20

9.1 SOURCE CODE

9.2 SCREENSHOTS

10. REFERENCES 25
LIST OF ABBREVATION

TALMS - TIME, ATTENDANCE AND LEAVE


MANAGEMENT SYSTEM

LMS - LEAVE MANAGEMENT SYSTEM

SL - STUDENT LOGIN

ADL - ADMIN LOGIN

OD - ON DUTY

LOA - LEAVE OF ABSENCE


ABSTRACT

Leave Management System Project is an essentially software designed


to keep track of student information in any company. It stores data such
as their students’ personal information. The goal of “Student
Management System" is to create a work centre scheduling system.
Scheduling is a technology that makes the process of informing
activities and notifications in the college where it is implemented
simple and even online.

The leave management system project gives managers a better idea of


their faculty and helps them plan and manage their work hours in order
to cut costs and boost productivity. It gives appropriate directions and
supervisions for employees. It also secures and manages information
that are important to the students including personal and work-related
information.

The proposed system automates the existing system. It decreases the


paper work and makes the record maintenance process. Our application
mainly focuses on the fair distribution of attendance among students. It
provides all the related details of working days, holidays, events &
workshops taking place in the college. This project is aimed at
developing an online leave management system that is of importance
to either an organization. The Leave Management System (LMS) is an
Intranet based application that can be accessed throughout the
organization or a specified group/Dept.
CHAPTER - 1

INTRODUCTION

The most popular forms of coding in these days is the generation of


applications or apps, that can easily run on our mobile phones on any
environment like android, windows or IOS. Now a days, the technology
is improving drastically. It is being used in every sphere of life. None
of the field is left untouched by the growing influence of these mobile
applications. The hardware and software capabilities of phones have
been improving fastly. We are able to think that the current mobile
phones are as strong as computers and even they are able to compete
with computers.

Features of our application are as follows: -

• Our application mainly focuses on the fair distribution of


attendance among students. It provides all the related details of
working days, holidays, events & workshops taking place in the
college.

• It provides overall as well as weekly attendance of student.


Parents, faculties and students can get easily updated about their
attendance status.
• Students can easily upload their leave applications online just on
one click. The application will directly go to the concerned
faculty and respective coordinators of student. This will
eliminate the redundant paper work.

• The application will also take the approval of parents of students


to check the originality of leave application. This will reduce the
frauds in application. Thus, a proper and fair distribution of
attendance will be given to each and every student. A student thus
will not be able to do unethical and wrong things.

• A proper section for attachments will be provided which will


allow students to attach their medical and other documents.

It provides overall as well as weekly attendance of student.


Parents, faculties and students can get easily updated about their
attendance status. Students can easily upload their leave
applications online just on one click. The application will directly
go to the concerned faculty and respective coordinators of
student. This will eliminate the redundant paper work.
In the existing system, leaves are maintained using the
attendance register for staff. The staff needs to submit their
leaves manually to their respective authorities. This increases the
paperwork & maintaining the records becomes tedious.
Maintaining notices in the records also increases the paperwork.

The main objective of the proposed system is to reduce the


paperwork and help in easier record maintenance by having a
particular centralized Database System, where Leaves and
Notices are maintained. The proposed system modernizes and
automates the existing system. It decreases the paperwork and
enables easier record maintenance. It also reduces chances of
Data loss. This module intelligently adapts to HR policy of the
management & allows easy leave handling for better scheduling
of workload.
CHAPTER - 2
SYSTEM ANALYSIS

The leave management system has been the reliability and


transparency of the data we collect and report. In service to that, we
developed a system for taking screenshots of our original data sources,
usually state leave form information.

2.1 Existing System

• In existing system, the records are maintained manually by the


administrative user. The attendance is carried out in the form of
hand-written registers. It is very difficult job to maintain the
record for the users because of more human effort.
• This system requires correct feed on input into the respective
field. Suppose wrong inputs are entered, then the application
could get misunderstood and rejected.
• So, the user finds the difficulty to use. The existing system is not
user friendly because the retrieval of data is time consuming and
data is not maintained efficiently.
• These systems need to be handled by a specialist for maintaining
and updating the system which is very costly. It requires more
calculations to generate the report. So, it is generated at the end
of the session.
2.2 DRAWBACKS OF EXISTING SYSTEM

Although it may seem simple, there are many things that can go
wrong with it. Manual tracking of employee attendance and leave is
undoubtedly one of the most tedious and cumbersome tasks. Manual
attendance tracking leads to delays and accounting errors, making
employees dissatisfied and dissatisfied.

Cost may not be a big problem for larger companies but for smaller
companies, it can definitely be a major concern. There are many costs
associated with online leave management systems such as acquisition
costs and maintenance costs. If they do not fit into the budget of these
companies, then they may have to settle for substandard software.

Security is another concern when it comes to online leave management


systems. They should be designed to prevent unauthorized access to
sensitive and confidential data. Thus, companies need to factor all the
pros and cons of an online leave management system before they take
a decision. It could be just as easy to simply outsource your leave
management needs to the experts.
2.3 Proposed System

• In proposed system, the chance of losing data is not possible


because data is maintained in the form of database and
digitalization of student’s information.
• Every day information of attendance, leave and notice, which
are updated into the database using a user-friendly GUI. This
application is an online application which makes more flexible
to access information.
• In case, if there is some holiday, then the data is being updated
automatically under well-defined graphical user interface. This
software helpful for the department and management class and
create less burden in work. It is used to access the information
for the authorized persons easily. The proposed system
automates the existing system.

• Every day attendance, leaves and notices information are


updated in to database using a user-friendly GUI. This
application is an online application which makes more to
flexible access information.
• The Leave Management System reduces the over work and time
duration. It provides an easy, maintained and systematic
environment for the higher panel (HOD/Faculty) for the approval
of leave.
2.4 ADVANTAGES OF PROPOSED SYSTEM

• The proposed system is eliminating almost complete usage of


pen and paper. Today, we are left with a smaller number of trees
in world. Trees are being cut to make papers.

• Thus, our application is helpful in saving trees, a step for green


environment. In India, most of the schools and colleges are not
using this technology. They are still stuck up in old fashion of
writing applications on paper. Authenticity of such approvals is
also questionable. They may be fake.

• Thus, our application is a revolutionary step towards the secure


and more transparent way of submitting your documents which
are genuine, certified and accurate. The proposal can be a
milestone in the path of digital world.

• This is better concept, untouched from major area of this country,


can contribute largely in the boundless world of digital. This is
very minor and unnoticed topic, but is crucial for almost every
student in their day-to-day life. The proposal is also having an
option of declining your leave consent. Thus, it’s completely
abolishing additional efforts of calling up to authority or sending
any message from external sources.
CHAPTER - 3
FEASIBILITY STUDY

Feasibility studies aim to objectively and rationally uncover the


strengths and weaknesses of the existing system or proposed
venture. In its simplest term, the two criteria to judge feasibility
are cost required and value to be attained. As such, a well-
designed feasibility study should provide historical background
of the project. Generally, feasibility studies precede technical
development and project implementation.

4.1 TECHNICAL FEASIBILITY

Generally, feasibility studies precede technical development and


project implementation. The assessment is based on a system
requirement in terms of Input, Processes, Output, Fields,
Programs, and Procedure. This can be quantified in terms of
volumes of data, trends, frequency of updating, etc., in order to
estimate whether the new system will perform adequately or not.
Technological feasibility is carried out to determine the
capability, in terms of software, hardware, personnel and
expertise, to handle the completion of the project.
4.2 OPERATIONAL FEASIBILITY

Operational feasibility is a measure of how well a proposed system


solves the problems, and takes advantage of the opportunities identified
during scope definition and how it satisfies the requirements identified
in the requirements analysis phase of system development. The
operational feasibility of the system can be checked as it solves the
problems and reduces the complications occurring in the paper-pencil
test.

CONCLUSION OF FEASIBILITY STUDY

1) Technical Feasibility:
The system can be implemented using computer software & hardware.
An economic discussion on the selected alternative and how it meets
the established objectives and the functional requirements are
discussed further in detail.

2) Operational Feasibility:
The system efficiently operates & reduces manual computation and
time of processing, reducing cost of paperwork and human
errors. Discussion on technological capabilities of developing the
selected alternative and the operational impact of the system on the
current environment is addressed as well.
CHAPTER - 5
SOFTWARE DESCRIPTION
5.1 BACK END
5.1.1 PYTHON 3.10
Software Requirements

• .NET FRAMEWORK : Version 3.5


• ENVIRONMENT : Visual Studio 2019
• LANGUAGE : Python
• BACK END : SQL Server 2019 ( SQL Tutorial )

Hardware Requirements

• PROCESSOR : Intel i3 and more


• PROCESSOR SPEED : 1.6 GHZ
• RAM : 1GB RAM
• HARD DISK : 200 GB

The latest version of python sports powerful pattern matching features


better error reporting, and smarter typing syntax for wrapped functions.
python 3.10 the latest in development version of python, has been
released. Python is an interpreted, object-oriented, high-level
programming language with dynamic semantics.
Fig 5.1.1 How Python Interpreter Works

5.1.2 FEATURES OF PYTHON

Python has become one of the most popular programming languages in


the world in recent years. It's used in everything from machine learning
to building websites and software testing. It can be used by developers
and non-developers alike.
CHAPTER - 6
SYSTEM DESIGN & DEVELOPMENT

Architecture Design

6.1 Data Flow Diagram

• A data flow diagram (DFD) maps out the flow of information


for any process or system.

• It uses defined symbols like rectangles, circles and arrows, plus


short text labels, to show data inputs, outputs, storage points and
the routes between each destination.
• Data flowcharts can range from simple, even hand-drawn process
overviews, to in-depth, multi-level DFDs that dig progressively
deeper into how the data is handled.
CHAPTER - 7

PROJECT DESCRIPTION

7.1 MODULE DESCRIPTION

Module is a single leave management system that is critical for HR


tasks and keeps the record of vital information regarding working hours
and leaves. It intelligently adapts to HR policy of the management and
allows students and staff to manage leaves and replacements (if
required). In this module, Head of Department (HOD) will have
permissions to look after data of every faculty member of their
department. HOD can approve leave through this application and can
view leave information of every individual. This application can be
used in a college to reduce processing work load.

This project’s main idea is to develop an online centralized application


connected to database which will maintain faculty leaves, notices
information and their replacements (if needed). Leave management
application will reduce paperwork and maintain record in a more
efficient & systematic way. This module will also help to calculate the
number of leaves taken monthly/annually and help to gather data with
respect to number of hours worked.
7.1.1 LOGIN MODULE

• Login page provides bank employee to login the user page.

• The Login Module is a portal module which allows the users to


type a user name and password to login.
• This module can be placed on any module. Tab to allow users to
login to the system.
• Check the 'creating module tab' to add module.

7.1.2 STUDENT REGISTER MODULE

• Register page provides 'ready-to-use' user interface that queries


the registration details from the user which contains name,
Email id, phone number, password, confirm password.
• A registration form is a list of fields that a user will input data
and submit to a company or an individual.
• There are many reasons to fill out a registration form by person.
• Companies use registration forms to sign up customers for
subscriptions, services, or other programs or plans.

7.1.3 SELECTION MODULE

• Selection module deals with a ready-to-use user interface that


queries the update details, view details from the user. We can
view the details which is stored in database.

• A Selection form is a list of fields that a user will input data and
submit to a company or an individual.
• There are many reasons why you would want a person to select
out a selection form.
• Companies use selection forms to select the customers details,
services, or other programs or plans.

7.1.4 UPDATE MODULE

• Update module deals with a ready-to-use user interface that


queries the update details from the user. We can view the stored
details in database.
• An update form is a list of fields that a user will input data and
submit to a company or an individual.
• There are many reasons why you would want a person to select
out an update form.
• Companies use update forms to update the customers details,
services, or other programs or plans.

7.1.4 VIEW MODULE

• View module deals with a ready-to-use user interface. We can


view the details that the user has given in the Registration Form.

• A View form is a list of fields that a user will input data and
submit to a company or an individual.
• There are many reasons why you would want a person to select
out a View form.
• Companies use view forms to see the student details, programs
or plans.
CHAPTER - 8

CONCLUSION & FUTURE ENHANCEMENT

8.1 CONCLUSION

As seen above, the common problem faced by students these days is


related to Attendance. Due to lack of coordination or inefficient
system, handling of leave records becomes very difficult. With the help
of the proposed system concerned faculties will have proper
information about student.

It also helps those students who regularly attend the classes but due
manual system., they get marked as absent on the other hand most of
the students who are not attending classes usually get attendance
because of the drawbacks of the existing system.

Thus, Students will not be able to cheat and this application helps to
take action against those students who usually are missing lectures.
Faculties will also have relaxation from the proposal as all hustling and
bustling of maintaining records gets almost eliminated. Overall,
will bring an ease to the life of studying students, parents and teachers.

Further upgradation of the Leave Management System for various


types of organisations with multiple hierarchies can help in reducing
paperwork, help achieve error free tabulation and
calculation of leaves.
8.2 FUTURE ENHANCEMENT

• In Leave Management System, there are some additional Features


like biometric authentication while logging in.

• Biometric techniques like fingerprint recognition, Iris


recognition are most suitable for this Leave management
system.
• so, adding the biometric authentication in place of login makes
this mini project is completed.
• It's also the central location for all of your personnel data,
including the most up-to-date statistics on your organization's
hiring and retention patterns.
• This is the practice of faculties watching over their students’
activities in the college and working days in order to ensure that
they are productive.
• It's useful for keeping track and securing the leave information of
the students this can also can assist in problem solving and avoid
conflicts.
• Generating these reports will assist the admin in updating details
regarding important information.
CHAPTER – 9

APPENDIX

9.1 SOURCE CODE

import sqlite3

import tkinter

import tkinter.messagebox as tk

from tkinter.font import Font

from easygui import *

from tkinter import *

from turtle import *

import random

conn = sqlite3.connect('leaveDb.db')

cur = conn.cursor()

conn.execute ('''CREATE TABLE balance (employee_id text,sickleave

int,maternityleave int,emergencyleave int)''')

conn.execute('''CREATE TABLE status (leave_id int,employee_id text,leave


text,Date1 text,Date2 text,days int,status text)''')
conn.execute('''CREATE TABLE employee (employee_id text,Name
text,ContactNumber text,Password text)''')

def AdminLogin():

message = "Enter Username and Password"

title = "Admin Login"

fieldnames = ["Username", "Password"]

field = []

field = multpasswordbox(message, title, fieldnames)

if field[0] == 'admin' and field[1] == 'admin':

tkinter.messagebox.showinfo("Admin Login", "Login Successfully")

adminwindow()

else:

tk.showerror("Error info", "Incorrect username or password")

def EmployeeLogin():

message = "Enter Employee ID and Password"

title = "Employee Login"

fieldnames = ["Employee ID", "Password"]

field = []

field = multpasswordbox(message, title, fieldnames)


for row in conn.execute('SELECT * FROM employee'):

if field[0] == row[0] and field[1] == row[3]:

global login

login = field[0]

f=1

print("Success")

tkinter.messagebox.showinfo("Employee Login", "Login Successfully")

EmployeeLoginWindow()

break

if not f:

print("Invalid")

tk.showerror("Error info", "Incorrect employee id or password")

def Employeelogout():

global login

login = -1

LoginWindow.destroy()

def EmployeeLeaveStatus():

global leaveStatus
leaveStatus = []

for i in conn.execute('SELECT * FROM status where employee_id=?', login):

leaveStatus = i

WindowStatus()

def EmployeeAllStatus():

allStatus = Toplevel()

txt = Text(allStatus)

for i in conn.execute('SELECT * FROM status where employee_id=?', login):

txt.insert(INSERT, i)

txt.insert(INSERT, '\n')

txt.pack()

def EmployeeInformationWindow():

employeeInformation = Toplevel()

txt = Text(employeeInformation)

for i in conn.execute('SELECT employee_id,Name,ContactNumber FROM


employee where employee_id=?', login):

txt.insert(INSERT, i)

txt.insert(INSERT, '\n')

txt.pack()
def EmployeeAllInformationWindow():

allEmployeeInformation = Toplevel()

txt = Text(allEmployeeInformation)

for i in conn.execute('SELECT employee_id,Name,ContactNumber FROM


employee'):

txt.insert(INSERT, i)

txt.insert(INSERT, '\n')

txt.pack()

def WindowStatus():

StatusWindow = Toplevel()

label_1 = Label(StatusWindow, text="Employee ID=", fg="blue",


justify=LEFT, font=("Calibri", 16))

label_2 = Label(StatusWindow, text=leaveStatus[1], font=("Calibri", 16))

label_3 = Label(StatusWindow, text="Type=", fg="blue", font=("Calibri",


16), justify=LEFT)

label_4 = Label(StatusWindow, text=leaveStatus[2], font=("Calibri", 16))

label_5 = Label(StatusWindow, text="start=", fg="blue", font=("Calibri", 16),


justify=LEFT)

label_6 = Label(StatusWindow, text=leaveStatus[3], font=("Calibri", 16))


label_7 = Label(StatusWindow, text="end=", fg="blue", font=("Calibri", 16),
justify=LEFT)

label_8 = Label(StatusWindow, text=leaveStatus[4], font=("Calibri", 16))

label_9 = Label(StatusWindow, text="Status:", fg="blue", font=("Calibri",


16), justify=LEFT)

label_10 = Label(StatusWindow, text=leaveStatus[6], font=("Calibri", 16))

label_11 = Label(StatusWindow, text="leave_id:", fg="blue", font=("Calibri",


16), justify=LEFT)

label_12 = Label(StatusWindow, text=leaveStatus[0], font=("Calibri", 16))

label_11. grid(row=0, column=0)

label_12.grid(row=0, column=1)

label_1.grid(row=1, column=0)

label_2.grid(row=1, column=1)

label_3.grid(row=2, column=0)

label_4.grid(row=2, column=1)

label_5.grid(row=3, column=0)

label_6.grid(row=3, column=1)

label_7.grid(row=4, column=0)

label_8.grid(row=4, column=1)
label_9.grid(row=5, column=0)

label_10.grid(row=5, column=1)

def balance():

global login

check = (login,)

global balanced

balanced = []

for i in conn.execute('SELECT * FROM balance WHERE employee_id = ?',


check):

balanced = i

WindowBalance()

def WindowBalance():

balanceWindow = Toplevel()

label_1 = Label(balanceWindow, text="Employee ID=", fg="blue",


justify=LEFT, font=("Calibri", 16))

label_2 = Label(balanceWindow, text=balanced[0], font=("Calibri", 16))

label_3 = Label(balanceWindow, text="Sick Leave=", fg="blue",


font=("Calibri", 16), justify=LEFT)

label_4 = Label(balanceWindow, text=balanced[1], font=("Calibri", 16))


label_5 = Label(balanceWindow, text="Maternity Leave=", fg="blue",
font=("Calibri", 16), justify=LEFT)

label_6 = Label(balanceWindow, text=balanced[2], font=("Calibri", 16))

label_7 = Label(balanceWindow, text="Emergency Leave=", fg="blue",


font=("Calibri", 16), justify=LEFT)

label_8 = Label(balanceWindow, text=balanced[3], font=("Calibri", 16))

label_1.grid(row=0, column=0)

label_2.grid(row=0, column=1)

label_3.grid(row=1, column=0)

label_4.grid(row=1, column=1)

label_5.grid(row=2, column=0)

label_6.grid(row=2, column=1)

label_7.grid(row=3, column=0)

label_8.grid(row=3, column=1)

def apply():

message = "Enter the following details "

title = "Leave Apply"

fieldNames = ["Employee ID", "From", "To", "days"]

fieldValues = []
fieldValues = multenterbox(message, title, fieldNames)

message1 = "Select type of leave"

title1 = "Type of leave"

choices = ["Sick leave", "Maternity leave", "Emergency leave"]

choice = choicebox(message1, title1, choices)

leaveid = random.randint(1, 1000)

conn.execute("INSERT INTO
status(leave_id,employee_id,leave,Date1,Date2,days,status) VALUES
(?,?,?,?,?,?,?)",

(leaveid, fieldValues[0], choice, fieldValues[1], fieldValues[2],


fieldValues[3], "Pending"))

conn.commit()

def LeaveApproval():

message = "Enter leave_id"

title = "leave approval"

fieldNames = ["Leave_id"]

fieldValues = []

fieldValues = multenterbox(message, title, fieldNames)

message1 = "Approve/Deny"
title1 = "leave approval"

choices = ["approve", "deny"]

choice = choicebox(message1, title1, choices)

conn.execute("UPDATE status SET status = ? WHERE leave_id= ?", (choice,


fieldValues[0]))

conn.commit()

if choice == 'approve':

print(0)

cur.execute("SELECT leave FROM status WHERE leave_id=?",


(fieldValues[0],))

row = cur.fetchall()

col = row

for row in conn.execute("SELECT employee_id FROM status WHERE


leave_id=?", (fieldValues[0],)):

print(2)

exampleId = row[0]

for row in conn.execute("SELECT days FROM status WHERE leave_id=?",


(fieldValues[0],)):

print(2)

exampleDays = row[0]
for row in conn.execute("SELECT sickleave from balance where
employee_id=?", (exampleId,)):

balance = row[0]

print(balance)

for row in conn.execute("SELECT maternityleave from balance where


employee_id=?", (exampleId,)):

balance1 = row[0]

print(balance1)

for row in conn.execute("SELECT emergencyleave from balance where


employee_id=?", (exampleId,)):

balance2 = row[0]

print(balance2)

if (col[0] == ('sickleave',)):

print(3)

conn.execute("UPDATE balance SET sickleave =? WHERE


employee_id= ?", ((balance - exampleDays), (exampleId)))

if (col[0] == ('maternityleave',)):

print(3)

conn.execute("UPDATE balance SET maternityleave =? WHERE


employee_id= ?", ((balance1 - exampleDays), (exampleId)))
if (col[0] == ('emergencyleave',)):

print(3)

conn.execute("UPDATE balance SET emergencyleave =? WHERE


employee_id= ?", ((balance2 - exampleDays), (exampleId)))

def leavelist():

leavelistwindow = Toplevel()

txt = Text(leavelistwindow)

for i in conn.execute('SELECT * FROM status'):

txt.insert(INSERT, i)

txt.insert(INSERT, '\n')

txt.pack()

def registration():

message = "Enter Details of Employee"

title = "Registration"

fieldNames = ["Employee ID", "Name", "Contact Number", "Password"]

fieldValues = []

fieldValues = multpasswordbox(message, title, fieldNames)

while 1 :

if fieldValues == None:
errmsg = ""

for i in range(len(fieldNames)):

if fieldValues[i].strip() == "":

errmsg = errmsg + ('"%s" is a required field.\n\n' % fieldNames[i])

break

if errmsg == "":

fieldValues = multpasswordbox(errmsg, title, fieldNames, fieldValues)

conn.execute("INSERT INTO
employee(employee_id,Name,ContactNumber,Password) VALUES (?,?,?,?)",

(fieldValues[0], fieldValues[1], fieldValues[2], fieldValues[3]))

conn.execute("INSERT INTO
balance(employee_id,sickleave,maternityleave,emergencyleave) VALUES
(?,?,?,?)", (fieldValues[0], 12, 12, 50))

conn.commit()

break

def EmployeeLoginWindow():

global LoginWindow

LoginWindow = Toplevel()

LoginWindow.wm_attributes('-fullscreen', '1')
Background_Label = Label(LoginWindow, image=filename)

Background_Label.place(x=0, y=0, relwidth=1, relheight=1)

informationEmployee = Button(LoginWindow, text='Employee information',


command=EmployeeInformationWindow, bd=12, relief=GROOVE, fg="blue",
bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

informationEmployee['font'] = BtnFont

informationEmployee.pack(fill=X)

submit = Button(LoginWindow, text='Submit Leave', command=apply,


bd=12, relief=GROOVE, fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

submit['font'] = BtnFont

submit.pack(fill=X)

LeaveBalance = Button(LoginWindow, text='Leave Balance',


command=balance, bd=12, relief=GROOVE, fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

LeaveBalance['font'] = BtnFont

LeaveBalance.pack(fill=X)

LeaveApplicationStatus = Button(LoginWindow, text='Last leave status',


command=EmployeeLeaveStatus, bd=12, relief=GROOVE, fg="blue",
bg="#ffffb3",
font=("Calibri", 36, "bold"), pady=3)

LeaveApplicationStatus['font'] = BtnFont

LeaveApplicationStatus.pack(fill=X)

AllLeaveStatus = Button(LoginWindow, text='All leave status',


command=EmployeeAllStatus, bd=12, relief=GROOVE, fg="blue",
bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

AllLeaveStatus['font'] = BtnFont

AllLeaveStatus.pack(fill=X)

LogoutBtn = Button(LoginWindow, text='Logout', bd=12, relief=GROOVE,


fg="red", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3, command=Employeelogout)

LogoutBtn['font'] = BtnFont

LogoutBtn.pack(fill=X)

informationEmployee.pack()

submit.pack()

LeaveBalance.pack()

LeaveApplicationStatus.pack()

AllLeaveStatus.pack()
LogoutBtn.pack()

ExitBtn.pack()

def adminwindow():

adminmainwindow = Toplevel()

adminmainwindow.wm_attributes('-fullscreen', '1')

Background_Label = Label(adminmainwindow, image=filename)

Background_Label.place(x=0, y=0, relwidth=1, relheight=1)

informationEmployee = Button(adminmainwindow, text='All Employee


information', command=EmployeeAllInformationWindow, bd=12,
relief=GROOVE, fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

informationEmployee['font'] = BtnFont

informationEmployee.pack(fill=X)

LeaveListButton = Button(adminmainwindow, text='Leave approval list',


command=leavelist, bd=12, relief=GROOVE, fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

LeaveListButton['font'] = BtnFont

LeaveListButton.pack(fill=X)

ApprovalButton = Button(adminmainwindow, text='Approve leave',


command=LeaveApproval, bd=12, relief=GROOVE, fg="blue", bg="#ffffb3",
font=("Calibri", 36, "bold"), pady=3)

ApprovalButton['font'] = BtnFont

ApprovalButton.pack(fill=X)

LogoutBtn = Button(adminmainwindow, text='Logout',


command=adminmainwindow.destroy, bd=12, relief=GROOVE, fg="red",

bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

LogoutBtn['font'] = BtnFont

LogoutBtn.pack(fill=X)

informationEmployee.pack()

LeaveListButton.pack()

ApprovalButton.pack()

ExitBtn.pack()

root = Tk()

root.wm_attributes('-fullscreen', '1')

root.title("Leave Management System")

root.iconbitmap(default='leavelogo.ico')

filename = PhotoImage(file="background.gif")

background_label = Label(root, image=filename)


background_label.place(x=0, y=0, relwidth=1, relheight=1)

BtnFont = Font(family='Calibri(Body)', size=20)

MainLabel = Label(root, text="Leave Management System", bd=12,


relief=GROOVE, fg="White", bg="blue",

font=("Calibri", 36, "bold"), pady=3)

MainLabel.pack(fill=X)

im = PhotoImage(file='login.gif')

AdminLgnBtn = Button(root, text='Admin login', bd=12, relief=GROOVE,


fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3, command=AdminLogin)

AdminLgnBtn['font'] = BtnFont

AdminLgnBtn.pack(fill=X)

LoginBtn = Button(root, text='Employee login', bd=12, relief=GROOVE,


fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3, command=EmployeeLogin)

LoginBtn['font'] = BtnFont

LoginBtn.pack(fill=X)

EmployeeRegistration = Button(root, text='Employee registration',


command=registration, bd=12, relief=GROOVE, fg="blue", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)


EmployeeRegistration['font'] = BtnFont

EmployeeRegistration.pack(fill=X)

ExitBtn = Button(root, text='Exit', command=root.destroy, bd=12,


relief=GROOVE, fg="red", bg="#ffffb3",

font=("Calibri", 36, "bold"), pady=3)

ExitBtn['font'] = BtnFont

ExitBtn.pack(fill=X)

MainLabel.pack()

AdminLgnBtn.pack()

LoginBtn.pack()

EmployeeRegistration.pack()

ExitBtn.pack()

root.mainloop()
9.2 SCREEN SHOTS
CHAPTER – 10
REFERENCE

[1] S.K. Jain. Joshi, and B.K. Sharma,” Attendance Management


System”, Masters Project Report, Rajasthan Technical University,
Kota

[2] M.K.P Basheer and C.V. Raghu, “Fingerprint Attendance System


for classroom needs”, in Proc. India Conference (INDICON),2012
Annual IEEE, pp. 433-438,7-9 December 2012.

[3] Gargi Soni*, Kshitiz Nagar, Mansi Fumaria, Namita Raghuvanshi,


Kamal Kadam, “STUDY PAPER ON STUDENT LEAVE
MANAGEMENT APPLICATION” in 2016, IJESRT.

[4] Cloud-Based College Management Information System for


Autonomous Institute Rajesh Shah, Makhan Kumbhakar Christian
Eminent College Indore, MP, India. (Volume 5, Issue 5, May 2015
ISSN: 2277 128X International Journal of Advanced Research in
Computer Science and Software Engineering.

You might also like