You are on page 1of 94

A

PROJECT REPORT
ON
“ATTENDANCE SYSTEM”

Submitted to:
Kurukshetra University, Kurukshetra
In the partial fulfillment of the requirement
For the degree of
B.Com. (Computer Application)
Vth Sem.
2012-2013

Submitted to: Submitted by:


Miss. Anshul Rehal Mohit Kumar
Lecturer, Computer Application B.Com.5th
(C.A)
Commerce Deptt. Roll No 102315

MUKAND LAL NATIONAL COLLEGE


YAMUNA NAGAR
INDEX

 ACKNOWLEDGEMENT
 PREFACE
 INTRODUCTION TO PROBLAM AREA
 EXISTING SYSTEM
 LIMITATIONS OF EXITING SYSTEM
 PROPOSED SYSTEM
 SYSTEM ANALYSIS & DESIGN
 CODING
 OUTPUTS
 LIMITATION OF THE PROJECT
 FURTHER SCOPE
 CONCLUSION
 BIBLIGRAPHY
CERTIFICATE
ACKNOWLEDGEMET
ACKNOWLEDGEMENT

Many people have contributed to being the project into its


present’s form. First of all I would like to thank our respected
principal
Dr. Sailesh Kapoor (Principal of M.L.N college) I am
also very thankful and highly obliged
Mrs. Neeti Daryal (Head of Deptt. Computer Science.
and Department) for their encouragement and insightful
comments at virtually stages of both development of this
project and specially providing me the suitable environment
in terms of hardware & soft-ware in Computer Laboratory.
Further I express my deep gratitude to my guide
Miss. Parul Sharma (Lecturer of Computer Science
&Application) department of Commerce, for her valuable
suggestions and encouragement. She was the one who
provided me a dynamic, intellectually, stimulating and
constructive setting in which to work and write.
I am also thankful to all others faculty
members in the department who so patiently and cheerfully,
goaded, pushed, wheedled and cajoled me into finishing my
project in time.
I am also thankful to my parents & Almighty God whose best
wishes always inspire me to do my duty with full determination & hard
work. The constant encouragement from the parents added a flavor of
victory to this project.
Daljeet Kaur
B.COM.5th Sem. (C.A)

PREFACE
PREFACE

In the ever-widening world, the present system of education is facing new


challenges. It is a well-known fact that today is the age of computers, the
major achievements of science and technology. Now a days everybody is
realizing importance of computers which is the achievement of modern fifth
generation computers.
In the modern area of science and technology, powerful nations have
their own super computer. Although, India today among one progressive
nation, still we are lagging behind the most advance countries in the field of
science. This problem can be over come only when the youth of India of
present generation give full cooperation in raising India as a powerful
nation.
So realizing this fact and according to the time command when
computers are necessary and important achievement, I have chosen B.Com.
with Computer Applications at my esteemed Institution
D.A.V College, Sadhaura. This degree course aims at providing the student

knowledge about the various applications of computers. So it is necessary to


jump into the practical field. Hence, I was assigned this project, which is
part of my syllabus.
INTRODUCTION

TO

PROBLEM AREA
INTRODUCTION TO PROBLAM AREA

What is Attendance?
Attendance is the record of presence or absence of a person.
Attendance system of any organization maintains the records of its
employees regarding their presence or absence and leaves taken by them
per month.

Attendance is necessary part for an organization and also for an employee


because at the moment the work is done for the proper functioning of the
industry, a satisfactory amount or salary to the employee has to be paid
i.e. it forms the base for the salary or payment of the employee.

Every organization has its own way of managing attendance system.


Depending on the grade or the post of the employee at which he is
working e.g. workers, supervisors, executives, managerial staff which
includes deputy general manager, assistant general manager etc have the
same of marking their attendance and the employees who are on daily
wages or in training period have the same way of inputting the
attendance.
CATEGORIES OF EMPLOYEES
1. Skilled Employees
2. Semi skilled Employees
3. Unskilled Employees
SKILLED EMPLOYEES:
Those employees who are skilled in work and got training from
institution are come under this category. Basic qualification for skilled
employees is high school with ITI in any trade (i.e Electrician, Machinist,
Welder and Electronic etc.) and also one-year apprentice in particular
trade. They work independently and got facility of scale. After three years
of completion they will promote in next grade.

SEMI-SKILLED EMPLOYEES:
These are the workers who have the experience of 7 years of working in a
particular organization. They became senior and independently but he
does not got facility of scale. If person is eighth class pass then it will be
promoted after 6 years as skilled worker. No case those workers who will
not fulfill educational qualifications (i.e. below eighth class) promoted to
auxiliary worker grade four.

UNSKILLED WORKER:
They are working on shop as well as in offices most of them work as
sweeper, helper and assistant to technical worker. No technical unskilled
employee worked in office as attendant for helping officer and other staff.
On the basis of categories of employees the system is divided into two
parts-
a) Punching System
b) Non-punching System

PUNCHING SYSTEM:
This system includes skilled employees and semi-skilled employees. In
this system the employee punch the electronic card on the machine. Card
contains the name of staff member, staff number/code. After punching the
card the time keeper picked his attendance and feed it in attendance
system, after that time keeper records the outdoor duty and all types of
leaves, changes in shifts, short working hours and holiday etc. Then he
enters the records in the system. Records are sent to the computer
services department (C.S.D); the officers of C.S.D pick up the data and
enter it in the payroll programmer.

