當(dāng)前位置:工程項(xiàng)目OA系統(tǒng) > 領(lǐng)域應(yīng)用 > 商務(wù)管理軟件 > 商品管理系統(tǒng)
C語(yǔ)言做個(gè)小型商品銷售管理系統(tǒng)
申請(qǐng)免費(fèi)試用、咨詢電話:400-8352-114
泛普軟件泛普OA系統(tǒng)小型商品信息管理系統(tǒng)
泛普軟件設(shè)計(jì)了一個(gè)商品信息管理系統(tǒng),模擬超市商品管理。
對(duì)商品信息進(jìn)行分類:日用品,食品,電器
各類商品包括的信息有: 編號(hào),商品名稱,商品類別,產(chǎn)地,供貨商,單價(jià),庫(kù)存數(shù)量,采購(gòu)日期。
系統(tǒng)實(shí)現(xiàn)下述功能:
(1)能錄入商品信息
(2)能對(duì)商品信息進(jìn)行查詢
可以按編號(hào),按商品名稱,按商品類別,按供貨商,按產(chǎn)地進(jìn)行查詢
(3)可以對(duì)商品信息進(jìn)行修改,刪除
(4)可以對(duì)新商品進(jìn)行入庫(kù)登記
要求:界面友好,易于操作,采用二進(jìn)制文件存儲(chǔ)數(shù)據(jù)。
泛普軟件小型商品銷售管理系統(tǒng)
設(shè)計(jì)一個(gè)商品銷售系統(tǒng),模擬超市商品銷售流程。
銷售單包含的信息如下:流水號(hào),商品編號(hào),銷售數(shù)量,銷售單價(jià),銷售日期,銷售人員
系統(tǒng)實(shí)現(xiàn)下述功能:
(1) 商品銷售:
要求:輸入銷售單,根據(jù)商品編號(hào),讀取并顯示磁盤文件中的商品信息,根據(jù)銷售數(shù)量,修改庫(kù)存,
(2) 商品銷售信息查詢:
a) 根據(jù)商品編號(hào)查詢
b) 根據(jù)銷售日期查詢
c) 根據(jù)銷售人員查詢
(3)統(tǒng)計(jì)
a) 日銷售額 b) 月銷售額 c) 季銷售額 d) 月度銷售排名 e)。。。
(4)庫(kù)存信息提醒
我們來看下泛普軟件商品管理系統(tǒng)的代碼:
具體的,稍微改一下就可以了!
#include "stdio.h" /*I/O函數(shù)*/
#include "stdlib.h" /*其它說明*/
#include "string.h" /*字符串函數(shù)*/
#include "conio.h" /*屏幕操作函數(shù)*/
#include "mem.h" /*內(nèi)存操作函數(shù)*/
#include "ctype.h" /*字符操作函數(shù)*/
#include "alloc.h" /*動(dòng)態(tài)地址分配函數(shù)*/
struct score
{
int mingci;
char xuehao[8];
char mingzi[20];
float score[6];
}data,info[1000];
int i,j,k=0;
char temp[20],ch;
FILE *fp,*fp1;
void shuru()
{
if((fp=fopen("s_score.txt","ab+"))==NULL)
{
printf("cannot open this file.n");
getch();exit(0);
}
for(i=0;i<=1000;i++)
{
printf("nPlease shuru xuehao:");
gets(data.xuehao);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");
gets(temp);data.score[0]=atof(temp);
printf("Please shuru shuxue score:");
gets(temp);data.score[1]=atof(temp);
printf("Please input yingyu score:");
gets(temp);data.score[2]=atof(temp);
printf("Please shuru wuli score:");
gets(temp);data.score[3]=atof(temp);
printf("Please shur huaxue score:");
gets(temp);data.score[4]=atof(temp);
data.score[5]=data.score[0]+data.score[1]+data.score[2]+data.score[3]+data.score[4];
fwrite(&data,sizeof(data),1,fp);
printf("another?y/n");
ch=getch();
if(ch=='n'||ch=='N')
break;
} fclose(fp);
}
void xianshi()
{
float s;int n;
if((fp=fopen("s_score.txt","rb+"))==NULL)
{
printf("Cannot reading this file.n");
exit(0);
}
for(i=0;i<=1000;i++)
{
if((fread(&info[i],sizeof(info[i]),1,fp))!=1)
break;
}
printf("nxuehao mingzi yuwen shuxue yingyu wuli huauxue zhongfenn");
for(j=0,k=1;j
{
info[j].mingci=k;
printf("%6s %8s %3.1f %3.1f %3.1f %3.1f %3.1f %3.1fn",info[j].xuehao,info[j].mingzi,info[j].score[0],info[j].score[1],info[j].score[2],info[j].score[3],info[j].score[4],
info[j].score[5]);
}
getch();
fclose(fp);
}
void xiugai()
{
if((fp=fopen("s_score.txt","rb+"))==NULL||(fp1=fopen("temp.txt","wb+"))==NULL)
{
printf("Cannot open this file.n");
exit(0);
}
printf("nPLease shuru xiugai xuehao:");
scanf("%d",&i); getchar();
while((fread(&data,sizeof(data),1,fp))==1)
{
j=atoi(data.xuehao);
if(j==i)
{
printf("xuehao:%snmingzi:%sn",data.xuehao,data.mingzi);
printf("Please shuru mingzi:");
gets(data.mingzi);
printf("Please shuru yuwen score:");
gets(temp);data.score[0]=atof(temp);
printf("Please shuru shuxue score:");
gets(temp);data.score[1]=atof(temp);
printf("Please input yingyu score:");
gets(temp);data.score[2]=atof(temp);
printf("Please input wuli score:");
gets(temp);data.score[3]=atof(temp);
printf("Please input huaxue score:");
gets(temp);data.score[4]=atof(temp);
data.score[5]=data.score[0]+data.score[1]+data.score[2]+data.score[3]+data.score[4];
} fwrite(&data,sizeof(data),1,fp1);
}
fseek(fp,0L,0);
fseek(fp1,0L,0);
while((fread(&data,sizeof(data),1,fp1))==1)
{
fwrite(&data,sizeof(data),1,fp);
}
fclose(fp);
fclose(fp1);
}
void chazhao()
{
if((fp=fopen("s_score.txt","rb"))==NULL)
{
printf("nCannot open this file.n");
exit(0);
}
printf("nPLease shuru xuehao chakan:");
scanf("%d",&i);
while(fread(&data,sizeof(data),1,fp)==1)
{
j=atoi(data.xuehao);
if(i==j)
{
printf("xuehao:%s mingzi:%snyuwen:%fn shuxue:%fn yingyu:%fn wuli:%fn huaxue:%fn ",data.xuehao,data.mingzi,data.score[0],data.score[1],data.score[2],data.score[3],data.score[4],data.score[5]);
}getch();
}
}
void shanchu()
{
if((fp=fopen("s_score.txt","rb+"))==NULL||(fp1=fopen("temp.txt","wb+"))==NULL)
{
printf("nopen score.txt was failed!");
getch();
exit(0);
}
printf("nPlease input ID which you want to del:");
scanf("%d",&i);getchar();
while((fread(&data,sizeof(data),1,fp))==1)
{
j=atoi(data.xuehao);
if(j==i)
{
printf("Anykey will delet it.n");
getch();
continue;
}
fwrite(&data,sizeof(data),1,fp1);
}
fclose(fp);
fclose(fp1);
remove("s_score.txt");
rename("temp.txt","s_score.txt");
printf("Data delet was succesful!n");
printf("Anykey will return to main.");
getch();
}
main()
{
while(1)
{
clrscr(); /*清屏幕*/
gotoxy(1,1); /*移動(dòng)光標(biāo)*/
textcolor(YELLOW); /*設(shè)置文本顯示顏色為黃色*/
textbackground(BLUE); /*設(shè)置背景顏色為藍(lán)色*/
window(1,1,99,99); /* 制作顯示菜單的窗口,大小根據(jù)菜單條數(shù)設(shè)計(jì)*/
clrscr();
printf("*************welcome to use student manage******************n");
printf("*************************menu********************************n");
printf("* ========================================================= * n");
printf("* 1>shuru 2>xiugai * n");
printf("* 3>shanchu 4>chazhao * n");
printf("* 5>xianshi 6>exit * n");
printf("* * n");
printf("* --------------------------------------------------------- * n");
printf(" Please input which you want(1-6):");
ch=getch();
switch(ch)
{
case '1':shuru();break;
case '2':xiugai(); break;
case '3':shanchu(); break;
case '4':chazhao(); break;
case '5':xianshi(); break;
case '6':exit(0);
default: continue;
}
}
}
- 1我家電刺激政策惠及全球產(chǎn)業(yè)
- 2企業(yè)融資:不得馬虎的問題!
- 3中國(guó)LED顯示屏企業(yè)渠道爭(zhēng)奪戰(zhàn)正當(dāng)時(shí)
- 4商店商品管理系統(tǒng)
- 5提升企業(yè)員工執(zhí)行力的十大方法
- 6從加多寶看公益營(yíng)銷的特點(diǎn)
- 7喬春洋:危機(jī)公關(guān)
- 8人生成功必不可少的四個(gè)選擇
- 9企業(yè)管理力破“三重門”
- 10運(yùn)營(yíng)管理系統(tǒng)實(shí)現(xiàn)企業(yè)價(jià)值最大的方式
- 11如何在組織中獲得成功
- 12與材料集團(tuán)老總溝通戰(zhàn)略
- 13日本以退為進(jìn)整合東亞電子業(yè)
- 14泛普商品銷售管理系統(tǒng) V綠色版怎么用
- 15中小型白酒企業(yè)聚焦戰(zhàn)略:品牌聚焦
- 16企業(yè)如何導(dǎo)入顧客滿意度管理?
- 17企業(yè)變革管理與業(yè)務(wù)流程優(yōu)化
- 18商品銷售管理系統(tǒng)設(shè)計(jì)
- 19清理整頓辦法制定方略
- 20簡(jiǎn)析集團(tuán)品牌管理中存在的問題
- 21中小企業(yè)需要高度重視基礎(chǔ)管理
- 2280后管理者如何發(fā)揮最大效能
- 23商品管理系統(tǒng):談判中信任的力量
- 24商品銷售管理系統(tǒng)
- 25老板:為何“節(jié)約公司的每一分錢”錯(cuò)了?
- 26如何做到知行合 --心動(dòng)不如行動(dòng)
- 27思路——“借力用力”開拓國(guó)際化之路
- 28簡(jiǎn)易商品進(jìn)銷管理系統(tǒng) (新員工考試題目)
- 29操盤手何軍:論時(shí)尚產(chǎn)業(yè)治企之道
- 30門店型企業(yè)如何制定市場(chǎng)推進(jìn)戰(zhàn)略
成都公司:成都市成華區(qū)建設(shè)南路160號(hào)1層9號(hào)
重慶公司:重慶市江北區(qū)紅旗河溝華創(chuàng)商務(wù)大廈18樓