《数据库系统原理》课程设计报告基于ACCESS数据库的企业销售管理系统_第1页
《数据库系统原理》课程设计报告基于ACCESS数据库的企业销售管理系统_第2页
《数据库系统原理》课程设计报告基于ACCESS数据库的企业销售管理系统_第3页
《数据库系统原理》课程设计报告基于ACCESS数据库的企业销售管理系统_第4页
《数据库系统原理》课程设计报告基于ACCESS数据库的企业销售管理系统_第5页
已阅读5页,还剩24页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、江南大学太湖学院数据库课程设计江 南 大 学 太 湖 学 院数 据 库 课 程 设 计 报 告课题 基于access数据库的企业销售管理系统设 计 者 专 业 计算计科学与技术班 级 计科73学 号 0721087 同组成员名单指导老师 评定成绩 _2010年 1 月 8 日课 程 设 计 任 务 书一、课程名称 数据库系统原理 指导教师_ _二、本课程设计题目 基于access数据库的企业销售管理系统 三、本设计所要达到的目的和要求 1、主题明确,软体开发要有创新性,能体现access的数据表关联、主键及索引等; 2、用高级语言结合access数据库进行开发; 3、写出数据库关系模式及相应的

2、数据库表关系图; 4、绘制企业销售管理相应的系统流程图、e-r图等; 5、完成企业销售管理系统登陆界面、销售管理、基础数据、系统设置、系统帮助等各项设计与操作。 四、接受任务学生: 73 班 姓名 韩娟 五、开始及完成时间 自 2009 年 12 月 28 日 至 2010 年 1 月 8 日2009年 12 月 28 日2目录1、概述111引 言11.2 为什么要开发一个企业物资销售信息系统22 系统需求分析23功能需求分析231系统功能的描述332系统功能模块示意图44数据概念结构设计54.1数据流程图54.2e-r图65、逻辑结构设计76、系统界面及主要程序86.1创建程序框架86.2创

3、建数据连接类96.3创建登录对话框106.4系统查询管理126.5系统管理模块247、总结268、参考文献26261、概述根据下述需求陈述,设计:1、设计一个“企业销售管理系统”的mis(即管理信息系统)软件;2、用e-r图和关系模型进行数据库分析和设计; 3、用delphi 6 / 7 加sql server 2000后台数据库开发实现。 本题中待开发的软件,实现类似mis系统的功能。与实际的mis系统不同,本软件不强调实用功能,只需要能够体现sql server存储过程、查询、游标及触发器技术即可。重点在于数据库及表的创建,odbc的配置,数据库应用组件(data module, data

4、 source, dataset, adoconnection, adoquery,adotable等)的应用。具体需要实现以下功能:a) 登陆界面设计,正确输入用户名、密码能够进入系统;b) 能够实现主窗体、子窗体及菜单设计;具体要求:1实验环境 sql server 2000(数据库设计工具) microsoft office visio(e-r图等画图工具)delphi6 / 7(面向对象的可视化编程工具)photoshop(图形制作工具,可选用)2实验内容和所需时间1)利用 sql server 2000 的企业管理器,创建数据库及相关表。 2)利用 visio流程图软件,画出该系统的

5、功能模块图、e-r图3)利用delphi建立该应用程序主窗口界面,并且创建相关子界面及菜单 4)进一步为应用程序配置控件资源,且为每个动作过程编写相应的程序代码。 5)利用delphi提供的ado组件中的adoconnection 建立应用程序同sql数据库的连接,用其他数据库组件进行数据表的操作。接续完成各功能实现。11引 言 企业物资销售信息系统是一个企业单位不可缺少的部分,它的内容对于企业的决策者和销售者来说都至关重要,所以企业物资销售信息系统应该能够为用户提供充足的信息和快捷的查询手段。但一直以来人们使用传统人工的方式来销售,这种销售方式存在着许多缺点,如:效率低、保密性差,另外时间一