After this the C.S.D officers sent the data to the timekeepers for
checking. The timekeeper checks that data and again sent it to C.S.D after
making necessary corrections. After this the C.S.D officers prepares the
salary slip.

NON-PUNCHING SYSTEM: Manual system is required for the


attendance calculation. Employees are required to enter their in and out
time in the register and then monthly calculation is made.

LEAVE DETAILS
It is important for every industry to maintain the leave record of every
employee. How many leaves have been taken by an employee and of
which type? The details of leaves of every employee are called LEAVE
DETAILS. It includes all types of leaves of every month of employee. A
form is made to classify the leaves. All the details have to be filled in the
form. This form includes serial number, group and department center
code (DCC), registration number, class level, token number, name, duty,
official duty (OD), rest, privilege leave (PL), casual leave (CL),
accidental leave (ACC), sick leave (SC), medical leave (ML),
compensatory off (C-OFF), leave without pay (LWP), absent day paid
(DPAY), paid holiday (PD HOL).

 DCC- It is the code number of the department of the employee.


 OD- If an employee goes out of station on demand of company
then he is said to be on official duty.
 PL- Privilege leaves are those which are allotted to the employees
on the starting of year.
 CL- Casual leaves are those, which are taken by the employee by
informing the authority.
 SL- Sick leaves are granted to the employee and are paid for some
days.
 C-OFF- Compensatory off are those off which are taken against
over time.
 ACC LV- Accidental leave are those, which are taken
by the employee when he is injured in the campus of
the company. The department sanctions these
leaves.
 LWP- Leave without pay is those that are taken by
employee by informing the authority but he has no
leaves left in his account.
 EL- Earned leaves are those which can be cashable
and taken any time. 75% leaves are cashable.
APPLICATION FORMS

If an employee wants to take leave then he will have to fill


a leave form. Department issues these forms for each
level of employees. According to the level of employees
three types of forms are available-
1) White Application Form
2) Yellow Application Form
3) Pink Application Form
WHITE APPLICATION FORM:
White application form is used for workers.
YELLOW APPLICATION FORM:
Yellow application form is used for clerical staff.
PINK APPLICATION FORM:
Pink application form is used for management staff.
In these application forms, an employee filled the
following information - to fill his name, registration
number, designation, staff number, and leaves taken by
him and some other required information. If because of
any reason attendance is not collected or if the employee
is not agree by the attendance, and then to check it or to
correct it he has to fill the form that is called “Request
Form for payment of unpaid dues”.
OBJECTIVE
OBJECTIVE OF THE PROJECT

Today, our country is heading towards mass scale computerization. The

computer is all set to play its vital role in carrying India in 21 st century & so,

from being more calculating device. Computers have come long way & are

now getting involved directly in any operation of all kind & size of

organization.

In coming years, every efficient technology will be at premium & is a

quest to catch the already developed countries; software export industry can

be a boom.

Recognizing that this industry require low capital, a very little energy

& can be carried out anywhere irrespective of the geographical constant, it is

placed higher in the national priority with different policies being cleaned

out vertically everyday. With the result of phenomenal growth in computer

industry in India during the recent year, it is flooded with the different

manufactures. As a result of above said advancement, at present, there is

wide charm between the demand availability of properly trained man power.

The demand seems to be a curve. To meet this demand, all over the country.

So realizing this fact & according to the time demand when computers are

necessary & important achievement, one has chosen B.Com (C.A)


EXISTING SYSTEM
EXISTING SYSTEM
In general, the electricity board members concerning

with the electricity bill face problems specially in case of

surcharge, those people can get the problem because they

have to mention the amount payable before due date and

also amount payable after due date which creates the main

cause of problem. After working so many hours the members

can feel more tired also. It means the existing system is time

consuming.

Following are the problems in the existing system :

1. Time Consuming :

If the area is big for where the electricity bills are

prepared then calculation of charge for different users

take's a lot of time. Instead of this, in case of

computerized system the calculations are made in a

few seconds.

2. Clerical Mistakes :
Date being operated manually sometimes leads to

errors because of the skills of the electricity board's

members calculating the units or for some other

reason.
3. Secrecy :

The Electricity bill that are maintained after every two

months are prepared with the co-operation of many

members of electricity board of different areas. So

anybody can take secret information out of these

registers and that is why they lack secrecy. But in

computerized system the secrecy can be maintained.

4. Date Collecting Mistakes :

Different members may have different information. The

charge calculations is to be registered with the bill

register. They can do the mistakes regarding the user's

types.

5. Storage :

The records are stored in the files. Those files can be

lost or teared but with the computerized system this

problem can be rectified.


LIMITATIONS

OF

