目录
1绪论 2
1.1内容简介及意义 2
1.2开发工具及技术介绍 2
2总体设计 4
2.1系统总体架构 4
2.2登录模块总体设计 6
2.3主界面模块总体设计 7
2.4停车证管理模块总体设计 7
2.5停车位管理模块总体设计 8
2.6员工管理模块总体设计 8
2.7其他模块总体设计 9
3详细设计 10
3.1登录模块设计 10
3.2主界面模块设计 10
3.3停车证管理模块设计 10
3.4停车位管理模块设计 11
3.5员工管理模块设计 13
3.6其他模块设计 14
4系统测试 15
5小结 16
参考文献 17
附录 18
员工或管理员在登录页面选择不同的身份输入自己的工号和密码后进入系统主页面,点击该页面的菜单项内容进入不同的系统模块进行不同的操作。管理员用户的菜单会额外显示员工管理选项和车位收费标准选项。普通员工登陆之后,菜单中的员工管理选项和车位收费标准选项会隐藏且普通员工无法进行操作。该系统为实现相关的操作,共在数据库中创建了保存管理员相关信息的管理员表(表2-1)、保存员工信息的员工表(表2-2)、保存停车证信息的停车证表(表2-3)、保存停车位信息的停车位表(表2-4)和保存收费标准的收费标准表(表2-5)五个表。
停车位管理模块包括车位信息的查询、添加、编辑和删除以及车辆的驶入、驶出和计费等功能。主界面菜单中的“车位管理”选项用于选择车辆驶入和车辆驶出并计费两种功能;主界面菜单中的“车位信息检索”选项用于实现停车位信息的检索、添加、编辑和删除功能。
测试内容:项目编码结束后,运行测试整个系统功能
测试方法:测试任何软件都有两种方法:黑盒测试和白盒测试法。
黑盒测试法(又称功能测试法)是把程序看成一个黑盒子,完全不考虑程序的内部结构和处理过程,是在程序接口进行的测试,它只检查程序功能是否按照规格说明书的规定正常使用。
白盒测试法(又称结构测试法)是把程序看成装在一个透明的白盒子里,也就是完全了解程序的结构和处理过程,本文转载自http://www.biyezuopin.vip/onews.asp?id=15044这种方法按照程序内部的逻辑测试程序,检验程序中的每条通路是否都能按照预定要求正确工作。
测试结果:
(1)空余停车位编号在使用之后,空余停车场的下拉框中仍存在该停车位的编号。
(2)用户修改密码后弹出重新登陆界面会跳转至登陆界面,但主菜单界面未关闭。
(3)查询停车位信息、员工信息和停车证信息时,限制条件增多后查询会报错。
解决方法:
(1)在每次停入车辆之后,清除列表的Items属性,并重新查询添加该属性。
(2)修改密码界面和主菜单界面的关系和单纯的主窗口与子窗口关系有区别,所以不能在用之前的调用关系。修改二者的关系并添加新的调用函数,问题解决。
(3)限制条件的增多会使得查询语句中where段和and段的关系不明确,造成查询语句的格式不规范,所以报错,修改规范后,问题解决。
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace GloryH
{
public partial class index : Form
{
int d = 1;
string username;
public index()
{
InitializeComponent();
}
public index(int d,string username)
{
InitializeComponent();
this.d = d;
this.username = username;
}
private void Form1_Load(object sender, EventArgs e)
{
if (d == 0)
{
员工管理ToolStripMenuItem.Visible = true;
收费标准ToolStripMenuItem.Visible = true;
}
else
{
员工管理ToolStripMenuItem.Visible = false;
收费标准ToolStripMenuItem.Visible = false;
}
}
private void Label1_Click(object sender, EventArgs e)
{
}
private void 新书入库ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
protected override void OnResize(EventArgs e)
{
base.OnResize(e);
int x = (int)(0.5 * (this.Width - panel1.Width));
int y = (int)(0.5 * (this.Height - panel1.Height));
panel1.Location = new System.Drawing.Point(x, y);
int x1 = (int)(0.5 * (this.Width - label1.Width));
int y1 = (int)(0.5 * (this.Height - label1.Height));
label1.Location = new System.Drawing.Point(x1, y1);
}
private void 旧书销毁ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 借记卡管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 图书租赁ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 车辆停入ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
CarIn carin = new CarIn();
carin.MdiParent = this;
carin.Parent = this.panel1;
label1.Visible = false;
carin.FormBorderStyle = FormBorderStyle.None;
carin.Show();
}
private void Panel1_Paint_1(object sender, PaintEventArgs e)
{
}
private void MenuStrip2_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
{
}
private void 车辆驶出ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
Carout carin = new Carout();
carin.MdiParent = this;
carin.Parent = this.panel1;
label1.Visible = false;
carin.FormBorderStyle = FormBorderStyle.None;
carin.Show();
}
private void 停车证管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 车位信息检索ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
SearchParking searchParking = new SearchParking();
searchParking.MdiParent = this;
searchParking.Parent = this.panel1;
label1.Visible = false;
searchParking.FormBorderStyle = FormBorderStyle.None;
searchParking.Show();
}
private void Label1_Click_1(object sender, EventArgs e)
{
}
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{
login inde = new login();
this.Hide();
inde.Show();
}
private void 停车证办理ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
CardAdd cardAdd = new CardAdd();
cardAdd.MdiParent = this;
cardAdd.Parent = this.panel1;
label1.Visible = false;
cardAdd.FormBorderStyle = FormBorderStyle.None;
cardAdd.Show();
}
private void 停车证挂失ToolStripMenuItem_Click(object sender, EventArgs e)
{
}
private void 停车证检索ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
SearchCard cardAdd = new SearchCard();
cardAdd.MdiParent = this;
cardAdd.Parent = this.panel1;
label1.Visible = false;
cardAdd.FormBorderStyle = FormBorderStyle.None;
cardAdd.Show();
}
public void reLoad_method()
{
//窗体数据初始化方法,fuForm_Load中的全部操作,调用此方法可实现数据的刷新
login lo = new login();
this.Hide();
lo.Show();
}
private void 员工管理ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
Employee cost = new Employee();
cost.MdiParent = this;
cost.Parent = this.panel1;
label1.Visible = false;
cost.FormBorderStyle = FormBorderStyle.None;
cost.Show();
}
private void 收费标准ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
Cost cost = new Cost();
cost.MdiParent = this;
cost.Parent = this.panel1;
label1.Visible = false;
cost.FormBorderStyle = FormBorderStyle.None;
cost.Show();
}
private void 修改密码ToolStripMenuItem_Click(object sender, EventArgs e)
{
panel1.Controls.Clear();
this.IsMdiContainer = true;
Password cost = new Password(d,username,this);
cost.MdiParent = this;
cost.Parent = this.panel1;
label1.Visible = false;
cost.FormBorderStyle = FormBorderStyle.None;
cost.Show();
}
}
}


