6、长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。作为计算机应用的一部分,使用计算机对企业物资信息进行销售,具有着手工销售所无法比拟的优点.例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。这些优点能够极大地提高企业物资销售的效率,也是企业的科学化、正规化销售,与世界接轨的重要条件。 1.2 为什么要开发一个企业物资销售信息系统 计算机已经成为我们学习和工作的得力助手: 今天,计算机的价格已经十分低廉,性能却有了长足的进步。它

7、已经被应用于许多领域,计算机之所以如此流行的原因主要有以下几个方面: 第一 计算机可以代替人工进行许多繁杂的劳动; 第二 计算机可以节省许多资源; 第三 计算机可以大大的提高人们的工作效率; 第四 计算机可以使敏感文档更加安全,等等。 2 系统需求分析 所谓系统分析,就是指在整个系统开发工程中,解决“做什么”的问题,把要解决哪些问题,满足用户哪些具体的信息需求调查分析清楚,从逻辑上或说从信息处理的功能需求上提出系统的方案,即逻辑模型,为下一阶段进行物理方案设计,解决怎么办提供依据。它是信息开发系统中的一个重要阶段,是建立系统模型的第一步。其核心是目标分析与需求分析,最后提出系统的设计方案。通过

8、对企业工作人员的调查得知,以前的物资销售办法,工作繁琐,工作量大,效率低。因而,建立一套物资销售信息系统势在必行。各单位的需求虽然不尽相同,但大概可分为以下几个方面: 用户的信息要求:随时查询库存物资状况,进行库存物资汇总,对记录能随时删除、插入及恢复. 用户的处理要求:能随时增加、删除,修改每一个库存物资记录,并能打印单据。 对数据的安全性、完整性的要求:要保证每个记录必须完整. 3功能需求分析 系统开发的总体任务是实现物资信息的系统化、规范化和自动化。系统功能分析是在系统开发的总体任务的基础上完成。31系统功能的描述下面是企业物资销售信息系统需要完成功能主要有: 有关客户基本信息的输入,包

9、括客户编号、客户名称 、传真号码、建档人和片区名称。 客户基本信息的查询。 客户基本信息的修改。 客户联系人信息的输入。 包括联系人编号、联系人姓名、客户编号、客户名称。客户联系人信息的查询。 客户联系人信息的修改。 合同信息输入。包括合同编号、签定日期、签定人、客户名称、客户联系人、合同金额、产品名称、产品型号、产品数量 合同信息查询。 合同信息修改。 发货记录的输入 包括发货计划编号、合同编号、客户名称、产品名称、产品型号、要货日期、取消量、执行状态 发货记录的查询 发货记录的修改 发票的输入 发票的查询 发票的修改 收款计划的查询与浏览 32系统功能模块示意图4数据概念结构设计4.1数据

10、流程图4.2e-r图5、逻辑结构设计转换成12个关系模式:(1) company_information(company_id、company_name、company_assist_code、company_oldname、company_address、company_legal_representative、company_economic_quality、company_nation、company_province、company_city、company_mail、company_phone、company_email、company_web_address、company_ban

11、k、company_account_number、company_tax_number、company_create_file_per、company_create_file_date、company_situation、company_register_code)(2) company_personal_information(person_id、person_name、person_assist_code、person_section、person_position、person_mobile_telnumber、person_phone、person_time_limit、person_

12、memo)(3) consign_plan(consign_id、contract_id、custom_name、pord_name、pord_type、pord_price、pord_amont、pord_sum、consign_data、cancle_amont、operat_state、consign_memo)(4) contract_record(contract_id、contract_name、contract_date、contract_sum、contract_prod_name、contract_prod_type、contract_prod_amont、contract_

13、consign_manner、contract_linkman_name、contract_subscriber、contract_inman)(5) custom_inf(custom_id、custom_name、custom_phone、custom_email、custom_fax、custom_inman、area_name)(6) custom_linkman_inf(linkman_id、linkman_name、linkman_sex、linkman_phone、linkman_mobile、linkman_email、linkman_company、linkman_depar

14、t、linkman_posotion、linkman_inman)(7) gathering_plan(contract_id、custom_name、gathering_sum、plan_date、cancel_amont、excute_state、g_plan_meno)(8) product_information(product_id、product_name、product_type、product_category、product_price)(9) production_category_information(prod_cate_id、prod_assist_code、prod

15、_cate_name、prod_cate_memo)(10) sale_invoice(invoice_id、invoice_date、consign_id、custom_name、prod_name、prod_type、prod_price、invoice_amont、invoice_sum、invoice_memo)(11) user_password(user_id、user_name、user_password)(12) zone_information(zone_id、zone_name、zone_assist_code、zone_director、zone_meno)其中带下划线的

