You are on page 1of 3

Chemistry, C++, Physics, Maths, Biology, Social Science Home Biology C++ Chemistry IP Maths Physics Social Science

Home > C++ > C++ Project on Payroll Management

C++ Project on Payroll Management


Payroll Management
#include<fstream .h>#include<graphics .h>#include<string .h>#include<iostream .h>#include<conio . h>#include<dos .h>#include<iomanip .h>#include<process .h>struct roll { char na[20],des[20]; int co ; float sal,tax,hra,gr,da,np; }oll; fstream pay;char c;int l;char choice;void dev(){ clrscr();for(int x=50;x>= 20;x--){ textcolor(WHITE+LIGHTGRAY); delay(160); gotoxy(x,12); cputs(" P R O J E C T "); gotoxy(x,14); c puts(" D E V E L O P E D B Y : "); gotoxy(x,16); cputs("Navi Arora");} gotoxy(x,24); cputs("PRESS ANY KEY TO CONTINUE"); getch();}void main(){ clrscr(); dev();int gdriver=DETECT,gmode,errorcode; in itgraph(&gdriver,&gmode,"c:\\tc\\bgi"); errorcode=graphresult();if(errorcode!=grOk){cout<<grapherrormsg(err orcode)<<"\n"; getch();} settextstyle(1,0,7); outtextxy(75,1," W E L C O M E "); outtextxy(275,150,"T O "); o uttextxy(65,300," P A Y R O L L M A N A G E M E N T S O F T W A R E "); outtextxy(9,400,"Press any key to continue "); getch(); cleardevice();do{ cleardevice(); textcolor(RED); settextstyle(TRIPLEX_FO NT,HORIZ_DIR,3); outtextxy(250,100,"\n*MENU*"); outtextxy(250,150,"\n************"); outtextxy(150 ,200,"\n 1.REPORT "); outtextxy(150,250,"\n 2.PAY SLIP "); outtextxy(150,300,"\n 3.ADD "); outtextxy(150,350,"\n 4.EXIT "); outtextxy(150,400,"\n ENTER YOUR CHOICE(1,2,3,4):"); gotoxy(74,2 5); choice=getch(); cleardevice();switch(choice){ case'1': cleardevice(); rectangle(0,0,600,450); line(0, 50,600,50); line(0,90,600,90); gotoxy(30,3); cout<<" EMPLOYEE DETAILS "; gotoxy(3,5); c out<<"CODE"; gotoxy(10,5); cout<<"NAME"; gotoxy(20,5); cout<<"POST"; gotoxy(30,5); cout<<"BASIC"; gotoxy(40,5); cout<<"GROSS PAY"; gotoxy(52,5); cout<<"DEDU CTION"; gotoxy(67,5); cout<<"NETPAY"; line(50,90,50,450); line(140,90,140,450); line(220,90,220,4 50); line(290,90,290,450); line(390,90,390,450); line(490,90,490,450); int k=7; pay.open("oll.dat",ios: :in); if(!pay) { cout<<"\n\nFile Not Found...\nProgram Terminated!"; exi t(0); } pay.seekg(0); while(!pay.eof()) { pay.read((char*)&oll,sizeof(oll)); if(!pay.eof()) { gotoxy(3,k); cout<<oll.co; gotoxy(10,k); cout<<oll.na; go toxy(20,k); cout<<oll.des; gotoxy(30,k); cout<<oll.sal; gotoxy(42,k); cou t<<oll.gr; gotoxy(52,k); cout<<oll.tax; gotoxy(67,k); cout<<oll.np; k=k+1; } } getch(); pay.close(); cleardevice(); break; case'2': cleardevice(); int en o,flag=0; cout<<"\n Enter employee number to be searched :"; cin>>eno; pay.open("oll. dat",ios::in); if(!pay) { cout<<"\n\nFile Not Found...\nProgram Terminated!"; exit(0); } pay.seekg(0); while(!pay.eof()) { pay.read((char*)&oll,sizeof(oll)); if(!pay.eof()) { if(oll.co==eno) { cout<<"\n*********************************************"; cout <<"\n SUSHMA ENTERPRISES "; cout<<"\n*************************************** ******"; cout<<"\nEMPLOYEE CODE :"<<oll.co; cout<<"\nNAME OF EMPLOYEE :"<<oll.na; cout<<"\nEMPLOYEE DESIGNATION :"<<oll.des; cout<<"\nBASIC SALARY :"<< oll.sal; cout<<"\nDEARNESS ALLOWANCE :"< <oll.da; cout<<"\nHOUSE RENT ALLOWANCE :"<<oll.hra; cout<<"\nGROSS PAY :"<<oll.gr; cout<<"\nTAX :"<<oll.tax; cout<<"\nNET PAY :"<<oll.np; cout<<"\n*********************************************"; flag=1; getch(); break; } } } if(flag==0) { cleardev ice(); cout<<"\n\n\n\n\n\n\t\t\tNo such employee"; getch(); } cleardevice(); pay.close (); break; case'3': char ch; pay.open("oll.dat",ios::in|ios::out|ios::app);// ios::ate|ios::app); if(!pay) { cout<<"\n\nFile Not Found...\nProgram Terminated!"; exit(0); } do { cleardevice(); cout<<"\n NAME:";

