仓库管理系统(c语言)
仓库管理系统设计说明书

仓库管理系统设计说明书发布信息✧作者✧发布范围✧版本✧发布日期修改记录✧发布日期✧版本✧说明✧作者目录1引言 (4)1。
1编写目的 (4)1。
2读者对象 (4)1.3项目背景 (4)1.4参考资料 (4)2系统总体设计 (5)2。
1系统结构模式 (5)2。
2系统运行流程 (5)3系统详细设计 (5)3。
1问题域部分的设计 (6)3.2人机交互部分的设计 (8)3。
3任务管理部分的设计 (12)3.4数据管理部分的设计 (13)1引言●仓库管理系统设计说明书,是在分析中小型企业库存管理流程资料的基础上,根据《仓库管理系统需求说明书》而编写的.●本说明书为2004级军人本科学员《信息系统原理与工程》的课程设计作业产品的一部分,项目由国防科技大学信息系统与管理学院学员四队指挥自动化工程专业课程设计作业第四小组负责组织实施.1。
1编写目的编写该设计说明书的目的是为了给该系统的使用者和开发者提供:●软件总体需求:向用户描述仓库人事管理系统的基本功能.●功能要求和数据结构:开发人员进行详细设计和编码的基础。
●软件综合测试的依据:第三方进行软件测试的指南和参考。
1.2读者对象该设计说明书的读者为:小型企业公司相关人员、项目组成员及辅导教员。
1。
3项目背景软件系统名称:仓库管理系统仓库管理系统是企业信息系统中一个相当重要的组成部分。
仓库管理系统的好坏直接影响企业物流管理效果,并直接影响企业的经济效益。
其主要作用是帮助企业的仓库管理人员建立物料管理账目、规范物料出入库手续、分析库存物料利用及资金占用情况,并为物料采购供应、生产计划、销售部门提供必要的库存数据。
1.4参考资料●张维明,戴长华,陈卫东,信息系统原理与工程,电子工业出版社,北京,2004年7月(第2版).●Curtis HK Tsang, Clarence SW Lau, Ying K Leung, 面向对象技术—-使用VP—UML实现图到代码的转换, 清华大学出版社,北京,2007年2月(第1版)。
仓库管理系统源代码