16、为关系模式关键字(即主码)。6、系统界面及主要程序6.1创建程序框架系统登录成功后进入系统的主界面,通过主界面可以切换到各个子模块进行相关操作,新建窗体form2作为系统主界面的窗体,其界面布局效果图如下所示。窗体中使用的主控件及属性设置如表所示。控件类型对象属性属性值tbuttonbutton_add_1caption添加tbuttonbutton_select_1caption查询tpagecontrolpagecontrol_mainitems见表tpagecontrolpagecontrol_salemangementitem客户信息tbuttonbutton_modify_1capt

17、ion修改tlabellabel1caption客户编号teditedit_custom_id_1captiontadoqueryadoquery1connectionerss.mdb系统主界面的是设置整个系统的功能菜单,通过双击pagecontrol_main控件可以进行菜单编辑。6.2创建数据连接类双击下面图片中的ado。选择菜单中的connectionstring .按钮!出现对话框单击build,选择好数据源后测试,测试成功后便已经连接成功!6.3创建登录对话框在管理系统中,身份验证是系统进入的必要步骤,新建form1作为登录对话框,并设置标题为“用户登录”,其界面如图所示。我们为了实

18、现密码输入三次错误将退出系统,用户单击“确定”按钮触发onclicks事件,函数进行用户的验证和状态栏的设置,添加代码如下:procedure tform1.button_okclick(sender: tobject);begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select user_name,user_password from user_password where user_name=+edit_userid.text+); adoquery1.open; edit_userid.text:=adoque

19、ry1.fieldbyname(user_name).asstring; if adoquery1.fieldbyname(user_password).asstring = edit_password.text then begin form2.visible:=true; form1.visible:=false; end else begin if(i2) then begin i:=i+1; showmessage(密码错误,请重新输入!); edit_password.text:=; end else begin showmessage(密码输错3次,退出!); applicatio

20、n.destroy; end; end; end;6.4系统查询管理系统查询管理模块主要用于顾客信息的查询,添加、修改和删除,模块创建时将相关信息显示到dbgrid中,而除dbgrid以外的控件内容为空,用户在这个控件中输入数据,单击“查询”按钮可将输入添加到数据表中并显示在dbgrid中。如果要对其他记录进行修改和操作,只需要在dbgrid中选中记录再执行相关操作即可,具体设计和实现过程如下。procedure tform2.button_select_4click(sender: tobject);begin / if (edit_consign_id_4.text= )and (edit

21、_contract_id_4.text=) and (edit_custom_name_4.text=) and (edit_prod_name_4.text=)and (edit_prod_type_4.text=)and (edit_consign_data_4.text=) and(edit_cancle_amont_4.text=)and (edit_operat_state_4.text=) then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan ); e

22、dit_consign_id_4.text:=; adoquery1.open; end; if edit_consign_id_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where consign_id like %+edit_consign_id_4.text+%); edit_consign_id_4.text:=; adoquery1.open; end; if edit_contract_id_4.text then begin

23、 adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where contract_id like %+edit_contract_id_4.text+%); edit_contract_id_4.text:=; adoquery1.open; end; if edit_custom_name_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_p

