[it计算机]高级语言课程设计商品进销存管理程序内容摘要:
,GooInfo[i].Gname,GooInfo[i].Gno,GooInfo[i].Bid,GooInfo[i].Quantityin,GooInfo[i].Price,GooInfo[i].Quantityout,GooInfo[i].Stocks)。 } fclose(fpw)。 printf(\n修改成功。 \n)。 printf(\n请按 enter键返回主菜单 !\n)。 getchar()。 getchar()。 menu()。 } } 20 if(found0) { printf(\n没有找到该商品号的记录 :\n)。 printf(\n请按 enter键返回主菜单 !\n)。 getchar()。 getchar()。 menu()。 } } . quiry void quiry() //查看信息 { int chose。 int right。 do { system(cls)。 printf(\n\t1按商品号查询 \t2按商品名查询 \t3返回 \n)。 printf(\n请 输入数字选择 :)。 scanf(%d,amp。 chose)。 if(chose1||chose3) { right=1。 getchar()。 } else right=0。 }while(right==1)。 switch(chose) 21 { case 1:byGno()。 break。 case 2:byGname()。 break。 case 3:menu()。 } } void byGno() //通过商品号查看信息 { int found=1。 int num。 int i。 char no[20]。 FILE*fp。 if((fp=fopen(,r))==NULL) { printf(文件打不开。 \n)。 menu()。 } for(i=0。 !feof(fp)。 i++) //读取文件 { fscanf(fp,%s%s%f%d%f%d%d,amp。 GooInfo[i].Gname,amp。 GooInfo[i].Gno,amp。 GooInfo[i].Bid,amp。 GooInfo[i].Quantityin,amp。 GooInfo[i].Price,amp。 GooInfo[i].Quantityout, amp。 GooInfo[i].Stocks)。 } num=i。 fclose(fp)。 printf(\n请输入商品编号 :)。 scanf(%s,no)。 for(i=0。 inum。 i++) 22 { if(strcmp(no,GooInfo[i].Gno)==0) { found=i。 printf(\n该商品的信息为: \n\n)。 printf(商品名 商品号 进价 进货量 售价 销售量 库存量 \n)。 printf(%s\t%s\t%.2f\t%d\t%.2f\t%d\t%d\n,GooInfo[found].Gname,GooInfo[found].Gno,GooInfo[found].Bid,GooInfo[found].Quantityin,GooInfo[found].Price,GooInfo[found].Quantityout,GooInfo[found].Stocks)。 } } if(found0) printf(\n没有找到该商品号的记录 !\n)。 printf(\n请按 enter键返回上级菜单 !\n)。 getchar()。 getchar()。 quiry()。 } void byGname() //通过商品名查看信息 { int found=1。 int num。 int i。 char name[20]。 FILE*fp。 if((fp=fopen(,r))==NULL) 23 { printf(文件打不开。 \n)。 menu()。 } for(i=0。 !feof(fp)。 i++) //读取文件 { fscanf(fp,%s%s%f%d%f%d%d,amp。 GooInfo[i].Gname,amp。 GooInfo[i].Gno,amp。 GooInfo[i].Bid,amp。 GooInfo[i].Quantityin,amp。 GooInfo[i].Price,amp。 GooInfo[i].Quantityout,amp。 GooInfo[i].Stocks)。 } num=i。 fclose(fp)。 printf(\n请输入商品名 :)。 scanf(%s,name)。 printf(\n叫该商品名的商品信息为: \n\n)。 printf(商品名 商品号 进价 进货量 售价 销售量 库存量 \n)。 for(i=0。 inum。 i++) { if(strcmp(name,GooInfo[i].Gname)==0) { found=i。 printf(%s\t%s\t%.2f\t%d\t%.2f\t%d\t%d\n,GooInfo[found].Gname,GooInfo[found].Gno,GooInfo[found].Bid,GooInfo[found].Quantityin,GooInfo[found].Price,GooInfo[found].Quantityout,GooInfo[found].Stocks)。 } } if(found0) printf(\n没有找到该商品名的记录 !\n)。 24 printf(\n请按 enter键返回上级菜单 !\n)。 getchar()。 getchar()。 quiry()。 } . stastic void stastic() //统计功能 { int chose。 int right。 do { system(cls)。 printf(\n\t1总销售额 \t2总进货额 \t3返回 \n)。 printf(\n请输入数字选择 :)。 scanf(%d,amp。 chose)。 if(chose1||chose3) { right=1。 getchar()。 } else right=0。 }while(right==1)。 switch(chose) { case 1: Out()。 printf(\n请按 enter键返回上级菜单 !\n)。 25 getchar()。 getchar()。 stastic()。 break。 case 2: In()。 printf(\n请按 enter键返回上级菜单 !\n)。 getchar()。 getchar()。 stastic()。 break。 case 3:menu()。 } } void Out() //销售额 { float num。 num=OutNum()。 printf(\n总销售额为: %.2f\n,num)。 } float OutNum() //销售额 { int num。 int found。 float pq=0。 26 int i。 FILE*fp。 if((fp=fopen(,r))==NULL) { printf(文件打不开。 \n)。 menu()。 } for(i=0。 !feof(fp)。 i++) //读取文件 { fscanf(fp,%s%s%f%d%f%d%d,amp。 GooInfo[i].Gname,amp。 GooInfo[i].Gno,amp。 GooInfo[i].Bid,amp。 GooInfo[i].Quantityin,amp。 GooInfo[i].Price,amp。 GooInfo[i].Quantityout,amp。 GooInfo[i].Stocks)。 } fclose(fp)。 num=i。 for(i=0。 inum。 i++) { found=i。 pq+=GooInfo[i].Quantityout*GooInfo[i].Price。 } return pq。 } void In() //进货额 { float num。 num=InNum()。 printf(\n总进货额: %.2f\n,num)。 27 } float InNum() //总进货额 { int num。 int found。 float bq=0。 int i。 FILE*fp。 if((fp=fopen(,r))==NULL) { printf(文件打不开。 \n)。 menu()。 } for(i=0。 !feof(fp)。 i++) //读取文件 { fscanf(fp,%s%s%f%d%f%d%d,amp。 GooInfo[i].Gname,amp。 GooInfo[i].Gno,amp。 GooInfo[i].Bid,amp。 GooInfo[i].Quantityin,amp。 GooInfo[i].Price,amp。 GooInfo[i].Quantityout,amp。 GooInfo[i].Stocks)。 } fclose(fp)。 num=i。 for(i=0。 inum。 i++) { found=i。 bq+=GooInfo[i].Quantityin*GooInfo[i].Bid。 } return bq。 28 } . Delete void Delete() //删除信息 { int num。 int i。 int found=1。 char GooNO[20]。 FILE*fpr,*fpw。 if((fpr=fopen(,r))==NULL) { printf(文件打不开。 \n)。 menu()。 } for(i=0。 !feof(fpr)。 i++) //读取文件 { fscanf(fpr,%s%s%f%d%f%d%d,amp。 GooInfo[i].Gname,amp。 GooInfo[i].Gno,amp。 GooInfo[i].Bid,amp。 GooInfo[i].Quantityin,amp。 GooInfo[i].Price,amp。 GooInfo[i].Quantityout,amp。 GooInfo[i].Stocks)。 } num=i。 fclose(fpr)。 printf(\n请输入商品号选择你要删除的记录 :)。 scanf(%s,GooNO)。 for(i=0。 inum。 i++) { if(strcmp(GooNO,GooInfo[i].Gno)==0)。[it计算机]高级语言课程设计商品进销存管理程序
相关推荐
der C. inspect ining goods D. All of the above. E. A and B only ANS: E 46. Which of the following is closest to Juran39。 s definition of Quality: A. conformance to requirements. B. fitness for use. C
mima= then 9 //修改用户的密码 UPDATE 操作员表 SET 密码 = : WHERE 操作员表 .用户名 = :。 messagebox(密码修改成功。 ,请记住新密码,下次登录时请使用新密码。 ,Information!,ok!,2) else messagebox(错误。 ,用户名或密码错误,请重新输入。 ,exclamation!,ok!,2) end if end if
39。 ,39。 4666339。 ,39。 454539。 )。 insert into customer values(39。 fangzheng39。 ,39。 xiaoliu39。 ,39。 fenjinlu39。 ,39。 12639。 ,39。 45439。 ,39。 458839。 )。 合同信息 insert into contract values(39。 00139。 ,39
_______ 手机: _____________ 个人主页: 通讯地址: ____________________________________________________ 邮政编码: ____________________________________________________ 教育背景 : 最高学历: __________________________ 最高学历学校:
...................................................................................................................... 59 参考文献 ........................................................................
................................................................................... 107 导入原有系统的数据 ................................................................................... 107 数据导入导出功能 ....