仓库管理系统源代码#include#include#include#include#includestruct cangku{int num;char name[20];char introdution[50];float square;};typedef struct cangku Cangku;int Input(Cangku t[]);void List(Cangku t[],int n); void SearchOnName(Cangku t[],int n);int DeleteRecord(Cangku t[],int n); int AlterRecord(Cangku t[],int n); int AddRecord(Cangku t[],int n); void SortOnName(Cangku t[],int n); void SortOnSquare(Cangku t[],int n); void SaveRecord(Cangku t[],int n); int LoadRecord(Cangku t[]); int LoadRecord1(Cangku t[]); void Save(Cangkut[],int n); void Load(Cangku t[],int n); void Load1(Cangku t[]);int Menu_select();void main(){Cangku ck[50];int i,l,length,w=1;int q[4]={5,2,1,0};system("cls");printf("请输入第1个密码:\n");for (i=0;i<4;i++){scanf("%d",&l);system("cls");if(l==q[i])printf("正确,继续输入第%d个密码:.\n",i+2); else{w=0;printf ("输入错误!\n");break;}}while(w){switch(Menu_select()){case 1: length=Input(ck);SaveRecord(ck,length);break;case 2: length=LoadRecord(ck); SearchOnName(ck,length); break;case 3: length=LoadRecord(ck); length=DeleteRecord(ck,length); SaveRecord(ck,length);break;case 4: length=LoadRecord(ck); length=AlterRecord(ck,length); SaveRecord(ck,length);break;case 5: length=LoadRecord(ck); length=AddRecord(ck,length); SaveRecord(ck,length);break;case 6: length=LoadRecord(ck); system("cls");List(ck,length);break;case 7: length=LoadRecord(ck); system("cls");SortOnName(ck,length);SaveRecord(ck,length);break;case 8: length=LoadRecord(ck); system("cls");SortOnSquare(ck,length);SaveRecord(ck,length);break;case 9: length=LoadRecord(ck); system("cls");Save(ck,length);break;case 0: length=LoadRecord1(ck);Load1(ck);system("cls");Load(ck,length);break;case 10: exit(0);}}}int Menu_select(){int c;printf("按任意键进入仓库管理菜单\n");getchar();system("cls");system("color F0");printf(" ******************************仓库管理*******************************\n");printf(" * 1. 录入仓库初始记录 *\n");printf(" * 2. 按仓库名称查找记录 *\n");printf(" * 3. 删除仓库记录 *\n");printf(" * 4. 修改仓库记录 *\n");printf(" * 5. 增加仓库信息 *\n");printf(" * 6. 显示全部记录 *\n");printf(" * 7. 按仓库名称排序*\n");printf(" * 8. 按仓库面积排序*\n");printf(" * 9. 备份*\n");printf(" * 0. 恢复*\n");printf(" * 10. 退出*\n");printf("******************************************************************** *\n");do{printf("\n输入您想要进行的操作选项键(0-10):"); if(scanf("%d",&c)!=1){while(getchar()!='\n')continue;}}while(c<0||c>10);return c;}int Input(Cangku t[]){int i,n;system("cls");printf("\n请输入要输入的仓库数目:\n");scanf("%d",&n);printf("开始输入仓库信息:\n");for(i=0;i<n;i++){system("cls");printf("\n第%d个仓库的编号:",i+1);scanf ("%d",&t[i].num);printf("第%d个仓库的名称:",i+1);scanf ("%s",t[i].name);printf("第%d个仓库的面积:",i+1);scanf ("%f",&t[i].square);printf("第%d个仓库的说明:",i+1);scanf ("%s",t[i].introdution); }return (n);}void List(Cangku t[],int n){int i;printf("******************************************************************** *\n");printf(" ** 编号名称面积说明\n");printf("---------------------------------------------------------------------\n");for(i=0;i<n;i++){printf("%17d%13s%20f%14s\n",t[i].num,t[i].name,t[i].square,t[i].intr odution);}printf("******************************************************************** *\n");printf ("\n");getchar();}void SearchOnName(Cangku t[],int n) {char s[20];int i,flag=0;system("cls");printf("请输入要查找的仓库名称:\n");scanf("%s",s);for(i=0;i<n;i++){if(strcmp(s,t[i].name)==0){flag=1;system("cls");printf("\n\n要查找的仓库信息如下:\n");printf("\n");printf("******************************************************************** *\n");printf(" ** 编号名称面积说明\n");printf("---------------------------------------------------------------------\n");{printf("%17d%13s%20f%14s\n",t[i].num,t[i].name,t[i].square,t[i].intr odution);}printf("******************************************************************** *\n");printf ("\n");}}if(flag==0)printf("要查找的仓库不存在!!\n");getchar();}int DeleteRecord(Cangku t[],int n){char s[20];char ch;int i,j,flag=0;system("cls");printf("请输入要删除的仓库名称\n");scanf("%s",s);for(i=0;i<n;i++){if(strcmp(s,t[i].name)==0){flag=1;system("cls");printf("\n\n要删除的仓库信息如下:\n");printf("\n");printf("******************************************************************** *\n");printf(" ** 编号名称面积说明\n");printf("---------------------------------------------------------------------\n");{printf("%17d%13s%20f%14s\n",t[i].num,t[i].name,t[i].square,t[i].intr odution);}printf("******************************************************************** *\n");printf ("\n");printf("确定删除仓库信息吗?(Y/N)\n"); ch=getchar();ch=getchar();if(ch=='Y'||ch=='y'){for(j=i;j<n-1;j++)t[j]=t[j+1];n--;i--;printf ("删除成功.\n");}}}if(flag==0)printf("要删除的仓库不存在!!\n"); getchar();return n;}int AlterRecord(Cangku t[],int n) { int i,flag=0;char s[20],ch;system("cls");printf("请输入要修改的仓库名称\n");scanf("%s",s);for(i=0;i<n;i++){if(strcmp(s,t[i].name)==0){flag=1;system("cls");printf("\n\n要修改的仓库信息如下:\n");printf("\n");printf("*********************************************************************\n" );printf(" ** 编号名称面积说明\n");printf(" ---------------------------------------------------------------------\n");{printf("%17d%13s%20f%14s\n",t[i].num,t[i].name,t[i].square,t[i].intr odution);}printf("******************************************************************** *\n");printf ("\n");printf("确定修改仓库信息吗,(Y/N)\n");ch=getchar();ch=getchar();if(ch=='y'||ch=='Y'){system("cls");printf("请输入修改后的信息:\n");printf("请输入仓库新的名称:");scanf("%s",t[i].name);printf("请输入%s仓库新的编号:",t[i].name); scanf("%d",&t[i].num);printf("请输入%s仓库新的面积:",t[i].name); scanf("%f",&t[i].square);printf("请输入%s仓库新的说明:",t[i].name); scanf("%s",t[i].introdution);}}}if(flag==0)printf("要修改的仓库不存在~~\n"); getchar();return n;}int AddRecord(Cangku t[],int n) {int i,m;system("cls");printf("\n请输入再增加的记录数:\n"); scanf("%d",&m);printf("开始追加记录\n");for(i=n;i<n+m;i++){ system("cls");printf("\n第%d个仓库的编号:",i+1); scanf("%d",&t[i].num);printf("第%d个仓库的名称:",i+1); scanf("%s",t[i].name);printf("第%d个仓库的面积:",i+1); scanf("%f",&t[i].square);printf("第%d个仓库的说明:",i+1); scanf("%s",t[i].introdution);}return (n+m);}void SortOnName(Cangku t[],int n) {int i,j;struct cangku temp ;for(j=1;j<n;j++)for(i=0;i<n-j;i++)if((strcmp(t[i].name,t[i+1].name))>0) {temp=t[i];t[i]=t[i+1];t[i+1]=temp;}printf("排序成功!!!\n");printf("排序后仓库信息列表如下:\n"); List(t,n);}void SortOnSquare(Cangku t[],int n) {int i,j;struct cangku temp ;for(j=1;j<n;j++)for(i=0;i<n-j;i++)if(t[i].square<t[i+1].square){temp=t[i];t[i]=t[i+1];t[i+1]=temp;}printf("排序成功!!!\n");printf("排序后仓库信息列表如下:\n");List(t,n);}void SaveRecord(Cangku t[],int n) {int i;FILE *fp;if((fp=fopen("record.txt","w"))==NULL) {printf("不能打开文件!\n");exit(1);}for(i=0;i<n;i++){fwrite(&t[i],sizeof(struct cangku),1,fp); }fclose(fp);}int LoadRecord(Cangku t[]){int n=0;FILE *fp;if((fp=fopen("record.txt","a+"))==NULL) {printf("不能打开文件!\n");exit(1);}while(fread(&t[n],sizeof(struct cangku),1,fp)) n++; fclose(fp);printf("从文件中成功读出记录!!!\n");return n;}int LoadRecord1(Cangku t[]) {int n=0;FILE *fp;if((fp=fopen("bkrecord.txt","a+"))==NULL){printf("不能打开文件!\n");exit(1);}while(fread(&t[n],sizeof(struct cangku),1,fp)) n++; fclose(fp);printf("从文件中成功读出记录!!!\n");return n;}void Save(Cangku t[],int n) {int i;FILE *fp;if((fp=fopen("bkrecord.txt","w"))==NULL){printf("不能打开文件!\n");exit(1);}for(i=0;i<n;i++){fwrite(&t[i],sizeof(struct cangku),1,fp);}fclose(fp);printf("备份成功.\n");getchar();}void Load1(Cangku t[]) {int n=0;FILE *fp;if((fp=fopen("bkrecord.txt","a+"))==NULL){printf("不能打开文件!\n");exit(1);}while(fread(&t[n],sizeof(struct cangku),1,fp)) n++; fclose(fp);getchar();}void Load(Cangku t[],int n) {int i;FILE *fp;if((fp=fopen("record.txt","w"))==NULL) {printf("不能打开文件!\n");exit(1);}for(i=0;i<n;i++){fwrite(&t[i],sizeof(struct cangku),1,fp); }fclose(fp);printf("恢复成功.\n");}。
C语言课程设计仓库管理系统