24、lan where custom_name like %+edit_custom_name_4.text+%); edit_custom_name_4.text:=; adoquery1.open; end; if edit_prod_name_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where prod_name like %+edit_prod_name_4.text+%); edit_prod_name_4.text:=; ado

25、query1.open; end; if edit_prod_type_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where prod_type like %+edit_prod_type_4.text+%); edit_prod_type_4.text:=; adoquery1.open; end; if edit_consign_data_4.text then begin adoquery1.close; adoquery1.sql

26、.clear; adoquery1.sql.add(select* from consign_plan where consign_data like %+edit_consign_data_4.text+%); edit_consign_data_4.text:=; adoquery1.open; end; if edit_cancle_amont_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where cancle_amont like

27、 %+edit_cancle_amont_4.text+%); edit_cancle_amont_4.text:=; adoquery1.open; end; if edit_operat_state_4.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select* from consign_plan where operat_state like %+edit_operat_state_4.text+%); edit_operat_state_4.text:=; adoquery1.open;

28、 end;end;procedure tform2.button_select_5click(sender: tobject);begin / if (edit_invoice_id_5.text= )and (edit_custom_id_5.text=)and(edit_custom_name_5.text=) and (edit_prod_type_5.text=)and (edit_prod_name_5.text=)and (edit_prod_price_5.text=) and (edit_invoice_sum_5.text=)and (edit_invoice_amont_5

29、.text=)and (edit_invoice_date_5.text=)then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from sale_invoice,custom_inf where sale_invoice.custom_name=custom_inf.custom_name); edit_invoice_id_5.text:=; adoquery1.open; end; if edit_invoice_id_5.text then begin adoquery1.close;

30、adoquery1.sql.clear; adoquery1.sql.add(select * from sale_invoice,custom_inf where sale_invoice.invoice_id like %+edit_invoice_id_5.text+% and sale_invoice.custom_name=custom_inf.custom_name); edit_invoice_id_5.text:=; adoquery1.open; end; if edit_custom_id_5.text then begin adoquery1.close; adoquer

31、y1.sql.clear; adoquery1.sql.add(select * from sale_invoice,custom_inf where custom_inf.custom_id like %+edit_custom_id_5.text+% and sale_invoice.custom_name=custom_inf.custom_name ); edit_custom_id_5.text:=; adoquery1.open; end; if edit_custom_name_5.text then begin adoquery1.close; adoquery1.sql.cl

32、ear; adoquery1.sql.add(select * from sale_invoice,custom_inf where custom_inf.custom_name like %+edit_custom_name_5.text+% and sale_invoice.custom_name=custom_inf.custom_name ); edit_custom_name_5.text:=; adoquery1.open; end; if edit_prod_type_5.text then begin adoquery1.close; adoquery1.sql.clear;

33、adoquery1.sql.add(select * from sale_invoice,custom_inf where sale_invoice.product_type= like %+edit_prod_type_5.text+%and sale_invoice.custom_name=custom_inf.custom_name); edit_prod_type_5.text:=; adoquery1.open; end; if edit_prod_price_5.text then begin adoquery1.close; adoquery1.sql.clear; adoque

34、ry1.sql.add(select * from sale_invoice,custom_inf where sale_invoice.prod_price like %+edit_prod_price_5.text+% and sale_invoice.custom_name=custom_inf.custom_name); edit_prod_type_5.text:=; adoquery1.open; end; if edit_prod_name_5.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.

35、add(select * from sale_invoice,custom_inf where sale_invoice.prod_name like %+edit_prod_name_5.text+%and sale_invoice.custom_name=custom_inf.custom_name); edit_prod_name_5.text:=; adoquery1.open; end; if edit_invoice_sum_5.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(selec

36、t * from sale_invoice,custom_inf where sale_invoice.invoice_sum like %+edit_invoice_sum_5.text+% and sale_invoice.custom_name=custom_inf.custom_name ); edit_invoice_sum_5.text:=; adoquery1.open; end; if edit_invoice_amont_5.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(sele

37、ct * from sale_invoice,custom_inf where sale_invoice.invoice_amont like %+edit_invoice_amont_5.text+%and sale_invoice.custom_name=custom_inf.custom_name ); edit_invoice_amont_5.text:=; adoquery1.open; end; if edit_invoice_date_5.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add