EXITING SYSTEM
LIMITATIONS OF EXITNG SYSTEM
The head of attendance department have to maintain
records like –
1) At what time an employee is entered and exit from
the company.
2) Whether the employee is absent or present?
3) How many and what kinds of leaves has been taken
by an employee?
4) Whether an employee has done over time if yes then
on what time it is ended.
This all work if done on paper causes following limitations
of manual system-
1. Manually manage all the data of employee personal
information; employee organization information,
employee attendance information, and employee
leave information. It is a very time consuming
process and required more manpower to manage
these records.
2. Manually arranged the punched cards according to
the sequence of group number, DCC and token wise.
3. Manually managed the attendance data of all
employees month wise is very tedious work and send
that monthly data to C.S.D. department.
4. Manually arranged the leave form according to the
sequence of group, DCC and token. Leave forms are
recognized by their color.
5. Manually managed the leaves of all employees are a
very time consuming and tedious work. When an
employee takes the leave, the timekeeper marked
their leave in leave register and calculates their
leave balances manually.
PROPOSED

SYSTEM
PROPOSED SYSTEM

The proposed system is the computerization of “Attendance System” overcoming


most of the limitations of the manual system. The present system has been developed
in ‘C’ programming language. It is the menu driven package. Any beginner can
operate the system without in depth knowledge of language from a list of options by
simply pressing keys and then enter key.

In this project we maintain the record about personal


information of the employee such as employee name, ID
number, contact no, address, staff, record of entering time
and exit time of employee, record about status of an
employee i.e. the employee is present or absent today,
records about types of leaves and number of leaves taken
by employee which are also required for the calculation of
attendance, record about over time of the employee for
that particular day. Many times we want to change the
entries of the records for this we use update facility. If a
user wants to view the record of an employee then he/she
can easily view it by view option. And in case if we want to
delete any record then we can easily delete it by delete
option in menu.

The main menu consists of following options-


 Employee Records
 In
 Out
 Overtime
 Display
 Exit
This option contains four options, the first option of
Employee Record is to store the record about information
of employee, and it contains the Employee ID, Name,
Address, Department, Date of Joining, Balance PL and CL.
The ‘View’ option is used to display the information of a
particular employee on the screen. The ‘Update’ option is
used to make some modifications when required. The
‘Display’ option is used to display the record of a
particular employee. Following are the options-

Now the second option is ‘IN’. This option gives the


attendance means present time of the employee, for this
process the system requires the ID number of the
employee and the status of the employee i.e. whether
employee is present or absent or on leave.

Now the third option is ‘OUT’. This option gives the exit
time of an employee, for this it requires ID number of the
employee.

Fourth option is ‘DISPLAY’, which displays the report of


attendance of employee. For this it requires ID number,
present month, and year.
Finally, the fifth option is of ‘EXIT’, which helps us to exit
from main menu.

HARDWARE
&
SOFTWARE
REQUIREMENT
HARDWARE & SOFTWARE
REQUIREMENTS
Hardware

Hardware refers to the physical pieces of the system: at the very least, the

system unit, monitor, and keyboard. We probably also have a mouse and

printer and maybe a few bells and whistles.

Computer technology has evolved at an amazed rate during past few

decades. Today a computer cannot only compute, store information but at

the same time it provides a variety of software for entertainment purpose.

This project has its hardware & software requirements as follows:-

System

The system unit houses the heart of your computer. This Unit is where

the microprocessor chip, disk drives, and the power supply are located.

Microprocessor

The microprocessor provides the brains of your computer, an amazing

conglomeration of electronic microminiaturized into a single silicon chip.

The microprocessor executes the program commands that make up a

word processor, a cad/cam system, a solitaire game and the many other
programs that run on your computer. You should be able to see the chip

on your system board.

Coprocessor

Your system also might have a math coprocessor handles math better

than the main processor does, significantly speeding up programs that

must do a lot of heavy calculating.

Memory

Your memory components store the programs and data currently in use.

These components provide short-term, high-speed storage closely linked

to the microprocessor for fast retrieval.

Keyboard

Your keyboard works much like a typewriter, with some important

differences. In addition to the regular typing area, it has function keys, a

keypad, and some special Purpose keys.


HARDWARE REQUIREMENTS

The computer as a machine & all other equipments associated with it

constitute hardware & the hardware requirements for the best results of

this project are as follows: -

1 P-4 processor and above

2 256 MB RAM

3 800 * 640 resolutions

4 104 keys keyboard

5 Color monitor

Data Abstraction and Encapsulation: the wrapping up of data and

functions into a single unit (called class) is known as encapsulation. These

functions provide the interface between the object’s data and the program.

This insulation of data from direct access by the program is called data

hiding or information hiding.

Abstraction refers to the act of representing essential features without

including the background details or explanations. Classes use the concept of

abstraction and are defined as a list of abstract attributes, such as size,

weight and cost and functions to operate these attributes.


SYSTEM ANALYSIS

&

DESIGN
SYSTEM DESIGN

System design is the bridge between analysis and


development of the software. The design phase is a
translation from a user-oriented document into
programmer-oriented document. The main objective of
the design phase is to produce model of the system.
It includes following major phases-
1. OUTPUT DESIGN
2. INPUT DESIGN
3. FILE DESIGN

These phases are performed in a sequence called steps,


which simply defines the growth of the project at design
time.

OUTPUT DESIGN

Output designing is concerned with planning how the object


will be put forward to the users. The major concern of the
user in system design is always with the output. Therefore,
the output design must be designed intelligently and must
decision impelling. Once the output report formats and
contents have been fixed the system analyst can work
backward and draw the input (transaction) and master file
layout and also the computation to be performed to device
the figure in output reports.