C语言课程设计仓库管理系统一、教学目标本课程旨在通过学习仓库管理系统,让学生掌握C语言编程的基本概念和方法,培养学生具备一定的软件开发能力。
具体的教学目标如下:1.知识目标:(1)理解C语言的基本语法和数据结构;(2)掌握C语言的函数、指针、 arrays等核心概念;(3)熟悉常用的库函数和预处理指令;(4)了解软件开发的基本流程。
2.技能目标:(1)能够使用C语言编写简单的程序;(2)具备基本的代码调试和优化能力;(3)能够独立完成简单的软件项目。
3.情感态度价值观目标:(1)培养学生对计算机科学的兴趣和热情;(2)培养学生良好的编程习惯和团队协作精神;(3)使学生认识到编程对于解决实际问题的价值。
二、教学内容本课程的教学内容主要包括C语言的基本语法、数据结构、函数、指针、数组等核心概念,以及软件开发的基本流程。
具体的教学大纲如下:1.C语言的基本语法和数据结构;2.函数、指针和数组的概念及应用;3.常用的库函数和预处理指令;4.软件开发的基本流程;5.综合实例:仓库管理系统的设计与实现。
三、教学方法为了提高教学效果,我们将采用多种教学方法相结合的方式进行教学。
具体包括:1.讲授法:用于讲解C语言的基本语法、数据结构、函数、指针、数组等核心概念;2.案例分析法:通过分析实际案例,使学生更好地理解仓库管理系统的设计与实现;3.实验法:让学生动手编写代码,巩固所学知识,提高编程能力;4.小组讨论法:分组进行讨论,培养学生的团队协作能力和问题解决能力。
四、教学资源为了支持本课程的教学,我们将准备以下教学资源:1.教材:选用权威、实用的C语言教材;2.参考书:提供丰富的C语言编程参考书籍;3.多媒体资料:制作精美的课件,辅助讲解;4.实验设备:提供足够的计算机设备,让学生进行编程实践。
通过本课程的学习,希望学生能够掌握C语言编程的基本概念和方法,为今后的计算机科学学习和软件开发打下坚实基础。
五、教学评估为了全面、客观地评估学生的学习成果,我们将采用多种评估方式相结合的方法。
(完整word版)仓库管理系统