38、(select * from sale_invoice,custom_inf where sale_invoice.invoice_date like %+edit_invoice_date_5.text+% and sale_invoice.custom_name=custom_inf.custom_name); edit_invoice_date_5.text:=; adoquery1.open; end;end;procedure tform2.button_select_6click(sender: tobject);begin/ if (edit_contract_id_6.text

39、=) and(edit_custom_name_6.text=)and(edit_gathering_sum_6.text=) and (edit_plan_date_6.text=)and (edit_cancel_amont_6.text=) and (edit_excute_state_6.text=) then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from gathering_plan); edit_contract_id_6.text:=; adoquery1.open; end

40、; if edit_contract_id_6.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from gathering_plan where contract_id like %+edit_contract_id_6.text+%); edit_contract_id_6.text:=; adoquery1.open; end; if edit_custom_name_6.text then begin adoquery1.close; adoquery1.sql.clear

41、; adoquery1.sql.add(select * from gathering_plan where custom_name like %+edit_custom_name_6.text+%); edit_custom_name_6.text:=; adoquery1.open; end; if edit_gathering_sum_6.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from gathering_plan where gathering_sum like

42、%+edit_gathering_sum_6.text+%); edit_gathering_sum_6.text:=; adoquery1.open; end; if edit_plan_date_6.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from gathering_plan where plan_date like %+edit_plan_date_6.text+%); edit_plan_date_6.text:=; adoquery1.open; end; if

43、 edit_cancel_amont_6.text then begin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from gathering_plan where cancel_amont like %+edit_cancel_amont_6.text+%); edit_cancel_amont_6.text:=; adoquery1.open; end; if edit_excute_state_6.text then begin adoquery1.close; adoquery1.sql.clea

44、r; adoquery1.sql.add(select * from gathering_plan where excute_state like %+edit_excute_state_6.text+%); edit_excute_state_6.text:=; adoquery1.open; end; end;procedure tform2.button_select_9click(sender: tobject);begin/if (edit_person_id_9.text=)and(edit_person_assist_code_9.text=)and (edit_person_n

45、ame_9.text=)and(edit_person_position_9.text=)and(edit_person_section_9.text=)thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from zone_information) ; edit_zone_id_8.text:=; adoquery1.open;end;if edit_person_id_9.text thenbegin adoquery1.close; adoquery1.sql.clear; adoquery

46、1.sql.add(select * from company_personnel_information where person_id like %+edit_person_id_9.text+%) ; edit_zone_id_8.text:=; adoquery1.open;end;if edit_person_assist_code_9.text thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from company_personnel_information where pers

47、on_assist_code like %+edit_person_assist_code_9.text+%) ; edit_person_assist_code_9.text:=; adoquery1.open;end;if edit_person_name_9.text thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from company_personnel_information where person_name like %+edit_person_name_9.text+%)

48、; edit_person_name_9.text:=; adoquery1.open;end;if edit_person_position_9.text thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from company_personnel_information where person_position like %+edit_person_position_9.text+%) ; edit_person_position_9.text:=; adoquery1.open;end

49、;if edit_person_section_9.text thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from company_personnel_information where person_section like %+edit_person_section_9.text+%) ; edit_person_section_9.text:=; adoquery1.open;end;end;procedure tform2.button_select_8click(sender:

50、tobject);begin/if (edit_zone_id_8.text=)and(edit_zone_assist_code_8.text=)and (edit_zone_name_8.text=)and(edit_zone_director_8.text=)thenbegin adoquery1.close; adoquery1.sql.clear; adoquery1.sql.add(select * from zone_information) ; edit_zone_id_8.text:=; adoquery1.open;end;if edit_zone_id_8.text thenbegin adoquery1

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论