实验室设备管理程序文件.docx

上传人:b****5 文档编号:4528866 上传时间:2022-12-01 格式:DOCX 页数:27 大小:331.89KB
下载 相关 举报
实验室设备管理程序文件.docx_第1页
第1页 / 共27页
实验室设备管理程序文件.docx_第2页
第2页 / 共27页
实验室设备管理程序文件.docx_第3页
第3页 / 共27页
实验室设备管理程序文件.docx_第4页
第4页 / 共27页
实验室设备管理程序文件.docx_第5页
第5页 / 共27页
点击查看更多>>
下载资源
资源描述

实验室设备管理程序文件.docx

《实验室设备管理程序文件.docx》由会员分享,可在线阅读,更多相关《实验室设备管理程序文件.docx(27页珍藏版)》请在冰豆网上搜索。

实验室设备管理程序文件.docx

实验室设备管理程序文件

《管理信息系统》课程设计报告书

实验室设备管理程序

晓红110541114

马宁宁110541120

郭颖洁110541107

俊宏110541113

顾乡110541106

专业:

工商管理

指导老师:

褚衍昌

所属学院:

经济与管理学院

二0一三年七月

2.4数据流程图2

3.1功能结构图2

 

第一章绪论

1.1项目背景

实验室设备管理程序是针对实验室复杂的设备能进行较为方便的管理而设计的程序,开发工具采用VisualC++6.0,主要对设备信息的录入,管理,使用等信息以及信息删除、修改、显示、保存等操作。

系统给用户提供了一个简单的人机界面,使用户可以根据提示进行操作,对设备进行方便的管理。

本系统主要功能有:

1.新建设备信息

2.查询设备信息

3.修改设备信息

4.显示设备信息

5.删除设备信息

6.设备分类显示

7.保存设备信息

8.退出系统

1.2基本情况介绍

功能需求:

根据系统界面进行操作。

一.新建设备信息:

对新设备进行信息录入,包括设备名称、编号,所在实验室名称、使用者等信息。

二.查询设备信息:

有按设备名称,设备编号,使用者三种方式进行,按提示操作,输入相应信息后显示所要查询的设备信息。

三.修改设备信息:

输入所要修改设备的名称,查找到并显示原来的信息,然后进行新信息的录入。

四.显示设备信息:

对所有设备的信息进行统一显示。

五.删除设备信息:

输入所要删除设备的名称,然后显示其信息,并询问是否删除,之后进行删除。

六.设备分类统计:

统计同一类别的设备数量,并显示。

七.保存设备信息:

将整理好的信息保存。

八.退出系统:

1.3小组分工

课程研究方向由全体成员共同讨论得出,具体如下:

软件开发:

晓红,马宁宁

论文编写:

郭颖洁,俊宏

论文修改:

顾乡

第二章系统分析

2.1可行性分析

一管理上的可行性

目前管理信息系统已被各企业广泛接受,高层管理人员利用管理信息系统能对该企业的资源进行全面有效的管理和利用,以实现其管理目标,达到利润最大化。

故此,顺应时代的发展,高层管理人员也愿意引进管理信息系统并为其实施创造效益的良好环境。

二技术上的可行性

目前,大多数企业都拥有一流的信息设备和技术人才,为管理信息系统的实施提供了技术支持。

三经济上的可行性

该系统可以提供更多的高质量的信息,提高信息交流的速度。

故此,该系统从经济效益方面衡量是可行的。

通过初步调查,企业面临的问题以及企业的发展战略,明确了开发新系统的目的。

1.加强企业部物品管理,及时掌握实验器材库存。

2.及时掌握试验部门需求,制定采购计划。

3.加强生产过程的管理,及时提供各种器材信息。

4.加强成本管理。

5.规员工管理,规器材管理规章制度。

2.2实验室设备管理信息系统的项目进程

1、首先应该对实验室管理系统进行系统的分析。

报告对总体的规划和可行性的研究,现行系统的详细的调查,需求的分析和逻辑结构的构思。

2、其次总体设计。

系统总体结构的设计,数据库的设计,计算机和网络系统的配置方案,系统的详细设计,如:

代码设计,用户界面设计等。

3、然后利用c++6.0程序与数据库结合。

2.3业务流程图

2.4数据流程图

第三章系统设计

3.1功能结构图

3.2系统功能模块

此程序通过以下模块实现其功能

1.主菜单显示:

通过menu_main()来显示首界面的主菜单,用户可根据提示进行操作。

2.新建模块:

通过input_info()来实现,通过输入设备名称、编号等信息完成输入,系统提示是否继续输入,Y继续N返回主菜单。

3.查询模块:

通过search_info()来实现,有三种查询方式,按设备名称,按编号,按使用者。

根据提示操作,查询到并显示所要查询的设备信息,之后系统提示是否继续,Y继续N返回查询子菜单。

子菜单中有退出查询选项。

4.修改模块:

通过modify_info()来实现,输入要修改设备的名称,系统找到并显示其原有信息,按提示输入新的信息,完成后提示修改成功。

5.显示模块:

