资源描述
西北大学
继续教育学院
成人高等教育毕业论文
题目: 商品销售管理系统的设计与实现
指导教师:
学生姓名:
学 号:
专 业: 软件技术
年 级: 2011级
学历层次: 专 科
学历形式: 函 授
完成时间:二0 年 月 日
摘 要
随着科学的不断进步,计算机应用已经遍布整个社会的每个角落。计算机在商业管理上的应用,使其逐步系统化、完善化。利用计算机帮助企业高效率完成销售管理的日常事务,是适应现代企业制度要求,也是推动企业销售管理走向科学化、规范化的必要条件。本系统就是基于以上思想而开发的,我们选用C#开发此系统,应用了ADO数据库访问技术,数据库选用目前功能强大的SQL SERVER 2005和Visual Studio 2005,它有存储量大,查询速度快,加之本身支持网络环境,进一步方便数据的传输等优点。由于销售管理是一项琐碎、复杂而又十分细致的工作,在销售的各个环节中不允许出错,实行手工操作,每月就会耗费工作人员大量的时间和精力,该销售系统的使用将可以避免了以上的难题,不但能够保证单价,账目核算准确无误,而且还可以利用该系统对有关销售的各种信息进行统计,服务于财务部门和销售部门等的业务处理。本文通过对商品销售工作流程的深入了解及进行了可行性分析后,对商品销售管理系统作了需求分析、功能模块划分、数据库的设计以及界面设计,并完成了系统的开发。
关键词:SQL Server 2005,数据库,商品销售,查询
目 录
前 言 1
第1章 系统概述 2
1.1系统研究状况 2
1.2数据库访问方法 2
第2章 系统调研及可行性分析 3
2.1系统研究 3
2.2系统总体目标 3
2.3技术可行性分析 3
第3章 商品销售管理系统分析 4
3.1系统需求分析 4
3.1.1功能需求 4
3.1.2 性能需求 4
3.2系统流程图 5
第4章 商品销售管理系统设计 6
4.1 概要设计 6
4.1.1功能模块 6
4.2数据库设计 7
4.2.1 E-R模型设计 7
第5章 销售系统应用程序界面设计 9
5.1用户登录模块设计 9
5.2销售系统主界面模块设计 一三
5.3商品销售录入模块设计 一五
5.4商品销售查询模块设计 22
5.5退货管理模块设计 23
5.6商品进货录入模块设计 25
5.7库存管理模块设计 27
5.8供应商管理模块设计 28
5.9用户管理模块设计 30
5.10更改密码模块设计 31
结论 36
致谢 37
参考文献 38
前 言
传统的商品销售管理在商品的统计和管理上不但麻烦,而且还十分的耗费人力和时间。而商品销售管理系统对商品的进货、退货、存货和销售情况等进行了综合统计和管理,使管理人员能够更快的得到自己想要的信息。
一个好的商品销售管理系统首先应具备的是基本的信息管理,而商品销售管理系统不但对商品信息信息、代理商信息、订单信息等都进行了系统的管理,而且管理人员可以直接登陆系统查看所有的信息,也可以根据自己的需要搜索相关的信息。本文对系统开发中面临的问题及其解决方案进行详细的设计及合理安排,根据所掌握的技术对系统的各部分功能进行了实现。
第1章 系统概述
1.1系统研究状况
伴随知识经济的发展和现代信息技术的不断改进,人们的生活节奏越来越快,而对信息的要求越来越高,快捷方便已经成为信息的一个重要指标。对于一个好的零售公司,拥有完整全面的信息管理系统变得非常重要。在这种情况下,商品销售管理系统应运而生。通过本系统用户可以更快的获得最全面的信息,而且可以通过本系统查询所有需要的信息,大大的方便了用户的操作。目前的商品销售管理系统已能顺利完成商品的进、销、存工作,多为单机版,网络版还不多见,但网络版应是以后的发展重点。
1.2数据库访问方法
1. BDE方法:它提供了存取各种文型和客户/服务器型数据库的驱动器程序。该方法直接访问Paradox和Dbase等数据库或通过DOBC(Open DataBase connecivity,开放数据库)来访问Access和PoxPro等数据库,还可通过内嵌方式访问SQL Servr、Oracle和DB2等大型数据库。
2. ADO方法:ADO方法是微软提供的一种数据库访问技术。通过ADO技术可方便的访问各种类型的数据库,尤其对于OLEDB类型的数据库,ADO更是访问数据库的标准接口。Delphi通过ADO技术可让开发者快速访问关系或非关系型数据库,但使用时需安装ADO的数据库引擎。
3. MIDAS方法:MIDAS方法是Delphi用于开发多层应用系统的中间透明引擎。通过MIDAS,开发者可使用相同的组件来存取不同的后台应用程序服务器。这些后台应用服务器程序包括COM+/DCOM应用程序服务器、MTS中间件或CORBA应用程序服务器。MIDAS方法实现了真正意义上的客户端程序与后台数据库的分离,但MIDAS的灵活性很差,与数据感应控件关联过于密切,限制了程序员的创造性。
第2章 系统调研及可行性分析
2.1系统研究
(1)通过对商品销售管理进行调研分析后,确定了本系统将要实现的功能。
(2)在系统设置模块中实现对系统基本信息和路径进行设置。
(3)在权限管理模块中实现对用户级别的选择再组合相应的权限进行设置。
(4)在代理商进/退货录入模块中实现代理商对商品进退货的记录的修改、增加和删除。
(5)在定单进货数据录入窗口以及查询模块中实现对定单的录入和定单信息的查询。
(6)在商品分布查询模块中实现对各类商品的分布进行综合的查询。
2.2系统总体目标
本商品销售管理系统系统在使用上比起原来的操作方式更加方便、简单;界面设计上美观大方;后期维护上比较容易,如要对功能模块方面作修改,则无需进行整个系统的重新架构。
2.3技术可行性分析
本系统是一个典型的数据库应用程序。现有的数据库应用程序开发技术已非常成熟,利用现有技术完全可以实现预定的功能。系统采用Delphi开发工具,该工具功能强大,扩展性强,适合任何的编程工作,这些技术完全胜任开发任务;并且利用该工具能使操作人员可在短时间能完全掌握系统维护工作。
第3章 商品销售管理系统分析
3.1系统需求分析
经过以上对本系统的调研及可行性分析后,下面将对系统在功能上以及性能上进行进一步的需求分析。
3.1.1功能需求
由于商品销售管理系统是一个用来帮助使用者管理商品销售流程的软件。使用者通过对销售过程中所涉及到的商品,订单,销售商等资料的录入,便可以轻松实现商品销售流程的管理。所以,此系统必须向使用者提供一下一些具体功能:
1:软件必须向使用者提供商品基本的录入,删除,编辑等基本功能
2:鉴于商品的不同销售方式(分为订单销售和代理商销售两种形式),软件必须向使用者提供商品销售环节中的基本管理功能,因此必须有订单分销模块和代理商分销模块。
3:软件必须向使用者提供基本的查询功。
4:由于是销售管理软件,所以系统安全性必须是要考虑的问题。因此,必须实现以下两点:
A:系统操作员机制。对系统的使用者,按等级开放管理权限,这样可以在一定程度上保证数据库系统的安全性,避免数据被泄漏,非法更改等。
B:销售数据直接反映了一个销售单位的盈亏状况,鉴于销售数据的重要性,所以必须对这些数据加以保护,在系统崩溃时或者误操作等情况下,可以对数据进行恢复。这就需要系统提供备份功能。
5 :对于销售数据不能只存储在计算机中,而是需要导出步骤,最后以印刷品的形式出现在使用者面前,该软件设计的最终目的才能得以具体的实现。所以,打印功能是必不可少的系统功能之一。
3.1.2 性能需求
本系统的目标是:使用者通过对基本销售信息的录入,即可方便直观的实现对商品交易流程的管理,查询,以及对已有信息的打印输出等功能。本销售系统定义了两种销售模式:
1.订单销售。即销售方通过订单方式销售的商品。
2.代理商销售方式。(此功能略复杂,所以在实现的是时候必须对其提供录入修改查询等基本功能)。
除了上述基本功能外,系统还必须提供必要的附加功能:
1.数据备份功能。
2.密码登陆功能。
3.操作员及相应的权限管理功能。
综上所述,为实现上述系统目标,必须定义相应功能的单元模块。
3.2系统流程图
登陆
判断是否合法
系统
信息查询
信息修改
增加
修改
删除
更新
错误提示信息
更新到数据库
查询条件
错误提示信息
从数据库读取数据
图3-1 系统流程图
第4章 商品销售管理系统设计
4.1 概要设计
4.1.1功能模块
商品销售管理系统
系统管理模块
销售管理模块
修改密码
用户管理
销售录入
进货录入
退货管理
库存管理
供应商管理
销售查询
数据库
图4-1功能模块图
4.2数据库设计
4.2.1 E-R模型设计
用户
代理商
商品
管理
管理
用户名
进退
代号
单价
数量
名称
性别
密码
权限
代号
名称
地址
联系人
订单
管理
编号
日期
型号
名称
数量
日期
电话
图4-2 E-R模型图
4.2.2 表设计
表4-1 表名:liyi (用户表)
字段名
数据类型
长度
是否允许空值
约束
username
Varchar
16
Not null
Primary key
Password
Varchar
16
Not null
Safety
Char
8
Not null
表4-2表名:Supplier(供应商表)
字段名
数据类型
长度
是否允许空值
约束
Sup_id
Char
5
Not null
Primary key
Sup_name
Varchar
16
Not null
Sup_contact
varChar
16
Not null
Sup_phone
varChar
一五
Not Null
sup_address
Varchar
40
Not Null
表4-3表名:Purchase (进货表)
字段名
数据类型
长度
是否允许空值
约束
P_id
Char
5
Not null
Primary key
P_name
Varchar
20
Not null
price
Float
Not null
number
int
Not null
P_date
Varchar
16
Not null
Primary key
sup_id
Char
5
Not null
Foreigner key
表4-4表名:sale(销售表)
字段名
数据类型
长度
是否允许空值
约束
p_id
Char
5
Not null
Primary key
price
float
Not null
number
int
Not null
total
float
Not null
S_date
Varchar
16
Not null
Primary key
表4-5表名:Return (退货表)
字段名
数据类型
长度
是否允许空值
约束
p_id
Char
5
Not null
Primary key
number
int
Not null
r_date
varchar
16
Not null
Primary key
reason
varchar
50
yes
第5章 销售系统应用程序界面设计
5.1用户登录模块设计
图5.1用户登录窗口效果图
namespace Sales
{
partial class login
{
private SystemxponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button_exit = new System.Windows.Forms.Button();
this.button_login = new System.Windows.Forms.Button();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.textBox_username = new System.Windows.Forms.TextBox();
this.textBox_password = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
this.SuspendLayout();
this.groupBox1.Controls.Add(this.textBox_password);
this.groupBox1.Controls.Add(this.textBox_username);
this.groupBox1.Controls.Add(this.label2);
this.groupBox1.Controls.Add(this.label1);
this.groupBox1.Dock = System.Windows.Forms.DockStyle.Top;
this.groupBox1.Location = new System.Drawing.Point(0, 0);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(406, 144);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox2.Controls.Add(this.button_exit);
this.groupBox2.Controls.Add(this.button_login);
this.groupBox2.Dock = System.Windows.Forms.DockStyle.Bottom;
this.groupBox2.Location = new System.Drawing.Point(0, 一五0);
this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(406, 91);
this.groupBox2.TabIndex = 1;
this.groupBox2.TabStop = false;
this.button_exit.Location = new System.Drawing.Point(254, 32);
this.button_exit.Name = "button_exit";
this.button_exit.Size = new System.Drawing.Size(81, 32);
this.button_exit.TabIndex = 1;
this.button_exit.Text = "退出";
this.button_exit.UseVisualStyleBackColor = true;
this.button_exit.Click += new System.EventHandler(this.button_exit_Click);
this.button_login.Location = new System.Drawing.Point(61,
32);
this.button_login.Name = "button_login";
this.button_login.Size = new System.Drawing.Size(81, 32);
this.button_login.TabIndex = 0;
this.button_login.Text = "登录";
this.button_login.UseVisualStyleBackColor = true;
this.button_login.Click += new System.EventHandler(this.button_login_Click);
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(77, 45);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 0;
this.label1.Text = "用户名:";
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(77, 89);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(41, 12);
this.label2.TabIndex = 1;
this.label2.Text = "密码:";
this.textBox_username.Location = new System.Drawing.Point(一五5, 42);
this.textBox_username.Name = "textBox_username";
this.textBox_username.Size = new System.Drawing.Size(一五7, 21);
this.textBox_username.TabIndex = 2;
this.textBox_password.Location = new System.Drawing.Point(一五5, 86);
this.textBox_password.Name = "textBox_password";
this.textBox_password.PasswordChar = '*';
this.textBox_password.Size = new System.Drawing.Size(一五7, 21);
this.textBox_password.TabIndex = 3;
this.AcceptButton = this.button_login;
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.CancelButton = this.button_exit;
this.ClientSize = new System.Drawing.Size(406, 241);
this.ControlBox = false;
this.Controls.Add(this.groupBox2);
this.Controls.Add(this.groupBox1);
this.MaximumSize = new System.Drawing.Size(414, 275);
this.Name = "login";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "登录";
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.GroupBox groupBox2;
private System.Windows.Forms.Button button_exit;
private System.Windows.Forms.Button button_login;
private System.Windows.Forms.TextBox textBox_password;
private System.Windows.Forms.TextBox textBox_username;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label label1;
}
}
5.2销售系统主界面模块设计
图5-2销售系统主界面窗口效果图
该窗体是本系统的统筹界面。它是系统的结构匡架,便于对整个系统的观摩、管理.主要使用Label和 panl以及manu等控件实现的。Image控件使得界面得以美化。 由于每次操作不一定会用到所有的数据库,所以没有必要在每次运行时生成所有的数据库别名。Session控件提供了动态生成数据库别名的方法,使通过操作选择窗体进行优选择的别名生成成为可能。
主要代码为:
namespace Sales
{
partial class main
{
private SystemxponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem 商品销售管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品销售录入ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品销售查询ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品退货管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品进货管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品进货录入ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 商品库存管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 供应商管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 系统设置ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 用户管理ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 更改密码ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 关于ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 退出系统ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
}
}
5.3商品销售录入模块设计
图5-3销售录入窗口效果图
主要代码为:
namespace Sales
{
partial class salesadd
{
private SystemxponentModel.IContainer components = null;
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows 窗体设计器生成的代码
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.textBox_date = new System.Windows.Forms.TextBox();
this.textBox_number = new System.Windows.Forms.TextBox();
this.textBox_price = new System.Windows.Forms.TextBox();
this.textBox_id = new System.Windows.Forms.TextBox();
this.label4 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.groupBox2 = new System.Windows.Forms.GroupBox();
this.button_exit = new System.Windows.Forms.Button();
this.button_update = new System.Windows.Forms.Button();
this.button_delete = new System.Windows.Forms.Button();
this.button_add = new System.Windows.Forms.Button();
this.dataGridView1 = new System.Windows.Forms.DataGridView();
this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.Column6 = new System.Windows.Forms.DataGridViewTextBoxColumn();
this.groupBox1.SuspendLayout();
this.groupBox2.SuspendLayout();
((SystemxponentModel.ISupportInitialize)(this.dataGridView1)).BeginInit();
this.SuspendLayout();
this.groupBox1.Controls.Add(th
展开阅读全文