仓库管理系统摘要本系统主要完成对物资仓库的库存管理,包括入库、出库,用户信息,物资信息等四个方面。
系统可以完成对各类信息的浏览、查询、添加、删除、修改等功能。
系统的核心是入库、出库二者之间的联系,每一个表的修改都将联动的影响其它的表,当完成入库或出库操作时系统会自动地完成库存的修改.查询功能也是系统的核心之一,其目的都是为了方便用户使用。
系统有完整的用户添加、删除和密码修改功能,系统采用Microsoft Office中的Access 2000来设计数据库,并使用开发工具eclipse.论文主要介绍了本课题的开发背景,所要完成的功能和开发的过程。
重点的说明了系统设计的重点、设计思想、难点技术和解决方案。
关键字:数据库,SQL语言,eclipse。
AbstractSummary of the system of the major materials warehouse inventory management,including storage,warehousing, user information,Information materials in four aspects. System can be completed on various information browsing, query,add,delete,change, and other functions. The core of the system is created, out of the links between the two,one for each table the amendment will affect other linkage of the table, Upon the completion of the delivery or removal operation system will automatically complete inventory changes。
仓库管理系统系统架构及功能

仓库管理系统系统架构及功能关键信息项:1、系统架构描述2、功能模块详情3、数据存储与安全机制4、系统性能要求5、维护与升级计划6、培训与支持服务11 系统架构描述111 仓库管理系统将采用基于客户端服务器(C/S)架构,客户端负责与用户进行交互,服务器端负责数据处理和存储。
112 系统采用分层架构,包括表示层、业务逻辑层和数据访问层。
表示层用于展示用户界面,业务逻辑层处理业务规则和流程,数据访问层负责与数据库进行交互。
113 为了保证系统的可扩展性和灵活性,将采用微服务架构,将不同的功能模块拆分成独立的服务,便于独立部署和升级。
12 功能模块详情121 入库管理模块1211 支持多种入库方式,包括采购入库、生产入库、退货入库等。
1212 入库时能够自动生成入库单号,并记录入库物品的详细信息,如名称、规格、数量、批次、生产日期等。
1213 对入库物品进行质量检验,不合格物品能够进行标记和处理。
122 出库管理模块1221 支持多种出库方式,如销售出库、领料出库、调拨出库等。
1222 出库时能够根据库存情况进行库存预警,避免库存不足。
1223 自动生成出库单号,并记录出库物品的详细信息。
123 库存管理模块1231 实时更新库存数量,能够准确反映库存的增减变化。
1232 提供库存盘点功能,支持定期盘点和不定期盘点。
1233 对库存进行预警设置,当库存低于或高于设定值时,系统自动发出警报。
124 报表管理模块1241 提供各类库存报表,如库存日报表、月报表、年报表等。
1242 支持自定义报表,用户可以根据自己的需求选择报表字段和格式。
1243 能够将报表导出为 Excel、PDF 等格式,方便打印和保存。
13 数据存储与安全机制131 数据存储采用关系型数据库,如 MySQL 或 Oracle,确保数据的完整性和一致性。
132 定期进行数据备份,备份策略包括全量备份和增量备份,备份数据存储在异地服务器,以防止数据丢失。
c语言仓库物资管理系统亲测可用