cin>>oll.na; cout<<"\n EMPLOYEE CODE"; cin>>oll.co; cout<<"\n EM PLOYEE DESIGNATION:"; int ch; cout<<"\n1.SUBSTAFF"; cout<<"\n2. CLERK"; cout<<"\n3.MANAGER"; cout<<"\n ENTER YOUR CHOICE:(1/2/3)"; cin>>ch; switch(ch) { case1: oll.sal=1000; oll.hra=100; oll.da=oll.sal*1.10; oll.t ax=2*(oll.sal)/100.0; strcpy(oll.des,"SUBSTAFF"); break; case2: oll.sal=200 0; oll.hra=200; oll.da=200; oll.tax=10*(oll.sal)/100.0; strcpy(oll.des,"CLERK"); break; case3: oll.sal=14000; oll.hra=400; oll.da=400; oll.tax=20*(oll.sal)/100.0; strcpy(oll.des,"MANA GER"); break; default:cout<<"\n INPUT IS INVALID"; break; } oll.g r=oll.sal+oll.hra+oll.da; oll.np=oll.gr-oll.tax; pay.write((char*)&oll,sizeof(oll)); cout<<"\n TO CONTINUE ADDING DATA(Y/N):"; cin>>c; }while((c=='Y')||(c=='y')); pay.close(); b reak;case'4': exit(0);}}while(choice!=4); closegraph();}</process></iomanip></dos></conio></iostream> </string></graphics></fstream>

Related:
C++ Project on Shuffle Game Shuffle Game #include #include #include #include #include #include #include ...

C++ Project on Address Book Address Book C++ Project on Library Management Library #inc...

#include #include #include #include #include #include #include ... #include #include #include #include #include #include #include //

C++ Project on Salary Management SALARY MANAGMENT ********************************************************** ... Comments (0)Trackbacks (0)Leave a commentTrackback 1. No comments yet.

1. No trackbacks yet. Name (required)E-Mail (will not be published) (required)Website Subscribe to comments feed Notify me of follow-up comments by email. Notify me of new posts by email. C++ Project on Report Card MakingC++ Project on Matrix Calculator

Project Work
Chemistry Project on Estimation of Content of Bone Ash C++ Project on School Management Biology Project on Ultraviolet Rays Mathematics Project on Pythagoras Theorem and its Extension Chemistry Project on Presence of Insecticides & Pesticides in Fruits & Vegetables

Archives
July 2010 March 2010 July 2009 May 2009 April 2009 March 2009

Tags
BankingC++ Project FileC++ Project File StructureCBSE Disaster Management ProjectCBSE Maths ProjectCBSE Maths Project on ProbabilityCBSE Maths Project TopicsCD CafeDisaster Management

Project
CBSE Maths Project Class IX CBSE Science Projects Class IX CBSE Social Science Projects CCE Projects

Top Contributors
1. 2. Abhyodaya siddhartha 3. Garima Bhardwaj 4. 5. Swathi

Top Copyright 2010 School Projects

You might also like