The design of output format in this project is as follows-

View a Particular Employee

Enter the id of employee:


Name is:
Address is:
Department is:
Date of join is:
Contact No is:
PL is:
CL is:

Display the information of an Employee

Day Time Of In Time Of Out Status


Over Time ended
INPUT DESIGN

Input design is the most important part of the system


design. Here, inputs of the system are decided. Great care
should take in designing the input so that there is no conflict
in the output. The efficiency of the system depends upon the
input given to the system.

The designs for input format in this project for various


modules are as under-
FRONT PAGE
EMPLOYEE RECORD

IN

OUT

OVER TIME

DISPLAY

EXIT

EXIT

DISPLAY

On selecting the ‘EMPLOYEE RECORD’ option from main


menu we get another menu-

EXIT
EMPLOYEE RECORD FORM
ADD

VIEW

UPDATE

DELETE

EXIT

On selecting ‘ADD’ option from EMPLOYEE RECORD FORM


we get following format in which user have to input the
entries-

Your ID NO. Is:


Enter Name:
Enter Address:
Enter Contact No.:
Enter Department:
Enter Date of Joining (dd/mm/yy):
No. Of PL Leave:
No. Of CL Leave:

Do U want to add another Y/N?


Now on selecting ‘VIEW’ option from the above menu it
prompts for employee id number and we get the following
format-
Enter the id of employee:
Name is:
Address is:
Department is:
Date of join is:
Contact no is:
PL is:
CL is:

Now on selecting the ‘UPDATE’ option from the above menu


it prompts for employee id number and after that it prompts
for new name new department new contact number and we
get the following format-

Enter the id no
Old name is:
Enter new name:
Old dept. is:
Enter new dept:
Old contact no is:
Enter new contact no:
Now we have the ‘DELETE’ option in this menu and if we
want to remove any record of employee then it prompts for
id number and we get the following format-
Enter the id of employee:
Record Deleted

Now on selecting the ‘EXIT’ option from the submenu we


come back on the main menu and where we get more
options including employee record option.

On selecting ‘IN’ option from main menu the program


prompts for the id number of employee and the status of
employee whether employee is present or absent or on
leave and we get the following format-

Enter id No
Enter Status of the Employee
Time Of attendance:

Status 0 ====> Absent


Status 1 ====> Present
Status 2 ====> On Leave
Now the next option in main menu is of ‘OUT’ which gives
the time of exit of employee and prompts for the id number
of the employee and give the following format-

Jan2010t.007
Enter id No
Time of exit:
Now the next option is of ‘OVER TIME’ which gives
information of ending time of over time of employee on that
particular day, it again prompts for id number of employee
and the format is as follows-

Jan2010r.007
Enter id No
End of Over Time

Now the next option is of ‘DISPLAY’, which is for displaying


the record of the employee, for this it prompts for the id
number of employee, current month, and current year, and
gives the following format-

Enter ID No.
Enter Month in digit
Enter Year
And on pressing enter we get the format of output which is
as follows-

Day Time of In Time of Out Status over


Time Ended

And the last option is ‘EXIT’ which is used to exit from the
main menu.

FILE DESIGEN

This phase of designing shows the process of data files


used to store required data in desired format.

struct employee
{
char name[20];
int id no;
char address[20];
char doj [10];
char ph[10];
char dept[10];
int pl;
int cl;
char next;
};

name- employee name


id no- employee ID number
address- employee address
doj- date of joining of employee
ph- contact number of employee
dept- department of employee
pl- number of privilege leave taken by employee
cl- number of casual leave taken by employee
struct employee s1, s2
struct attendance
{
int id no;
int status;
struct time1
{
int min, hour, sec;
} t1;
int date;
char next;
} a1;
id no- employee ID number
Status- gives information about whether employee is
present or absent or on leave
min, hour, sec- it gives the time of in of the employee in
minute hour second
date- current date

struct out
{
int id no;
struct time2
{
int min, hour, sec;
} t1;
int date;
char next;
} a2;

id no- employee ID no
min, hour, sec- it gives the time of out of employee in
minute hour seconds
date- current date

struct overtime
{
Int id no;
struct time3
{
int min, hour, sec;
} t1;
int date;
char next;
} a3;

id no- employee ID number


min, hour, sec- it shows the time at which the over time of
employee is ended.
CODING
CODING