通过show_info()来实现,将所有设备信息进行显示,完成后按任意键返回主菜单。

6.删除模块:

通过delete_info()来实现,输入要删除设备的名称,系统找到并显示其信息,系统提示是否删除,Y删除N取消。

完成后系统提示删除成功。

7.设备分类统计模块:

通过sort_out_info()来实现,输入所要统计的设备类别,系统将显示所有此类设备的信息,并显示统计的数量。

完成后系统提示是否继续,Y继续N返回主菜单。

8.保存模块:

通过save_info()模块来实现,将文件保存到“实验室设备管理记录”里面。

9.退出系统:

通过exit_system()来实现。

本程序用此结构体来存储信息,并建立结点。

typedefstructnode{

charname[30];//设备名称

intserialNum;//设备编号(不重复)

charposition[30];//设备所在实验室名称

charuser[20];//使用者

doubleprice;//设备价格

charvarity[20];//设备种类(如:

微机、打印机、扫描仪等等)

chardate[20];//设备购买日期,如20090101等

structnode*next;

}device,*pdevice;

3.3详细设计

 

3.4代码设计

#include

#include

#include

#include"device.h"

 

//主函数模块***********************************************************************

voidmenu_main(device*head)

{

charchoice;

while

(1){

system("cls");

print_menu_main();

choice=getchar();

getchar();

if(choice=='1')

input_info(head);

if(choice=='2')

search_info(head);

if(choice=='3')

modify_info(head);

if(choice=='4')

show_info(head);

if(choice=='5')

delete_info(head);

if(choice=='6')

sort_out_info(head);

if(choice=='7')

save_info(head);

if(choice=='8')

exit_system();

}

}

voidprint_menu_main()