c语言仓库物资管理系统亲测可用系统概述C语言仓库物资管理系统是一款用于仓库物资管理的软件系统,可以帮助用户实现对仓库物资的入库、出库、盘点等操作。
本系统基于C语言开发,功能齐全,操作简单,可靠性高。
功能特点1. 仓库物资入库管理该功能主要用于对仓库物资的入库管理。
用户可以通过该功能对仓库内的物资进行入库操作,系统会自动记录入库时间、数量及库存量等信息,方便用户进行仓库物资的管理。
2. 仓库物资出库管理该功能主要用于对仓库物资的出库管理。
用户可以通过该功能对仓库内的物资进行出库操作,系统会自动记录出库时间、数量及库存量等信息,方便用户进行仓库物资的管理。
3. 仓库物资盘点管理该功能主要用于对仓库物资的盘点管理。
用户可以通过该功能对仓库内的物资进行盘点操作,系统会自动记录盘点时间、实际库存量及差异量等信息,方便用户进行仓库物资的再次核对。
4. 仓库物资查询与统计该功能主要用于对仓库物资的查询与统计。
用户可以通过该功能对仓库内的物资进行查询,包括物资的名称、种类、规格、库存量等信息,方便用户进行仓库物资的管理。
原理说明1. 仓库信息存储该系统基于文件夹存储方式,将仓库的名称、管理员、联系电话等信息存储在文件夹中。
文件夹中还包括物资信息存储文件和日志文件。
2. 物资信息存储物资信息存储在文本文件中,包括物资的编号、名称、种类、规格、库存量及入库时间等信息。
3. 入库管理原理物资入库管理主要分为两步,即输入相关信息和物资库存更新。
用户在输入相关信息后,系统会自动更新物资的库存记录,包括库存量和入库时间等信息。
4. 出库管理原理物资出库管理主要分为两步,即输入相关信息和物资库存更新。
用户在输入相关信息后,系统会自动更新物资的库存记录,包括库存量和出库时间等信息。
5. 盘点管理原理物资盘点管理主要分为两步,即输入相关信息和物资库存更新。
用户在输入相关信息后,系统会自动更新物资的库存记录,包括库存量和盘点时间等信息。
仓库管理系统

摘要随着计算机技术的飞速发展,计算机在企业管理中应用普及,信息管理系统已经成为企事业单位不可缺少的一部分,它的内容对于企业的决策者和管理者来说都是至关重要的,所以利用计算机实现管理企业势在必行。
仓库管理系统是典型的信息管理系统,其开发主要包括后台数据库的建立和维护以及前台应用程序的开发和维护两个方面。
对于前者要求建立起数据一致性和完整性强、数据安全性好的数据库。
而对于后者则要求应用程序功能完备,易使用等特点。
本文结合企业仓储管理的实际情况,提出了针对中小型企业仓库管理系统的基本设计思想,简要介绍了系统各功能模块及数据库的设计,着重讨论了用C#.NET技术和SQL S erver 2008开发企业仓库管理系统时的数据库访问技术和应用程序设计技术,并给出了部分实现代码。
该系统在Windows XP系统和VS.NET平台下开发完成,使用C#作为开发语言,SQL Server 2008作为后台数据库,该数据库系统在安全性、准确性、运行速度方面均有绝对的优势,并且能够对容量较大的数据库进行处理,效率高,系统有较高的安全性和较好的性能,充分利用两者的优势,提高了编程效率和可靠性。
本文中除了有对程序的系统分析、总体设计、数据库设计、功能实现等主体部分外,在这之前还介绍了与企业仓库管理系统相关的信息、VS.NET与SQL的无缝链接技术等。
通过该系统,使员工可以方便地在企业内部进行仓储管理,给予企业决策者有利的支持。
同时通过该项目的编写加深了大家对C#语言和SQL语言的了解,为开发大型项目奠定基础。
关键词:仓库管理、C#、SQL Server 2008、开发和维护ABSTRACTWith the rapiddevelopment ofcomputer technology,computer applicationinenterprise managementpopularization, the information ma nagement systemhasbecomean indispensable part of enterprisesand instit utions, its contentforcorporatedecision makers andmanagers is vital,so usingcomputer to realize enterprise management is imperative.Warehouse management system is atypicalapplicationof managing informationsystem, itsdevelopment mainly includes the establishment andmaintenanceof database and foreground applicationdevelopment and maintenance of two aspects.Since for theformer requirement to establishdataconsistency and integrality, datasecurity gooddatabase. And for the latter request applicationsfully functional,easyto use,etc.Combined with the actual situation of enterprise warehouse management,thispaperputs forwardfor small andmedium-sizedenterprise warehousemanagementsystem basic design though t, this paperbriefly introduces thesystemeachfunctionmodule anddatabase design,and emphatically discusses thedevelopment withC#.NET technology and SQLServer 2008enterprisewarehouse managementsystem database access technologyand application design, and gives part of theimplementationcode.The system ona Windows XP system and VS.NET platform development is complete, usingc#asdevelopmentlanguage, SQLServer 2008asthe backgrounddatabase, the database system in terms ofsaf ety, accuracy,speedhasthe absoluteadvantage,and the ability to database for processing of large capacity,high efficiency, the system hashig hsecurity andgood performance,make full use of theadvantagesof the two, and improved the programming efficiency and reliability.In this article,in addition to the application ofsystemanalysis, overalldesign, databasedesign, function realization, mainpar t, before that,also introduced the information related toenterprise warehousemanagement system, theseamless link VS.NETand SQL technology,etc.Throughthis system, employees can easily within the enterprisewarehousemanagement, to givebetter support enterprisedecision makers. Throughthe project at thesame time writing deepenedunderstanding of c #language andSQL language,tolay a goodfoundation forthe development of large-scale projects.Keywords:warehousemanage,C#,SQLServer2008,developmentandmaintenance目录第1章绪论ﻩ错误!未定义书签。
库存管理系统(上)