#include<stdio.h>
#include<dos.h>
#include<graphics.h>
#include<stdlib.h>
#include<conio.h>
struct employee
{
char name[20]; int idno; char address[20]; char doj[10];
char ph[10]; char dept[10]; int pl; int cl;char next;
};
Struct employee s1, s2;
struct attendence
{
int idno;
int status;
struct time1
{
int min, hour, sec;
} t1;
int date;
char next;
} a1;
struct out
{
int idno;
struct time2
{
int min, hour, sec;
} t1;
int date;
char next;
} a2;
FILE *fp,*ft,*fc;
struct overtime
{
int idno;
struct time3
{
int min, hour,sec;
} t1;
int date;
char next;
} a3;
char* convert(int);
char* filename(int,int);
void dis();
void box(int);
int presskey();
int select();
int cal_over(int);
void update();
FILE *fp,*ft;
void display()
{
int id, mon,year,i,ot,flag;
char *c1,att[20],out[20],over[20],str[20];
clrscr();
printf("Enter ID No. ");
scanf("%d", &id);
printf("Enter Month in digit ");
scanf("%d",&mon);
printf("Enter Year ");
scanf("%d",&year);

c1=filename (mon,year);
While (*c1)
{
att[i]=out[i]=over[i]=*c1;
c1++;
i++;
}
out[i]=over[i]=att[i]='\0';
strcat(over,"r");
strcat(over,".007");
strcat(out,"t");
strcat(out,".007");
fp=fopen(att,"a+");
ft=fopen(over,"a+");
fc=fopen(out,"a+");
clrscr();
printf("Day Time of In Time of Out Status
Over Time Ended \n");
while(!feof(fp))
{
flag=0;
fread(&a1,sizeof(a1),1,fp);
if(a1.idno==id)
{
rewind(fc);
while(!feof(fc))
{
fread(&a2, sizeof(a2),1,fc);
if(a2.date==a1.date && a2.idno==id)
break;
}
rewind(ft);
while(!feof(ft))
{
fread(&a3,sizeof(a3),1,ft);
if(a3.date==a1.date && a3.idno==id)
{
flag=1;
break;
}
}
if(flag==0)
{
ot=0;
}
else
ot=cal_time(a3.t1.hour);
switch (a1.status)
{
case 0:
strcpy(str,"Absent");
break;
case 1:
strcpy(str,"Present");
break;
case 2:
strcpy(str,"On Leave");
break;
}
printf("%d %d:%d:%d %d:%d:%d %s
%d:%d:
%d\n",a1.date,a1.t1.hour,a1.t1.min,a1.t1.sec,a2.t1.hour,a
2.t1.min,a2.t1.sec,str,ot,a3.t1.min,a3.t1.sec);
}
}
getch();
}
int cal_time(int h)
{
return(h-16);
}
Void overtime()
{
struct date d1;
struct time t;
char *c,name[20];
int i=0;
getdate(&d1);
c=filename(d1.da_mon,d1.da_year);
while(*c)
{
name[i]=*c;
c++;
i++;
}
name[i]='\0';
strcat(name,"r");
strcat(name,".007");
puts(name);
fp=fopen(name,"a+");
printf("Enter id No ");
scanf("%d", &a3.idno);
a3.date=d1.da_day;
gettime(&t);
a3.t1.min=t.ti_min;
a3.t1.hour=t.ti_hour;
a3.t1.sec=t.ti_sec;
a3.next='\n';
printf("End of Over Time %d:%d:
%d",a3.t1.hour,a3.t1.min,a3.t1.sec);
fwrite(&a1,sizeof(a3),1,fp);
fclose(fp);
getch();
}

void out()
{
struct date d1;
struct time t;
char *c,name[20];
int i=0;
getdate(&d1);
c=filename(d1.da_mon,d1.da_year);
while(*c)
{
name[i]=*c;
c++;
i++;
}
name[i]='\0';
strcat(name,"t");
strcat(name,".007");
puts(name);
fp=fopen(name,"a+");
printf("Enter id No ");
scanf("%d",&a1.idno);
a2.date=d1.da_day;
gettime(&t);
a2.t1.min=t.ti_min;
a2.t1.hour=t.ti_hour;
a2.t1.sec=t.ti_sec;
a2.next='\n';
printf(" Time of exit : %d:%d:
%d",a2.t1.hour,a2.t1.min,a2.t1.sec);
fwrite(&a1,sizeof(a2),1,fp);
fclose(fp);
getch();
}

void take_att()
{
struct date d1;
struct time t;
char *c,name[20];
int i=0;
getdate(&d1);
c=filename(d1.da_mon,d1.da_year);
while(*c)
{
name[i]=*c;
c++;
i++;
}
name[i]='\0';
strcat(name,".007");
//puts(name);
gotoxy(5,20);
printf(" Status 0 ====> Absent \n");
printf(" Status 1 ====> Present \n");
printf(" Status 2 ====> On Leave \n");
gotoxy(1,1);
fp=fopen(name,"a+");
printf("Enter id No ");
scanf("%d",&a1.idno);
printf("Enter Status of the Employee ");
scanf("%d",&a1.status);
a1.date=d1.da_day;
gettime(&t);
a1.t1.min=t.ti_min;
a1.t1.hour=t.ti_hour;
a1.t1.sec=t.ti_sec;
a1.next='\n';

printf(" Time Of attendence : %d:%d:


%d",a1.t1.hour,a1.t1.min,a1.t1.sec);
fwrite(&a1,sizeof(a1),1,fp);
fclose(fp);
getch();
}
void entry()
{
int i,j,id=1;
char ch;
clrscr();
fp=fopen("employee.007","r");
if(fp==NULL)
id=1;
else
{
while(!feof(fp))
{
fread(&s1,sizeof(s1),1,fp);
}
id=s1.idno+1;
fclose(fp);
}
fp=fopen("employee.007","a+");
do
{
printf("Your ID No is : %d\n",id);
fflush(stdin);
printf("Enter Name : ");
gets(s1.name);
fflush(stdin);
printf("Enter Address : ");
gets(s1.address);
fflush(stdin);
printf("Enter Contact No : ");
gets(s1.ph);
fflush(stdin);
printf("Enter department : ");
gets(s1.dept);
fflush(stdin);
printf("Enter date of joining(dd/mm/yy) : ");
gets(s1.doj);
fflush(stdin);
printf("No of PL Leave: ");
scanf("%d",&s1.pl);
fflush(stdin);
printf("No of CL Leave: ");
scanf("%d",&s1.cl);
s1.idno=id;
s1.next='\n';
fwrite(&s1,sizeof(s1),1,fp);
printf("Do U want to add another Y/N");
ch=getche();
clrscr();
id=id+1;
}while(ch=='y'||ch=='Y');
fclose(fp);
getch();
}
void view()
{
int id,flag=0;
clrscr();
printf("enter the id of employee :");
scanf("%d",&id);
fp=fopen("employee.007","r");
if(fp==NULL)
printf("file is not found ");
while(!feof(fp))
{
fread(&s1,sizeof(s1),1,fp);
if(s1.idno==id)
{
printf("Name is : %s\n",s1.name);
printf("Address is : %s\n",s1.address);
printf("Department is : %s\n",s1.dept);
printf("Date of join is : %s\n",s1.doj);
printf("Contact No is : %s\n",s1.ph);
printf("PL is : %d\n",s1.pl);
printf("CL is : %d\n",s1.cl);
flag=1;
break;
}
}
if(flag==0)
printf("Record is not found ");
getch();
}
void del()
{
int id,flag=0;
clrscr();
printf("enter the id of employee :");
scanf("%d",&id);
fp=fopen("employee.007","r");
ft=fopen("temp.007","w");
if(fp==NULL)
printf("file is not found ");
while(!feof(fp))
{
fread(&s1,sizeof(s1),1,fp);
if(s1.idno!=id)
fwrite(&s1,sizeof(s1),1,ft);
else
flag=1;
}
remove("employee.007");
rename("temp.007","employee.007");
if(flag==0)
printf("Record is not found ");
else
printf("Record Deleted ");
getch();
}
char* filename(int mon,int year)
{
int i=0;
char *ch,d[15],y[10];
clrscr();
ch=convert(mon);
while(*ch)
{
d[i]=*ch;
ch++;
i++;
}
d[i]='\0';
itoa(year,y,10);
strcat(d,y);
return(d);
}

char* convert(int mon)


{
char c[7];
switch(mon)
{
case 1:
strcpy(c,"jan");
// printf("%s %ul\n",c,&c);

return(c);
case 2:
strcpy(c,"feb");
return(c);
case 3:
strcpy(c,"march");
return(c);
case 4:
strcpy(c,"april");
return(c);
case 5:
strcpy(c,"may");
return(c);
case 6:
strcpy(c,"june");
return(c);
case 7:
strcpy(c,"july");
return(c);
case 8:
strcpy(c,"aug");
return(c);
case 9:
strcpy(c,"sep");
return(c);
case 10:
strcpy(c,"oct");
return(c);
case 11:
strcpy(c,"nov");
return(c);
case 12:
strcpy(c,"dec");
return(c);
}
return(0);
}

int select()
{
int j,k=1;
int gd=0,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
box(6);
setbkcolor(6);
setcolor(14);
settextstyle(10,0,4);
outtextxy(165,5,"FRONT PAGE");
setcolor(10);
settextstyle(1,0,4);
outtextxy(153,85,"Employee Record");
outtextxy(153,140,"In");
outtextxy(153,195,"Out");
outtextxy(153,250,"Over Time");
outtextxy(153,305,"Display");
outtextxy(153,360,"Exit");

setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(153,85,"Employee Record");

j=presskey();
while(j!=28)
{
switch(j)
{
case 80:
if(k==6)
{ k=1; }
else
{ k++; }

switch(k)
{
case 1:
setfillstyle(SOLID_FILL,1);
floodfill(125+5,365+5,getmaxcolor());
outtextxy(153,360,"Exit");

setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(153,85,"Employee Record");
break;
case 2:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(153,140,"In");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(153,85,"Employee Record");
break;
case 3:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(153,195,"Out");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(153,140,"In");
break;
case 4:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(153,250,"Over Time");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(153,195,"Out");
break;
case 5:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(153,305,"Display");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(153,250,"Over Time");
break;
case 6:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,365+5,getmaxcolor());
outtextxy(153,360,"Exit");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(153,305,"Display");
break;
}//80 k
break;
case 72:
if(k==1)
{ k=6; }
else
{ k--;}
switch(k)
{
case 1:
setfillstyle(SOLID_FILL,1);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(153,140,"In");
setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(153,85, "Employee Record");
break;
case 2:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(153,140,"In");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(153,195,"Out");
break;
case 3:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(153,195,"Out");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(153,250,"Over Time");
break;
case 4:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(153,250,"Over Time");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(153,305,"Display");
break;
case 5:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(153,305,"Display");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,365+5,getmaxcolor());
outtextxy(153,360,"Exit");
break;
case 6:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,365+5,getmaxcolor());
outtextxy(153,360,"Exit");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(153,85,"Employee Record");
break;
}//end 72 k//
default:
break;
}//Switch(j)
j=presskey();
}//While Loop j!=28
restorecrtmode();
return(k);
}
void box(int m)
//void main()
{
//int m=6;
int i,j,x1,x2,y1,y2;
x1=125; y1=40;
x2=475; y2=70;
for(i=1;i<=m+1;i++)
{
if(i!=1)
{
rectangle(x1,y1,x2,y2); //(125,40,475,70)
setfillstyle(SOLID_FILL,1);
floodfill(x1+5,y1+5,getmaxcolor());
}
y1=y2+20;
y2=y1+35;
}
x1=120; y1=35;
x2=480; y2=75;
for(i=1;i<=m+1;i++)
{
if(i!=1)
{
//setcolor(12);
rectangle(x1,y1,x2,y2); //(120,35,480,75)
setfillstyle(SOLID_FILL,7);
floodfill(x1+2,y1+2,getmaxcolor());
}
y1=y2+10;
y2=y1+45;
}
}
int presskey()
{
union REGS i,o;
while(!kbhit());
i.h.ah=0;
int86(22,&i,&o);
return(o.h.ah);
}
int select1()
{
int j,k=1;
int gd=0,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
box(5);
setbkcolor(6);
setcolor(14);
settextstyle(10,0,4);
outtextxy(50,5,"Employee Record Form");
setcolor(10);
settextstyle(1,0,4);
outtextxy(253,85,"Add");
outtextxy(253,140,"View");
outtextxy(253,195,"Update");
outtextxy(253,250,"Delete");
outtextxy(253,305,"Exit");
setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(253,85,"Add");
j=presskey();
while(j!=28)
{
switch(j)
{
case 80:
if(k==5)
{ k=1; }
else
{ k++; }
switch(k)
{
case 1:
setfillstyle(SOLID_FILL,1);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(253,305,"Exit");
setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(253,85,"Add");
break;
case 2:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(253,140,"View");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(253,85,"Add");
break;
case 3:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(253,195,"Update");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(253,140,"View");
break;
case 4:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(253,250,"Delete");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(253,195,"Update");
break;
case 5:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(253,305,"Exit");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(253,250,"Delete");
break;
}//80 k
break;
case 72:
if(k==1)
{ k=5; }
else
{ k--;}
switch(k)
{
case 1:
setfillstyle(SOLID_FILL,1);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(253,140,"View");
setfillstyle(SOLID_FILL,4);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(253,85, "Add");
break;
case 2:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,145+5,getmaxcolor());
outtextxy(253,140,"View");

setfillstyle(SOLID_FILL,1);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(253,195,"Update");
break;
case 3:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,200+5,getmaxcolor());
outtextxy(253,195,"update");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(253,250,"Delete");
break;
case 4:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,255+5,getmaxcolor());
outtextxy(253,250,"Delete");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(253,305,"Exit");
break;
case 5:
setfillstyle(SOLID_FILL,4);
floodfill(125+5,310+5,getmaxcolor());
outtextxy(253,305,"Exit");
setfillstyle(SOLID_FILL,1);
floodfill(125+5,90+5,getmaxcolor());
outtextxy(253,85,"Add");
break;
}//end 72 k//
default:
break;
}//Switch(j)
j=presskey();
}//While Loop j!=28
restorecrtmode();
return(k);
}

