Add to Favorites    Make Home Page 2451 Online  
 Language Categories  
 Our Services  

Home » C++ Home » Beginners / Lab Assignments Home » INVENTORY MANAGEMENT SYSTEM

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title INVENTORY MANAGEMENT SYSTEM
Author vaibhav kaul
Author Email vaibhavkaul [at] hotmail.com
Description
Category C++ » Beginners / Lab Assignments
Hits 395900
Code Select and Copy the Code
#include <conio.h> #include <iostream.h> #include <process.h> #include <fstream.h> #include <dos.h> #include <stdio.h> #include <string.h> class shop { private: int itno,alrt,no;double cost;char name[50]; public: void getd() { clrscr(); cout<<"Enter Item Code:"; textbackground(4);cprintf(" "); gotoxy(17,1);cin>>itno; gotoxy(17,1);textbackground(0); cprintf(" "); gotoxy(17,1);cout<<itno<<endl; cout<<endl<<"Enter Item Name:"; textbackground(4); cprintf(" "); gotoxy(17,3);gets(name); gotoxy(17,3);textbackground(0); cprintf(" "); gotoxy(17,3);cout<<name<<endl; cout<<endl<<"Enter Cost:"; textbackground(4);cprintf(" "); gotoxy(12,5);cin>>cost; gotoxy(12,5);textbackground(0); cprintf(" "); gotoxy(12,5);cout<<cost<<endl; cout<<endl<<"Enter Number of Pieces Purchased:"; textbackground(4);cprintf(" "); gotoxy(34,7);cin>>no; gotoxy(34,7);textbackground(0); cprintf(" "); gotoxy(34,7);cout<<no<<endl; cout<<endl<<"Enter Low Reserve Alert:"; textbackground(4);cprintf(" "); gotoxy(25,9);cin>>alrt; gotoxy(25,9);textbackground(0); cprintf(" "); gotoxy(25,9);cout<<alrt; } void showd() { cout<<endl; cout<<"Item No.:";cout<<itno; cout<<endl<<"Item Name:";puts(name); cout<<"Cost:"<<cost; cout<<endl<<"No. of pieces in stock:"<<no; cout<<endl<<"Low Reserve alert:"<<alrt; } double retcost() {return (cost);} int retitno() {return (itno);} int retno() {return (no);} int retalrt() {return (alrt);} char *retname() {return (name);} void putno(int a) {no+=a;} void remno(int a) {no-=a;} void splshow(int line) { gotoxy(3,line);cout<<itno; gotoxy(10,line);cout<<name; gotoxy(34,line);cout<<" "<<cost; gotoxy(50,line);cout<<no; gotoxy(63,line);cout<<alrt; } }s1; //************************************************************************** //***********************Function For Main Menu***************************** //************************************************************************** char mmenu() { textbackground(0);clrscr(); int chno=1;char chkcho='1'; _setcursortype(_NOCURSOR); char a;clrscr();cout<<"a"; for (int i=15;i<60;i++) //top horizontal { gotoxy(i, 3); if (i%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int y=4;y<20;y++) //left vertical { gotoxy(15,y); if (y%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int t=4;t<20;t++) //right vertical { gotoxy(59,t); if (t%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int g=15;g<60;g++) { gotoxy(g,19); if (g%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int u=15;u<60;u++) //middle horizontal { gotoxy(u,7); if (u%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } gotoxy(1,1);textcolor(3); cprintf(" *****THE MALL*****"); gotoxy(40,21);cprintf("S.C.F. 136,Karol Bagh"); gotoxy(40,22);cprintf("New Delhi"); gotoxy(40,23);cprintf("Phone:91-6633771/72/73,9811223344"); gotoxy(33,5);cprintf("Main Menu"); gotoxy(1,21);cout<<"'<'=Up '>'=Down Enter=Select Crtl+X=Exit"; gotoxy(17,9);cprintf("(1.)MODIFY INVENTORY."); textbackground(0); fstream k; k.open("master.dat",ios::in); while (k.read((char*)&s1,sizeof(s1))) if (s1.retno()<=s1.retalrt()) textcolor(5); k.close(); gotoxy(17,11);cprintf("(2.)ORDER NEW STOCK.");textcolor(3); gotoxy(17,13);cprintf("(3.)SALE VOUCHER."); gotoxy(17,15);cprintf("(4.)SEARCH FOR PARTICULAR ITEM."); gotoxy(17,17);cprintf("(5.)Exit."); gotoxy (40,17); char ch;textbackground(4); gotoxy(17,9);cprintf(" "); gotoxy(17,9);cout<<"(1.)MODIFY INVENTORY."; x: a=getch(); if (a==46 && chno==1) // 1 to 2 { chkcho='2';chno=2; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cout<<"(1.)MODIFY INVENTORY."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)ORDER NEW STOCK."; goto x; } if (a==46 && chno==2) //2 to 3 { chkcho='3';chno=3; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cout<<"(2.)ORDER NEW STOCK."; gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; gotoxy(17,13);textbackground(4); cprintf(" "); gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; goto x; } if (a==46 && chno==3) //3 to 4 { chkcho='4';chno=4; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; gotoxy(17,15);textbackground(4); cprintf(" "); gotoxy(17,15);cout<<"(4.)SEARCH FOR PARTICULAR ITEM."; goto x; } if (a==46 && chno==4) //4 to 5 { chkcho='5';chno=5; gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cout<<"(4.)SEARCH FOR PARTICULAR ITEM."; gotoxy(17,15);cout<<"(4.)SEARCH FOR PARTICULAR ITEM."; gotoxy(17,17);textbackground(4); cprintf(" "); gotoxy(17,17);cout<<"(5.)Exit"; goto x; } if (a==44 && chno==5) // 5 to 4 { chno=4; chkcho='4'; gotoxy(17,17);textbackground(0); cprintf(" "); gotoxy(17,17);cout<<"(5.)Exit."; gotoxy(17,15);textbackground(4); cprintf(" "); gotoxy(17,15);cout<<"(4.)SEARCH FOR PARTICULAR ITEM."; goto x; } if (a==44 && chno==4) //4 to 3 { chno=3;chkcho='3'; gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cout<<"(4.)SEARCH FOR PARTICULAR ITEM."; gotoxy(17,13); textbackground(4); cprintf(" "); gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; goto x; } if (a==44 && chno==3) //3 to 2 { chno=2; chkcho='2'; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13);cout<<"(3.)SALE VOUCHER."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)ORDER NEW STOCK."; goto x; } if (a==44 && chno==2) //2 to 1 { chno=1;chkcho='1'; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cprintf("(2.)ORDER NEW STOCK."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)MODIFY INVENTORY."); goto x; } if (a==46 && chno==5) //5 to 1 { chno=1;chkcho='1'; gotoxy(17,17);textbackground(0); cprintf(" "); gotoxy(17,17);cprintf("(5.)Exit."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)MODIFY INVENTORY."); goto x; } if (a==44 && chno==1) //1 to 5 { chno=5;chkcho='5'; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cprintf("(1.)MODIFY INVENTORY."); gotoxy(17,17);textbackground(4); cprintf(" "); gotoxy(17,17);cprintf("(5.)Exit."); goto x; } textbackground(0); if (a==24)exit(0); if (a==13)return chkcho; } //************************************************************************** //***********************Function For Search Menu*************************** //************************************************************************** char smenu() { textbackground(0);clrscr(); int chno=1;char chkcho='1'; _setcursortype(_NOCURSOR); char a;clrscr();cout<<"a"; for (int i=15;i<60;i++) //top horizontal { gotoxy(i, 3); if (i%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int y=4;y<20;y++) //left vertical { gotoxy(15,y); if (y%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*"); } } for (int t=4;t<20;t++) //right vertical { gotoxy(59,t); if (t%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int g=15;g<60;g++) //bottom horizontal { gotoxy(g,19); if (g%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int u=15;u<60;u++) //middle horizontal { gotoxy(u,7); if (u%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } gotoxy(1,1);textcolor(3); cprintf(" *****THE MALL*****"); gotoxy(40,21);cprintf("S.C.F. 136,Karol Bagh"); gotoxy(40,22);cprintf("New Delhi"); gotoxy(40,23);cprintf("Phone:91-6633771/72/73,9811223344"); gotoxy(33,5);cprintf("Search Menu"); gotoxy(1,21);cout<<"'<'=Up '>'=Down Enter=Select Crtl+X=Exit"; gotoxy(17,9);cprintf("(1.)Search using item code."); textbackground(0); gotoxy(17,11);cprintf("(2.)Search using item name."); gotoxy(17,13);cprintf("(3.)List all items in stock."); gotoxy(17,15);cprintf("(4.)Print last sale voucher."); gotoxy(17,17);cprintf("(5.)Return to main menu."); gotoxy(40,17);char ch;textbackground(4); gotoxy(17,9); cprintf(" "); gotoxy(17,9);cprintf("(1.)Search using item code."); x: a=getch(); if (a==46 && chno==1) // 1 to 2 { chkcho='2';chno=2; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cout<<"(1.)Search using item code."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)Search using item name."; goto x; } if (a==46 && chno==2) //2 to 3 { chkcho='3';chno=3; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cout<<"(2.)Search using item name."; gotoxy(17,13);cout<<"(3.)List all items in stock."; gotoxy(17,13);textbackground(4); cprintf(" "); gotoxy(17,13);cout<<"(3.)List all items in stock."; goto x; } if (a==46 && chno==3) //3 to 4 { chkcho='4';chno=4; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13);cout<<"(3.)List all items in stock."; gotoxy(17,13);cout<<"(3.)List all items in stock."; gotoxy(17,15);textbackground(4); cprintf(" "); gotoxy(17,15);cout<<"(4.)Print last sale voucher."; goto x; } if (a==46 && chno==4) //4 to 5 { chkcho='5';chno=5; gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cout<<"(4.)Print last sale voucher."; gotoxy(17,15);cout<<"(4.)Print last sale voucher."; gotoxy(17,17);textbackground(4); cprintf(" "); gotoxy(17,17);cout<<"(5.)Return to main menu"; goto x; } if (a==44 && chno==5) // 5 to 4 { chno=4;chkcho='4'; gotoxy(17,17);textbackground(0); cprintf(" "); gotoxy(17,17);cout<<"(5.)Return to main menu."; gotoxy(17,15);textbackground(4); cprintf(" "); gotoxy(17,15);cout<<"(4.)Print last sale voucher."; goto x; } if (a==44 && chno==4) //4 to 3 { chno=3;chkcho='3'; gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cout<<"(4.)Print last sale voucher."; gotoxy(17,13);textbackground(4); cprintf(" "); gotoxy(17,13); cout<<"(3.)List all items in stock."; goto x; } if (a==44 && chno==3) //3 to 2 { chno=2;chkcho='2'; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13);cout<<"(3.)List all items in stock."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)Search using item name."; goto x; } if (a==44 && chno==2) //2 to 1 { chno=1; chkcho='1'; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cprintf("(2.)Search using item name."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)Search using item code."); goto x; } if (a==46 && chno==5) //5 to 1 { chno=1;chkcho='1'; gotoxy(17,17);textbackground(0); cprintf(" "); gotoxy(17,17);cprintf("(5.)Return to main menu."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)Search using item code."); goto x; } if (a==44 && chno==1) //1 to 5 { chno=5;chkcho='5'; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cprintf("(1.)Search using item code."); gotoxy(17,17);textbackground(4); cprintf(" "); gotoxy(17,17);cprintf("(5.)Return to main menu."); goto x; } textbackground(0); if (a==24) {exit(0);} if (a==13) {return chkcho;} } //************************************************************************** //***********************Function For Modifying Inventory******************* //************************************************************************** char inven() { textbackground(0);clrscr(); int chno=1;char chkcho='1';_setcursortype(_NOCURSOR); char a;clrscr();cout<<"a"; for (int i=15;i<60;i++) //top horizontal { gotoxy(i, 3); if (i%2==0) {textcolor(3);cprintf("*"); } else {textcolor(4);cprintf("*");} } for (int y=4;y<20;y++) //left vertical { gotoxy(15,y); if (y%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int t=4;t<20;t++) //right vertical { gotoxy(59,t); if (t%2==0) {textcolor(3);cprintf("*"); } else {textcolor(4);cprintf("*");} } for (int g=15;g<60;g++) //bottom horizontal { gotoxy(g,19); if (g%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } for (int u=15;u<60;u++) //middle horizontal { gotoxy(u,7); if (u%2==0) {textcolor(3);cprintf("*");} else {textcolor(4);cprintf("*");} } gotoxy(1,1);textcolor(3); cprintf(" *****THE MALL*****"); gotoxy(40,21);cprintf("S.C.F. 136,Karol Bagh"); gotoxy(40,22);cprintf("New Delhi"); gotoxy(40,23);cprintf("Phone:91-6633771/72/73,9811223344"); gotoxy(33,5);cprintf("Modify Inventory"); gotoxy(1,21);cout<<"'<'=Up '>'=Down Enter=Select Crtl+X=Exit"; gotoxy(17,9);cprintf("(1.)Add item.");textbackground(0); gotoxy(17,11);cprintf("(2.)Delete item."); gotoxy(17,13);cprintf("(3.)Modify existing item."); gotoxy(17,15);cprintf("(4.)Return to main menu."); gotoxy(17,17);char ch;textbackground(4);gotoxy(17,9); cprintf(" "); gotoxy(17,9);cprintf("(1.)Add item."); x: a=getch(); if (a==46 && chno==1) // 1 to 2 { chkcho='2';chno=2; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cout<<"(1.)Add item."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)Delete item."; goto x; } if (a==46 && chno==2) //2 to 3 { chkcho='3';chno=3; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cout<<"(2.)Delete item."; gotoxy(17,13);cout<<"(3.)Modify existing item."; gotoxy(17,13);textbackground(4); cprintf(" "); gotoxy(17,13);cout<<"(3.)Modify existing item."; goto x; } if (a==46 && chno==3) //3 to 4 { chkcho='4';chno=4; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13); cout<<"(3.)Modify existing item."; gotoxy(17,13); cout<<"(3.)Modify existing item."; gotoxy(17,15); textbackground(4); cprintf(" "); gotoxy(17,15); cout<<"(4.)Return to main menu."; goto x; } if (a==44 && chno==4) //4 to 3 { chno=3;chkcho='3'; gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cout<<"(4.)Return to main menu."; gotoxy(17,13);textbackground(4); cprintf(" "); gotoxy(17,13);cout<<"(3.)Modify existing item."; goto x; } if (a==44 && chno==3) //3 to 2 { chno=2;chkcho='2'; gotoxy(17,13);textbackground(0); cprintf(" "); gotoxy(17,13);cout<<"(3.)Modify existing item."; gotoxy(17,11);textbackground(4); cprintf(" "); gotoxy(17,11);cout<<"(2.)Delete item."; goto x; } if (a==44 && chno==2) //2 to 1 { chno=1;chkcho='1'; gotoxy(17,11);textbackground(0); cprintf(" "); gotoxy(17,11);cprintf("(2.)Delete item."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)Add item."); goto x; } if (a==46 && chno==4) //4 to 1 { chno=1; chkcho='1';gotoxy(17,15);textbackground(0); cprintf(" "); gotoxy(17,15);cprintf("(4.)Return to main menu."); gotoxy(17,9);textbackground(4); cprintf(" "); gotoxy(17,9);cprintf("(1.)Add item"); goto x; } if (a==44 && chno==1) //1 to 4 { chno=4;chkcho='4'; gotoxy(17,9);textbackground(0); cprintf(" "); gotoxy(17,9);cprintf("(1.)Add item."); gotoxy(17,15);textbackground(4); cprintf(" "); gotoxy(17,15);cprintf("(4.)Return to main menu."); goto x; } textbackground(0); if (a==24) {exit(0);} if (a==13) {return chkcho;} } void main() { clrscr();_setcursortype(_NOCURSOR); clrscr(); textbackground(3); textcolor(4); for (int i=1;i<24;i++) {clrscr();gotoxy(i,1);cprintf("Inventory Management System"); delay(100);} for (int o=2;o<7;o++) {clrscr(); gotoxy(23,o);cout<<"Inventory Management System";delay(100); }delay(1000); gotoxy(33,9);cout<<"Made By:-";delay (1000); gotoxy(31,11);cout<<"Vaibhav Kaul";delay(1000); gotoxy(32,13);cout<<"Class XII-C";delay(1000); gotoxy(22,15);cout<<"DELHI PUBLIC SCHOOL,VASANT KUNJ";delay(3000); char choice,schoice;shop s1;char f;fstream vai,temp;clrscr(); choice=mmenu(); a: switch(choice) { case ('1'): b: char incho=inven(); if (incho=='1') { vai.open("master.dat",ios::app); char add; do { s1.getd(); vai.write((char*)&s1,sizeof(s1)); cout<<" Would you like to add another item(y/n):"; cin>>add; }while(add=='y' || add=='Y'); vai.close(); cout<<" Inventory Updated."; delay (1000); goto b; } else if (incho=='2') { clrscr();int count; vai.open("master.dat",ios::in); temp.open("temp.dat",ios::out); cout<<"Enter the Item No. to be deleted:";int n; cin>>n; while(vai.read((char*)&s1,sizeof(s1))) { if (s1.retitno()!=n) temp.write((char*)&s1,sizeof(s1)); } vai.close();temp.close(); vai.open("master.dat",ios::out); temp.open("temp.dat",ios::in); while(temp.read((char*)&s1,sizeof(s1))) vai.write((char*)&s1,sizeof(s1)); vai.close();temp.close(); cout<<" Record deleted";delay (1000);goto b; } else if (incho=='3') { clrscr(); vai.open("master.dat",ios::ate|ios::out|ios::in); int n; cout<<" Enter Item Number to be modefied:";cin>>n; clrscr() ; cout<<" Enter The Modified record.... "; delay(2000); s1.getd(); int loc=(n-1)*(sizeof(s1)); vai.seekp(loc,ios::beg); vai.write((char*)&s1,sizeof(s1)); vai.close(); cout<<" Record Modified"; delay(1000); goto b; } else if (incho=='4') { choice=mmenu();goto a; } else { clrscr(); goto b; } case '2': clrscr(); cout<<"Items which need attention"; vai.open("master.dat",ios::in); int flag=0; while(vai.read((char*)&s1,sizeof(s1))) { if (s1.retalrt()>=s1.retno()) { flag=1;int z=s1.retitno(),x=s1.retno(); cout<<endl<<"Item No.:"<<z; cout<<"Name:";cout<<s1.retname(); cout<<" No. of pieces in stock:"<<x; cout<<endl; } } vai.close(); if (flag==1) { do {cout<<endl<<"Enter Item no. to be ordered:";int t;cin>>t; cout<<" Enter No. of pieces to be ordered:";int y;cin>>y; vai.open("master.dat",ios::in); temp.open("temp.dat",ios::out); while(vai.read((char*)&s1,sizeof(s1))) { if (t==s1.retitno()) { s1.putno(y); } temp.write((char*)&s1,sizeof(s1)); } vai.close();temp.close(); vai.open("master.dat",ios::out); temp.open("temp.dat",ios::in); while(temp.read((char*)&s1,sizeof(s1))) { vai.write((char*)&s1,sizeof(s1)); } vai.close();temp.close(); cout<<" Do you want to order more(y/n):";cin>>f; }while(f=='y' || f=='Y'); } else { gotoxy(25,10);cout<<"There are no items in this view"; delay(2000); choice=mmenu(); goto a; } choice=mmenu(); goto a; case '3': clrscr(); cout<<"Item No. Name Cost Quantity Total Buy More(Y/N) "; ofstream bill("bill.dat"); bill<<" SALE VOUCHER"; bill<<" S.C.F. 136 Karol Bagh, New Delhi."; bill<<" Phone:91-6633771/72/73,9811223344"; bill<<" Item No. Name Cost Qty Total"; int n,q,line=1,qty=0;double c;long double gt=0; char *s,print,g; do { z: qty++;line++; textbackground(4);gotoxy(1,line);cprintf(" "); gotoxy(1,line);cin>>n; gotoxy(1,line);textbackground(0); cprintf(" ");gotoxy(1,line);cout<<n; vai.open("master.dat",ios::in); temp.open("temp.dat",ios::out); while(vai.read((char*)&s1,sizeof(s1))) { if (n==s1.retitno()) { s=s1.retname(); gotoxy(10,line); textbackground(4); cprintf(" "); gotoxy(10,line);cout<<s;getch(); gotoxy(10,line);textbackground(0); cprintf(" "); gotoxy(10,line);cout<<s;gotoxy(28,line); textbackground(4);cprintf(" "); gotoxy(28,line);cout<<s1.retcost();getch(); gotoxy(28,line);textbackground(0); cprintf(" ");gotoxy(28,line); cout<<s1.retcost(); gotoxy(39,line);textbackground(4); cprintf(" "); gotoxy(39,line);cin>>q;gotoxy(39,line); textbackground(0);cprintf(" "); gotoxy(39,line);cout<<q;s1.remno(q); gotoxy(51,line);textbackground(4); cprintf(" ");gotoxy(51,line); cout<<s1.retcost()*q; getch();gotoxy(51,line); textbackground(0); cprintf(" "); gotoxy(51,line);cout<<s1.retcost()*q; long double total; char *s; s=s1.retname();total=s1.retcost()*q; gt+=total; bill<<endl<<" "<<n<<" ";bill<<" "<<s; bill<<" "<<s1.retcost()<<" "<<q<<" "<<" "<<total; gotoxy(66,line);textbackground(4);cprintf(" "); gotoxy(66,line); } temp.write((char*)&s1,sizeof(s1)); } vai.close();temp.close(); vai.open("master.dat",ios::out); temp.open("temp.dat",ios::in); while(temp.read((char*)&s1,sizeof(s1))) { vai.write((char*)&s1,sizeof(s1)); } vai.close();temp.close(); cin>>g;gotoxy(66,line); textbackground(0);cprintf(" "); gotoxy(66,line);cout<<g; }while(g=='y' || g=='y'); bill<<" --x----"; bill<<" Total Qty="<<qty<<" "<<"Grand Total="<<gt; bill.close();clrscr(); ifstream bil("bill.dat"); while (!(bil.eof())) {print=bil.get();cout<<print;} bil.close(); cout<<" Press any key to go back......"; getch();choice=mmenu();goto a; case '4': c: schoice=smenu(); if (schoice=='1') { vai.open("master.dat",ios::in); int u;clrscr(); cout<<"Enter Item Code:";cin>>u; int flag=0; while(vai.read((char*)&s1,sizeof(s1))) { if (u==s1.retitno()) { flag=1; s1.showd(); }}if (flag==0) cout<<endl<<"Item Not Found"; vai.close(); cout<<" Press any key to continue....."; getch(); goto c; } else if(schoice=='2') { vai.open("master.dat",ios::in); char u[25];clrscr(); cout<<"Enter Item Name:";gets(u); int flag=0; while(vai.read((char*)&s1,sizeof(s1))) { if (strcmpi(u,s1.retname())==0) {flag=1;s1.showd();} } if (flag==0) cout<<" Not Found."; vai.close(); cout<<" Press any key to continue....."; getch();goto c; } else if (schoice=='3') { clrscr(); gotoxy(1,1);cout<<"Item No"; gotoxy(10,1);cout<<"Name"; gotoxy(35,1);cout<<"Cost"; gotoxy(50,1);cout<<"Stock"; gotoxy(60,1);cout<<"Alert Level"; vai.open("master.dat",ios::in); int count=1,w=0; while(vai.read((char*)&s1,sizeof(s1))) { q: w++; if (w<=9) { count+=2;s1.splshow(count); } else { w=0,count=1; cout<<" Press any key for more...."; getch();clrscr(); gotoxy(1,1);cout<<"Item No"; gotoxy(10,1);cout<<"Name"; gotoxy(35,1);cout<<"Cost"; gotoxy(50,1);cout<<"Stock"; gotoxy(60,1);cout<<"Alert Level"; goto q; } } vai.close(); cout<<" Press any key to go back..........."; getch();goto c; } else if (schoice=='4') {char f;clrscr(); ifstream bil("bill.dat");char print; while (!(bil.eof())) {print=bil.get();cout<<print;} bil.close();cout<<" Press any key to return......"; getch();goto c; } else if (schoice=='5') { choice=mmenu();goto a; } else goto c; case '5':exit(0); default :choice=mmenu();goto a; } }

Related Source Codes

Script Name Author
Moving ball screen saver karlmarx
The Classic Game of Snake & Ladder Lakshmi Narayana .A
Railway seat reservation question which comes in sapient VyomWorld
To calculate percentile Ravi Mathur
Send to folder ANIMESH SAHU
Analog clock and calendar Nazia & Rida
HIGH/LOW GAME MOLLY ARORA
Data structure (stack Implimentation) Swapnil B Adsure
Memory Game AnirudhSanyal
Easy Calc Anirudh Sanyal
GK Quiz Anirudh Sanyal
Hangman Game Manish Jain
Snakeman Manish Jain
Full month Calendar Nigi
Cursor shapes nigi

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions | Important Websites
Copyright ©2003-2024 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=594


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review