库存管理系统(上)前言:仓库库存管理系统是一个企业不可缺少的部分,它的内容对于企业的决策者和管理者来说都至关重要,所以仓库库存管理系统应该能够为用户提供充足的信息和快捷的查询手段。
但一直以来人们使用传统人工的方式管理仓库中的各种物资设备,这种管理方式存在着许多缺点,如:效率低、另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。
随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。
作为计算机应用的一部分,使用计算机对物资信息进行管理,具有着手工管理所无法比拟的优点.例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。
这些优点能够极大地提高人事劳资管理的效率,也是企业的科学化、正规化管理,与世界接轨的重要条件。
因此,开发这样一套库存管理软件成为很有必要的事情。
【摘要】库存管理系统是典型的信息管理系统(MIS),其开发主要包括后台数据库的建立和维护以及前端应用程序的开发两个方面。
对于前者要求建立起数据一致性和完整性强.数据安全性好的库。
而对于后者则要求应用程序功能完备,易使用等特点。
经过分析如此情况,我们使用微软公司的VisualBasic开发工具,利用其提供的各种面向对象的开发工具,尤其是ADO,是能方便而简洁操纵数据库的智能化对象,短期内就可以开发出用户满意的可行系统。
关键字: 库存管理 ADO 面相对象库存ABC分析AbstractStockpile manage system is a typical MIS.It’s development mostly include the foundation and maintenance of the database and the development of the client application programme.For the former we must eatablish a better database,which has well data consistency and data security.For the latter we must make the programme has self-contained function and easy to be use.By analysing the situation,we use the VB of the Microsoft company as client tool,and use some of the tools of opp, especially ADO object,which can easily conveniently manipulate the database.We use it can develop a satisfactory system in short timeKey: Stockpile manage ADO OPP The analysis of Stockpile第一章概述1.1 库存管理的必要性大多数库存管理理论认为,库存是物理上和逻辑上库房库位的所有有形和无形物料极其价值的总和,具体包括成品、原材料、在制品、在途品、生产前物料、备品备件等。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
作品名称开发者:一、系统背景:本软件能减轻对货物数目管理及价格盈亏等信息处理的工作量以便能快捷及时准确的调整货物的仓储量达到最合理化。
可以使店主不失效率的节省大量精力用于其他方面符合当今社会的商业形式而且本软件体积小操作简单是管理仓库的不二选择二、系统简介:设计亮点:◆三级菜单使操作更简便明了◆密码操作能有效保证客户信息的安全性◆独特的dos命令调用使信息存储的实体属性为隐藏且无扩展名大大增大了安全系数◆数据结构为链表摆脱了数据数量的限制◆提供三种查看模式并会标出排名◆退出店主模式时会提示是否保存若选择yes着进行保存操作基本功能:·在员工模式下可输入卖出货物的名称和数目程序自动在后台进行一系列的操作·新建数据并同时对其处理·修改数据·插入数据·删除数据·查找数据·查看数据·数据存档·修改密码三、系统结构图#define LEN sizeof(struct shop) #include<stdio.h>#include<conio.h>#include<string.h>#include<stdlib.h>struct shop{char name[30];float price_in;float price_out;int num_in;int num_now;int num_sold;float win;float percent;struct shop *next;};int n=0;void main(void){void auto1(struct shop **h_p);int menu1(struct shop **h_p);void print1(void);void assistant(struct shop *head);int password(void);int menu2(struct shop **h_p);void print2(void);void creat(struct shop **h_p);void rewrite(struct shop **h_p);void insert(struct shop **h_p);void deleat(struct shop **h_p);void search(struct shop **h_p);void printall(struct shop **h_p);void save(struct shop *head);void password_set(void);int password_exi(struct shop **h_p);int data_exi(struct shop **h_p);void load(struct shop **h_p);void save(struct shop *head);struct shop *addbuild(struct shop **h_p); void sort0(struct shop **h_p);int search1(struct shop **h_p,char a[30]); void sort1(struct shop **h_p);void sort2(struct shop **h_p);void sort3(struct shop **h_p);void print3(void);void password_create(void);struct shop *addbuild(struct shop **h_p); int a;struct shop *head,**h_p;head=NULL;auto1(h_p);do{a=menu1(h_p);}while(a!=3);system("cls");printf("谢谢使用^_^");getch();}int menu1(struct shop **h_p){int a,b;struct shop *head;head=*h_p;print1();scanf("%d",&a);putchar('\n');getchar();do{switch(a){case 1:assistant(head);break;case 2:if(password())do{b=menu2(h_p);}break;default:break;}if(a!=3){system("cls");print1();scanf("%d",&a);}}while(a!=3);return(a);}int menu2(struct shop **h_p) {int b;char a;struct shop *head;head=*h_p;print2();scanf("%d",&b);putchar('\n');getchar();do{switch(b){case 1:creat(h_p);break; case 2:rewrite(h_p);break;case 3:insert(h_p);break;case 4:deleat(h_p);break;case 5:search(h_p);break;case 6:printall(h_p);break;case 7:head=*h_p;save(head);break; case 8:password_set();break;default:break;}if(b!=9){system("cls");print2();scanf("%d",&b);getchar();}}while(b!=9);printf("\n保存吗?(y/n):");putchar('\n');scanf("%c",&a);if(a=='y'){head=*h_p;save(head);}return(b);}void auto1(struct shop **h_p){if(password_exi(h_p) && data_exi(h_p))load(h_p);}void print1(void){system("cls");printf("********************************************************************************\n");printf(" 仓库管理系统\n");printf("********************************************************************************\n");printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n");printf(" #******************* 菜单*****************# \n");printf(" #| 1.员工模式|# \n");printf(" #| 2.店主模式|# \n");printf(" #| 3.退出|# \n");printf(" #*********************************************# \n");printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n");printf("\n请选择(1-3):");}void assistant(struct shop *head){char a[50],c='y';int b;struct shop *i;i=head;while(c=='y'){system("cls");printf("\n请输入卖出的商品名称:\n");gets(a);putchar('\n');printf("\n请输入卖出的商品数量:\n");scanf("%d",&b);putchar('\n');while(strcmp(i->name,a)!=0&&i->next!=NULL)i=i->next;if(i->next!=NULL){i->num_now-=b;i->win=(i->num_in-i->num_now)*(i->price_out-i->price_in); }elseprintf("\n此商品不存在或通知店主更新数据库\n"); printf("\n继续吗?(y/n):");putchar('\n');c=getchar();getchar();}save(head);}int password(void){FILE*fp;char a[50],b[50];int i;system("cls");fp=fopen("c:\\y_secrea","rb");fscanf(fp,"%s",&a);fclose(fp);printf("请输入密码:\n");putchar('\n');i=0;do{b[i]=getch();printf("*");i++;}while(b[i-1]!=13&&i<19);b[i-1]='\0';if(strcmp(a,b)==0)return(1);elsereturn(0);}void print2(void){system("cls");printf("********************************************************************************\n");printf(" 店主模式\n");printf("********************************************************************************\n");printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n");printf(" #******************* 菜单*****************# \n");printf(" #| 1.新建 2.修改|# \n"); printf(" #| 3.插入 4.删除|# \n"); printf(" #| 5.查找 6.查看|# \n"); printf(" #| 7.保存8.改密|# \n");printf(" #| 9.上一层|# \n");printf(" #*********************************************# \n");printf(" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n");printf("请选择(1-9):");}void creat(struct shop **h_p){struct shop *head,*i,*j;int f=1;head=NULL;n=0;printf("\n请输入数据若完成请在名称处输“0”.\n\n");i=j=addbuild(&head);if(strcmp(i->name,"0")==0)f=0;while(f){n++;if(n==1)head=j;f=1;printf("\n请输入下一种货物的数据.\n\n");i=addbuild(&head);if(strcmp(i->name,"0")==0){free(i);f=0;break;}j->next=i;j=i;}j->next=NULL;*h_p=head;}void rewrite(struct shop **h_p){char a[30];struct shop *i,*j,*head;head=*h_p;i=head;do{printf("\n请输入要修改货物的名称:");putchar('\n');gets(a);if(n>=1&&!search1(h_p,a)){printf("\n不存在的货物名称!\n");getch();if(head==NULL) goto end;}}while(n>=1&&!search1(h_p,a));while(strcmp(a,i->name)!=0&&i->next!=NULL) {i=i->next;}if(strcmp(a,i->name)==0){printf("\n真的要修改吗??(y/n):");putchar('\n');if(getchar()=='y'){getchar();j=addbuild(h_p);strcpy(i->name,j->name);i->price_in=j->price_in;i->price_out=j->price_out;i->num_in=j->num_in;i->num_now=j->num_now;i->num_sold=j->num_sold;i->win=j->win;i->percent=j->percent;free(j);printf("\n修改完成^_^\n\n");}}end:;}void insert(struct shop **h_p){struct shop *i,*j,*x,*head;head=*h_p;x=addbuild(h_p);i=j=head;while(strcmp(i->name,x->name)<0&&i->next!=NULL){j=i;i=i->next;}if(strcmp(i->name,x->name)>=0){if(i==head)head=x;elsej->next=x;x->next=i;}else{i->next=x;x->next=NULL;}printf("\n插入完成^_^\n\n.");*h_p=head;}void deleat(struct shop **h_p){struct shop*i,*j,*head;char a[30],b;head=*h_p;do{system("cls");printf("\n请输入你要删除的货物的名称:\n");putchar('\n');gets(a);if(n>=1&&!search1(h_p,a)){printf("\n不存在的货物名称!\n");if(head==NULL) goto end;}}while(n>=1&&!search1(h_p,a));printf("\n真的要删除吗?(y/n):");putchar('\n');b=getchar();getchar();if(b=='y'){i=head;while(strcmp(i->name,a)!=0&&i->next!=NULL){j=i;i=i->next;}if(strcmp(i->name,a)==0){if(i==head){head=i->next;free(i);}elsej->next=i->next;n--;printf("\n删除完成^_^.\n\n");*h_p=head;}}end:;}void search(struct shop **h_p){int begin,end,mid,t;char a[30];struct shop *i,*head;head=*h_p;i=head;printf("\n请输入要查询货物的名称:");putchar('\n');gets(a);while((strcmp(i->name,a)!=0)&&i->next!=NULL) {i=i->next;}if((strcmp(i->name,a)==0)){printf("\n名称\t进价\t售价\t进货数目存货数目销量\t赢利\t利率\n");printf("\n======================================================= ========================\n");printf("%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f",i->name,i->price_in,i->price_out,i->num_in,i->num_now,i->num_sold,i->win,i->percent);}elseprintf("\n此货物不存在!\n");getch();}void printall(struct shop **h_p){int a,c;char b='y';struct shop *i;while(b=='y'){do{system("cls");print3();scanf("%d",&a);}while(a!=1&&a!=2&&a!=3);switch(a){case 1:sort1(h_p);break;case 2:sort2(h_p);break;case 3:sort3(h_p);break;default:break;}for(c=1,i=*h_p;i->next!=NULL;i=i->next,c++){printf("\n名称\t进价\t售价\t进货数目存货数目销量\t赢利\t利率\t排名\n");printf("\n======================================================= ========================\n");printf("%s%10.2f%10.2f%10d%10d%10d%9.2f%10.2f%8d",i->name,i->price_in,i->price_ out,i->num_in,i->num_now,i->num_sold,i->win,i->percent,c);if(c%8==0){getch();getchar();printf("按任意键继续。