void main()
{
int ch,ch2,f;
dis();
while(1)
{
f=0;
ch=select();
switch(ch)
{
case 1:
while(f!=1)
{
ch2=select1();
switch(ch2)
{
case 1:
entry();
break;
case 2:
view();
break;
case 3:
update();
break;
case 4:
del();
break;
case 5 :
f=1;
break;
}}
break;
case 2:
take_att();
break;
case 3:
out();
break;
case 4:
overtime();
break;
case 5:
display();
break;
case 6:
exit(0);
} }}
void dis()
{
int gd=1,gm;
initgraph(&gd,&gm,"c:\\tc\\bgi");
setbkcolor(6);
settextstyle(3,0,3);
outtextxy(20,0,"Attendence Management");
outtextxy(100,25,"System");
settextstyle(4,0,2);
outtextxy(0,75,"Submitted To :-");
outtextxy(175,75,"Submitted By :-");
settextstyle(3,0,3);
outtextxy(0,100,"G.N.Khalsa. College");
outtextxy(175,100,"SAGAR");
getch();
closegraph();
}
void update()
{
int id;
long int s;
s=sizeof(s1);
printf("Enter Id No ");
scanf("%d",&id);
fp=fopen("employee.007","r+");
while(!feof(fp))
{
fread(&s1,sizeof(s1),1,fp);
if(s1.idno==id)
{
printf("Old Name is : %s \n",s1.name);
printf("Enter New Name : ");
scanf("%s",s1.name);
fflush(stdin);
printf("Old dept. is : %s \n",s1.dept);
printf("Enter New dept : ");
scanf("%s",s1.dept);
fflush(stdin);
printf("Old Contact no is : %s \n",s1.ph);
printf("Enter New Contact No : ");
scanf("%s",s1.ph);
s1.idno=id;
fseek(fp,-s,SEEK_CUR);
fwrite(&s1,sizeof(s1),1,fp);
break;
} }
fclose(fp); }