{

printf("\n\n\t\t\t实验室设备管理系统\n");

printf("\n\n\t\t**********************************\n");

printf("\t\t**\t1.新建设备信息\t**\n");

printf("\t\t**\t2.查询设备信息\t**\n");

printf("\t\t**\t3.修改设备信息\t**\n");

printf("\t\t**\t4.显示设备信息\t**\n");

printf("\t\t**\t5.删除设备信息\t**\n");

printf("\t\t**\t6.设备分类统计\t**\n");

printf("\t\t**\t7.保存设备信息\t**\n");

printf("\t\t**\t8.退出系统\t**\n");

printf("\t\t**********************************\n");

printf("\t\t请选择:

");

}

//输入模块***********************************************************************

voidinput_info(device*head)

{

device*newnode;//

device*lastnode=NULL;

charcontinue_key;

system("cls");

newnode=(device*)malloc(sizeof(device));

if(newnode==NULL)

printf("\tallocationfailed!

");

create_newnode(newnode);

if(head==NULL)//?

head=newnode;

else{

lastnode=search_lastnode(head);

lastnode->next=newnode;

}

printf("\n\t是否继续?

Y/N\n");

printf("你的选择:

");

continue_key=getchar();

getchar();

if(continue_key=='Y'||continue_key=='y')

input_info(head);

else

menu_main(head);

}

voidcreate_newnode(device*newnode)

{

printf("\t\t\t\t新建设备信息\n\n");

printf("请输入->\n\n");

printf("设备名称:

");

gets(newnode->name);

printf("\n");

printf("设备编号:

");

scanf("%d",&newnode->serialNum);

getchar();

printf("\n");

printf("设备所在实验室名称:

");

gets(newnode->position);

printf("\n");

printf("使用者姓名:

");

gets(newnode->user);

printf("\n");

printf("设备价格:

");

scanf("%lf",&newnode->price);

getchar();

printf("\n");

printf("设备种类:

");

gets(newnode->varity);

printf("\n");

printf("购买日期:

");

gets(newnode->date);

newnode->next=NULL;

}

device*search_lastnode(device*head)

{

device*last=head;

if(head->next==NULL)

returnhead;

else{

while(last!

=NULL)

last=last->next;

}

returnlast;

}

//查询模块***********************************************************************

voidsearch_info(device*head)

{

chart;

system("cls");

print_menu_search();

t=getchar();

getchar();

if(t=='1')

search_by_name(head);

if(t=='2')

search_by_serialnum(head);

if(t=='3')

search_by_user(head);

//if(t=='4')

//exit_search();?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

?

}

voidprint_menu_search()

{

printf("\n\n\t\t\t\t实验室设备管理系统\n");

printf("\n\n\t\t************************************\n");

printf("\t\t**1.按设备名称查询**\n");

printf("\t\t**2.按设备编号查询**\n");

printf("\t\t**3.按使用者查询**\n");

printf("\t\t**4.退出查询菜单**\n");

printf("\t\t************************************\n");

printf("\t\t请选择:

");

}

voidsearch_by_name(device*head)

{

device*p=head;

charname[20];

inttemp=0;

charcontinue_key;

system("cls");

printf("\n\n\n\t\t\t按设备名称查找\n\n");

printf("请输入要查询设备名称:

");

gets(name);

printf("查询<%s>结果\n",name);

print_top();

while(p!

=NULL){

if(strcmp(p->name,name)==0){

print_node(p);

temp=1;

//break;

}

p=p->next;

}

print_buttom();

if(temp==0)

printf("\n\n\t!

!

!

没有您要查询的设备!

\n");

printf("\n是否继续?

Y.确定/N.取消\n\n");

printf("你的选择:

");

continue_key=getchar();

getchar();

if(continue_key=='Y'||continue_key=='y')

search_by_name(head);

else

search_info(head);

}

voidsearch_by_serialnum(device*head)

{

device*p=head;

intnum;

inttemp=0;

charcontinue_key;

system("cls");

printf("\n\n\n\t\t\t按设备编号查找\n\n");

printf("请输入要查询设备编号:

");

scanf("%d",&num);

getchar();

printf("查询<%d>号设备结果\n");

print_top();

while(p!

=NULL){

if(p->serialNum==num){

print_node(p);

temp=1;

break;

}

p=p->next;

}

print_buttom();

if(temp==0)

printf("\n\n\t!

!

没有您要查询的设备!

\n");

printf("\n是否继续?

Y.确定/N.取消\n");

printf("\n你的选择:

");

continue_key=getchar();

getchar();

if(continue_key=='Y'||continue_key=='y')

search_by_serialnum(head);

else

search_info(head);

}

voidsearch_by_user(device*head)

{

device*p=head;

charuser[20];

inttemp=0;

charcontinue_key;

system("cls");

printf("\n\n\n\t\t\t按设备使用者查找\n\n");

printf("请输入要查询设备使用者:

");

gets(user);

printf("查询<%s>结果\n",user);

print_top();

while(p!

=NULL){

if(strcmp(p->user,user)==0){

print_node(p);

temp=1;

break;

}

p=p->next;

}

print_buttom();

if(temp==0)

printf("\n\n\t!

!

没有您要查询的设备!

\n");

printf("\n是否继续?

Y.确定/N.取消\n");

printf("\n你的选择:

");

continue_key=getchar();

getchar();

if(continue_key=='Y'||continue_key=='y')

search_by_user(head);

else

search_info(head);

}

voidprint_top()

{

printf("+----------+----------+----------+----------+----------+----------+----------+\n");

printf("|设备名称|设备编号|所在实验室|使用者|设备价格|设备种类|购买日期|\n");

}

voidprint_node(device*p)

{

printf("+----------+----------+----------+----------+----------+----------+----------+\n");

printf("|%10s|%10d|%10s|%10s|%10.2lf|%10s|%10s|\n",p->name,p->serialNum,p->position,p->user,p->price,p->varity,p->date);

}

voidprint_buttom()

{

printf("+----------+----------+----------+----------+----------+----------+----------+\n");

}

//修改模块***********************************************************************

voidmodify_info(device*head)

{

device*p=head;

device*newinfo=(device*)malloc(sizeof(device));/////////

charname[20];

inttemp=0;

charcontinue_key;

system("cls");

if(newinfo==NULL)

printf("allocationfailed!

");

printf("\n\n\t\t\t修改设备信息\n\n");

printf("请输入要修改设备名称:

");

gets(name);

printf("\n");

while(p!

=NULL){

if(strcmp(p->name,name)==0){

temp=1;

break;

}

p=p->next;

}

if(temp==0)

printf("\t没有您要查询的设备!

");

else{

print_top();

print_node(p);

print_buttom();

}

re_input(newinfo);

copy_newinfo(p,newinfo);

printf("\n修改成功!

\n");

printf("\n是否继续?

Y.确定/N.取消\n");

printf("你的选择:

");

continue_key=getchar();

getchar();

if(continue_key=='Y'||continue_key=='y')

modify_info(head);

else

menu_main(head);

}

voidre_input(device*newinfo)

{

printf("\t\t\t重新输入设备信息\n\n");

printf("请输入->\n\n");

printf("设备名称:

");

gets(newinfo->name);

printf("\n");

printf("设备编号:

");

scanf("%d",&newinfo->serialNum);

getchar();

printf("\n");

printf("设备所在实验室名称:

");

gets(newinfo->position);

printf("使用者姓名:

");

gets(newinfo->user);

printf("\n");

printf("设备价格:

");

scanf("%lf",&newinfo->price);

getchar();

printf("\n");

printf("设备种类:

");

gets(newinfo->varity);

printf("\n");

printf("购买日期:

");

gets(newinfo->date);

}

voidcopy_newinfo(device*p,device*newinfo)

{

 

strcpy(p->name,newinfo->name);

strcpy(p->position,newinfo->position);

strcpy(p->user,newinfo->user);

strcpy(p->varity,newinfo->varity);

strcpy(p->date,newinfo->date);

p->serialNum=newinfo->serialNum;

p->price=newinfo->price;

}

//显示模块***********************************************************************

voidshow_info(device*head)

{

device*p=head;

system("cls");

printf("\t\t\t设备信息显示\n\n\n");

print_top();

while(p!

=NULL){

print_node(p);

p=p->next;/////////

}

print_buttom();

printf("\n按任意键返回主菜单\n\n");

getch

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > IT计算机 > 计算机软件及应用

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1