Department Store Management System Project in C with Source Code
The Department Store Management System Project in C is a consoled based application and created using c programming language. This system is a simple mini project and compiled in Code::Blocks IDE using GCC compiler. This simple mini project for Department Store Management System is complete and totally error free and also includes a downloadable Source Code for free, just find the downloadable source code below and click to start downloading. Before you start to click the download now first you must click the Run Quick Scan for secure Download.
Here, This Department Store Management System is primarily based totally on a idea to offer facts on calculating, adding, viewing goods, and different capabilities too. The admin or consumer is properly aware to the statistics with none strain. This software actually has a huge scope to decrease mistakes with inside the making of payments and it additionally limits the put off of turning in payments to the customers. This system has the very least risk of records loss and we don‟t need to fear approximately it being damaged.
Anyway if you want level up your knowledge in programming especially C/C++ Programming Language, try this new article I’ve made for you Best C Projects with Source Code for Beginners Free Download 2022.
To start creating a Department Store Management System Project in C, make sure that you have a Code Blocks or any platform of C installed in your computer.
ABOUT PROJECT | PROJECT DETAILS |
---|---|
Project Name : | Department Store Management System |
Project Platform : | C/C++ |
Programming Language Used: | C Programming Language |
Developer Name : | itsourcecode.com |
IDE Tool (Recommended): | Dev-C++/Codeblocks |
Project Type : | Desktop Application |
Database: | Stores data in .DAT file |
Upload Date and Time: | October 6, 2020-6:19 am |
Steps on how to create a Department Store Management System Project in C
Time needed: 5 minutes.
Department Store Management System Project in C with Source Code
- Step 1: Create a new project.
First open the code blocks IDE and click “create a new project“.
- Step 2: Choose console application.
Second click the “console application” and after that click “next“.
- Step 3: Choose C language.
Third choose “C language” and click “next“.
- Step 4: Name your project.
Fourth name the project you’ve created and click “next” after that click “finish“.
- Step 5: The actual code.
You are free to copy the given source code below or download the downloadable source code given.
This function is for the global variable
In the code given below, which is for the function for the global variable use in the system.(Department Store Management System Project in C)
COORD coordinates= {0,0}; void gotocoordinate(int x,int y) { coordinates.X=x; coordinates.Y=y; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),coordinates); }
This function is for the declaration of display and main menu
In the code given below, which is for the function for declaration of display and main menu.(Department Store Management System Project in C)
void cur(int); void departmentbill(); void department_menu(); void view(record *,int,int); void window_screen(int,int,int,int); void view_concern(); void department_search(); void h_light(int,int); void cal_bill() ; void modify(); void add_stocks(); void delete_stocks(); void exit();
This function is for the department menu
In the code given below, which is for the function for department menu like calculate bill, add goods, edit goods, display all goods, search, delete goods and exit.(Department Store Management System Project in C)
void department_menu() { int a; char st; const char *menu[]= {" Calculate Bill"," Add Goods"," Edit Goods"," Display All "," Search", " Delete Goods"," Exit"}; system("cls"); //textbackground(11); //textcolor(0); //_setcursortype(_NOCURSOR); window_screen(25,50,20,32); gotocoordinate(33,18); printf("MAIN MENU"); for (a=0; a<=6; a++) { gotocoordinate(30,22+a+1); printf("%s\n\n\n",menu[a]); } cur(7); }
This function is for the department search
In the code given below, which is for the function for department search by code, by rate and by quantity.(Department Store Management System Project in C)
void department_search() { char st; int a; const char *menu[]= {" By Code"," By Rate"," By Quantity"," Back to main menu"}; system("cls"); //textbackground(11); //textcolor(0); window_screen(25,50,20,32); gotocoordinate(33,18); printf("SEARCH MENU"); for (a=0; a<=3; a++) { gotocoordinate(30,22+a+1); printf("%s\n\n\n",menu[a]); } cur(4); }
This function is for the calculation of bill
In the code given below, which is for the function for the calculation of bill.(Department Store Management System Project in C)
void cal_bill() { char c[4]= {0}; int d=29,e=0,size=0,f=1; float d_tot=0,gross_tot=0; FILE openfile; openfile=fopen("record.txt","r+b"); rewind(openfile); system("cls"); departmentbill(); gotocoordinate(26,15); printf("enter \"end\" to finish input"); while(1) { gotocoordinate(25,18); printf(" "); gotocoordinate(25,19); printf(" "); gotocoordinate(25,18); printf("enter item code:"); scanf("%s",c); if(strcmp(c,"end")==0) break; gotocoordinate(25,19); printf("enter quantity:"); scanf("%d",&e); rewind(openfile); while(fread(&stocks,sizeof(stocks),1,openfile)) { if((strcmp(stocks.code,c)==0)) { d_tot=stocks.ratee; gotocoordinate(11,d); printf("%4d",f); printf("%9s",stocks.name); printf("%13d",e); printf("%15.2f",stocks.rate); printf("%13.2f",d_tot); gross_tot=gross_tot+d_tot; size=sizeof(stocks); stocks.quantity=stocks.quantity-e; d+=2; f++; fseek(openfile,-size,SEEK_CUR); fwrite(&stocks,sizeof(stocks),1,openfile); break; } } } if(gross_tot!=0) { gotocoordinate(30,d+5); printf("TOTAL AMOUNT = P%6.2f",gross_tot); } fclose(openfile); getch(); department_menu(); }
This function is for the bill window
In the code given below, which is for the function to display the bill window.(Department Store Management System Project in C)
void departmentbill() { int a; gotocoordinate(20,10); //; for (a=1; a<=10; a++) printf("*"); printf(" * FASHION WEAR * "); for (a=1; a<=10; a++) printf("*"); printf("\n\n"); gotocoordinate(30,11); printf("Departmental Store"); //textcolor(1); gotocoordinate(32,25); printf("CUSTOMER'S BILL") ; //textcolor(8); gotocoordinate(13,27); printf("SN. Item Name Quantity Rate Total"); }
This function is for the add records
In the code given below, which is for the function too add stocks or items.(Department Store Management System Project in C)
void add_stocks ()
{
FILE *openfile;
char l[CBN],m[12];
system("cls");
//textbackground(11);
//textcolor(0);
gotocoordinate(25,25);
printf("Enter new record(Y/N)?");
while(toupper(getche())=='Y')
{
system("cls");
openfile=fopen("record.txt","ab");
checking_code(l);
strcpy(stocks.code,l);
gotocoordinate(22,28);
printf("Enter rate of the item:");
scanf("%f",&stocks.rate);
gotocoordinate(22,30);
printf("Enter quantity of the item:");
scanf("%d",&stocks.quantity);
gotocoordinate(22,32);
printf("Enter name of the item:");
scanf("%s",stocks.name);
fseek(openfile,0,SEEK_END);
fwrite(&stocks,sizeof(stocks),1,openfile);
fclose(openfile);
gotocoordinate(22,34);
printf("Enter new record(Y/N)?");
} department_menu();
}
This function is for the edit record
In the code given below, which is for the function for editing or modifying the records.(Department Store Management System Project in C)
void modify() { int flagerized=0,options; char r[CBN],s[CBN]; FILE *openfile; int sze; system("cls"); //textcolor(0); //textbackground(11); window_screen(20,63,20,46); gotocoordinate(35,18); printf("EDIT RECORDS"); ; gotocoordinate(25,23); printf("enter item code: "); scanf("%s",r); flagerized=checking(r); if(flagerized==0) { openfile=fopen("record.txt","r+b"); rewind(openfile); while (fread(&stocks,sizeof (stocks),1,openfile)) { if(strcmp(stocks.code,r)==0) { //textcolor(0); gotocoordinate(25,27); printf("name = %s",stocks.name); gotocoordinate(25,28); printf("code = %s",stocks.code); gotocoordinate(25,29); printf("rate = %g",stocks.rate); gotocoordinate(25,30); printf("quantity = %d",stocks.quantity); gotocoordinate(25,32);; printf("Do you want to edit this record?(y/n):"); fflush(openfile); if(toupper(getche())=='Y') { //textcolor(0); gotocoordinate(25,34); printf("1- edit name "); gotocoordinate(25,35); printf("2- edit code "); gotocoordinate(25,36); printf("3- edit rate "); gotocoordinate(25,37); printf("4- edit quantity "); gotocoordinate(25,39); ; printf(" enter your choice(1, 2, 3, 4) "); scanf("%d",&options); switch(options) { case 1: system("cls"); window_screen(23,48,20,40); gotocoordinate(35,18); printf("EDIT RECORDS"); gotocoordinate(25,24); printf(" enter new name: "); scanf("%s",stocks.name); sze=sizeof(stocks); fseek(openfile,-sze,SEEK_CUR); fwrite(&stocks,sizeof(stocks),1,openfile); break; case 2: system("cls"); window_screen(23,65,20,40); gotocoordinate(35,18); printf("EDIT RECORDS"); gotocoordinate(25,24); checking_code(s); strcpy(stocks.code,s); sze=sizeof(stocks); fseek(openfile,-sze,SEEK_CUR); fwrite(&stocks,sizeof(stocks),1,openfile); break; case 3: system("cls"); window_screen(23,65,20,40); gotocoordinate(35,18); printf("EDIT RECORDS"); gotocoordinate(25,24); printf(" enter new rate: "); scanf("%f",&stocks.rate); sze=sizeof(stocks); fseek(openfile,-sze,SEEK_CUR); fwrite(&stocks,sizeof(stocks),1,openfile); break; case 4: system("cls"); window_screen(23,65,20,40); gotocoordinate(35,18); printf("EDIT RECORDS"); gotocoordinate(25,24); printf(" enter new quantity: "); scanf("%d",&stocks.quantity); sze=sizeof(stocks); fseek(openfile,-sze,1); fwrite(&stocks,sizeof(stocks),1,openfile); break; } gotocoordinate(27,30); printf("--- item edited---"); break; } } } } if (flagerized==1) { gotocoordinate(32,30); printf("Item does not exist."); gotocoordinate(36,32); printf("TRY ABGAIN"); } getch(); fclose(openfile); department_menu(); }
This function is for the displaying all the records
In the code given below, which is for the function to display all the records.(Department Store Management System Project in C)
void depart_all()
{
int a,d=1;
FILE openfile; view_concern(); openfile=fopen("record.txt","rb"); rewind(openfile); a=26; fflush(openfile); while(fread(&stocks,sizeof(stocks),1,openfile)) { view(&stocks,a,d); a++; d++; if ((d%20)==0) { gotocoordinate(27,47);/textcolor(0)*/;
printf("Press any key to see more………..");
getch();
system("cls");
view_concern();
a=26;
continue;
}
}
getch();
if (a==26)
{
gotocoordinate(24,30);
printf("-- no articles found --");
}
getch();
fclose(openfile);
department_menu();
}
This function is for the displaying quantity
In the code given below, which is for the function to display the quantity.(Department Store Management System Project in C)
void depart_qty() { int s,t=1; int p,q; FILE *openfile; view_concern(); openfile=fopen("record.txt","rb"); rewind(openfile); s=26; gotocoordinate(16,20);; printf("Enter lower range: "); scanf("%d",&p); gotocoordinate(16,21); printf("Enter upper range:"); scanf("%d",&q); fflush(openfile); while(fread(&stocks,sizeof(stocks),1,openfile)) { if((stocks.quantity>=p)&&(stocks.quantity<=q)) { view(&stocks,s,t); s++; t++; if ((t%20)==0) { gotocoordinate(27,47); printf("Press any key to see more……….."); getch(); system("cls"); view_concern(); s=26; continue; } } } getch(); if (s==26) { gotocoordinate(28,30); printf(" No items found."); } getch(); department_search(); fclose(openfile); }
This function is for the delete records
In the code given below, which is for the function to delete the records.(Department Store Management System Project in C)
void delete_stocks()
{
int flagerized;
char d[CNN];
FILE openfile,openfile1;
system("cls");
//textbackground(11);
//textcolor(0);
window_screen(23,51,25,34);
gotocoordinate(29,18);
printf("DELETE ARTICLES");
gotocoordinate(27,27);
printf("enter item code: ");
scanf("%s",d);
flagerized=checking(d);
if(flagerized==0)
{
openfile1=fopen("record1.txt","ab");
openfile=fopen("record.txt","rb");
rewind(openfile);
while (fread(&stocks,sizeof (stocks),1,openfile))
{
if(strcmp(stocks.code,d)!=0)
fwrite(&stocks,sizeof(stocks),1,openfile1);
}
gotocoordinate(27,29);
printf("---item deleted---");
remove("record.txt");
rename("record1.txt","record.txt");
}
if (flagerized==1)
{
gotocoordinate(25,29);
printf("---item does not exist---");
gotocoordinate(30,31);
printf("TRY AGAIN");
}
fclose(openfile1);
fclose(openfile);
getch();
department_menu();
}
This function is for the checking validity of code
In the code given below, which is for the function to check the validity of code while editing and deleting.
int checking(char x[CNN]) { FILE *openfile; int flagerized=1; openfile=fopen("record.txt","rb"); rewind(openfile); while (fread(&stocks,sizeof (stocks),1,openfile)) { if(strcmp(stocks.code,x)==0) { flagerized=0; break; } } fclose(openfile); return flagerized; }
This function is for the displaying of box
In the code given below, which is for the function to display the box.(Department Store Management System Project in C)
void window_screen(int a,int b,int c,int d)
{
int v;
system("cls");
gotocoordinate(20,10);
//textcolor(1);
for (v=1; v<=10; v++)
printf("*");
printf(" * FASHION WEAR * ");
for (v=1; v<=10; v++)
printf("*");
printf("\n\n");
gotocoordinate(30,11);
printf("Department Store");
//textcolor(4);
for (v=a; v<=b; v++)
{
gotocoordinate(v,17);
printf("\xcd");
gotocoordinate(v,19);
printf("\xcd");
gotocoordinate(v,c);
printf("\xcd");
gotocoordinate(v,d);
printf("\xcd");
}
gotocoordinate(a,17); printf("\xc9"); gotocoordinate(a,18); printf("\xba"); gotocoordinate(a,19); printf("\xc8"); gotocoordinate(b,17); printf("\xbb"); gotocoordinate(b,18); printf("\xba"); gotocoordinate(b,19); printf("\xbc");
//textcolor(4);
for(v=c; v<=d; v++)
{
gotocoordinate(a,v);
printf("\xba");
gotocoordinate(b,v);
printf("\xba");
}
gotocoordinate(a,c);
printf("\xc9");
gotocoordinate(a,d);
printf("\xc8");
gotocoordinate(b,c);
printf("\xbb");
gotocoordinate(b,d);
printf("\xbc");
//textbackground(11);
//textcolor(0);
}
Downloadable Source Code
In summary, this 2020 Department Store Management System Project in C project can be useful to students or professional who wants to learn C programming language. This project can also be modified to fit your personal requirements. Hope this project will help you to improve your skills.
Summary
That’s how you create Department Store Management System Project in C with Source Code in your projects. You can always expand and try different ways in implementing the Department Store Management System Project in C in your C projects. In this Mini Project for Department Store Management System Project in C with Source Code is free to download and It is easy to understand and manipulate this project and use for education purpose only.
Related Articles
- Student Record System in C with Source Code
- Calendar In C Programming With Source Code
- Mini Project for Phonebook in C with Source Code
- Employee Management System In C With Source Code
- School Billing System in C with Source Code
- Library Management System In C++ With Source Code
- School Management System In C++ With Source Code
- Bus Reservation System in C++ with Source Code
- Bank Management System in C++ with Source Code
- Student Management System In C++ With Source Code
- Hostel Booking System Project in C++ with Source Code
- Food Ordering System Project in C++ with Source Code
Inquiries
If you have any questions or suggestions about Department Store Management System Project in C with Source Code, please feel free to leave a comment below.
hello do you have some ppt about department store management system,, can i request , for defense only 🙂 thank you