OUTPUT
OUTPUT

Addition of New Record

Your ID No is: 1
Enter Name: Ravi Yadav
Enter Address: 25,Model Colony, Ynr.
Enter Contact No: 235689
Enter department: 211115
Enter date of joining (dd/mm/yy): 12/09/2012
No of PL Leave: 26
No of CL Leave: 12
DOES U want to add another Y/N

View a Particular Employee

Enter the id of employee: 1


Name is: Ravi Yadav
Address is: 25,Model Colony, Ynr
Department is: 211115
Date of join is: 12/09/2012
Contact No is:235689
PL is: 26
CL is: 12
Attendance – IN

Enter id No 1
Enter Status of the Employee 1
Time Of attendance: 13:26:18

Status 0 ====> Absent


Status 1 ====> Present
Status 2 ====> On Leave

Attendance – OUT

Jan2011 t.007
Enter id No 1
Time of exit: 18:32:6
Over Time

Jan2011 r.007
Enter id No 1
End of Over Time 18:30:7

Display the record of a particular employee

Day Time of In Time of Out Status Over


Time Ended
8 13:26:18 18:32:11 Present
0:2:31
ADVANTAGES
ADVANTAGES OF THE SYSTEM

 As discussed earlier this system ensures security in the organisation.

 It helps in keeping a systematic record of the products hence avoiding

trespassing.

 In case of any emergency its useful for quick enquiry purpose. As

explained above because of the manual system a number of problems

were faced by the organisation. Due to the missing entry of the

products, computers many of these problems are removed.

Some of the advantages of computers are as follows:

A) Speed: being electronic machine computers are fast. When project is

prepared with the help of the computers a lot of time is saved.

In manual system the process used to take number of computerised system

it is a matter of minutes.

a) Accuracy: It is another important advantage of the computer. In manual

system chances of errors are large. But in computerised system these

chances are removed because gate passes are to be

Prepared under control of programs.


B) Less man power: Computer can perform data processing jobs at a very

high speed. Due to this it can replace a number of persons used to perform

any particular job. This finally results in reducing the data processing cost.

c) More reliable: Being electronic media this is more easier to handle and

reliable as compared to large number of papers.

d) Students records: with the advantage of computers time is saved, gate

passes are prepared with accuracy, documents are obtained easily and so

on.
LIMITATIONS

OF

THE PROJECT
LIMITATIONS OF THE PROJECT

Every system has its own type of limitations and no


system is perfect system. My project also suffers from
limitations:
1. This system only gives day wise attendance, not
monthly or for whole year.
2. Gives information about casual leave and privilege
leave taken by an employee all other leaves are not
taken into account.
3. Don’t give any information about how many leaves
are availed.
4. In this system, when we add an employee in the
organization. The system not asked the DCC No.,
Token Number, Designation, Qualification, and
Father/Husband Name.
5. This system not displays the complete information
like Name, Designation, DCC No., Token Number and
Department, when the employee marked their
attendance.
6. There is no check on employee attendance. When an
employee marked his attendance ‘Present’, the
system again accepts its attendance with different
time. The system not displays an error message like
“Employee Already Present in the Organization”.
7. Similarly, there is no check on employee ‘OUT’, when
employee relived from the organization. The system
not display error message like “Employee not Present
in the Organization”.
8. There is no check on employee over time.
9. In this system, there is no provision of leave
management. There is no option to record the leaves
of employees.
FURTHER

SCOPE
FURTHER SCOPE
Following are the areas to be looked forward for the
advancement of project-
1. Add the feature into the existing system gives
previous month and year attendance, leave,
overtime and employee personal information.
2. Add a module to maintain all types of leaves of all
employees.
3. Add a module to gives the information of all
leaves, which are either availed or not availed by
the employee.
4. Add the module to calculate the payment of PL of
all employees.
5. Add some other fields DCC No., Token Number,
Designation, Qualification, and Father/Husband
Name in the addition of employee module.
6. Add some information like Name, Designation,
DCC No., Token Number and Department display
on screen when the employee marked their
attendance.
7. Add the check on employee attendance. When an
employee marked his attendance ‘Present’, the
system not accepts the attendance again and
displays an error message like “Employee Already
Present in the Organization”.
8. Similarly, add the check employee ‘OUT’, when
employee relived from the organization. The
system not accepts it again and display error
message like “Employee not Present in the
Organization”.
9. Add some checks on employee over time.
CONCLUSION

We developed this project in such a way that if be user friendly project

to handle the Attendance System

We hope user will find no difficulty while operating this project

 Every subject has its own record.

 Even it has records of all the number you ever required by the

students.

 Provision can also be made to keep the record of the students.

 Computerized systems are much faster than the manual system.

 This is due to high speed of the system that is used.

Hope you will learn from this program as much as have. This project

was a learning experience of us. By working on this project we were able to

develop many skills and knowledge about playing with data files.
BIBILOGRAPHY
BIBILOGRAPHY

While making this project, I have referred the following books


for getting an idea to make this project and also for
understanding the complete C language. The names of the
authors of the books referred by me are as follows: -
Book name Author name
LET US C - YASHWANT KANITKAR
PROGRAMMING IN C - SHAUM SERIES
COMPUTER GRAPHICS - JANAKI RAMAN
GRAPHICS IN C - M.MAHAPATRA.

You might also like