图书管理系统系统设计含代码

上传人:新** 文档编号:507365299 上传时间:2023-08-03 格式:DOC 页数:38 大小:888.50KB
返回 下载 相关 举报
图书管理系统系统设计含代码_第1页
第1页 / 共38页
图书管理系统系统设计含代码_第2页
第2页 / 共38页
图书管理系统系统设计含代码_第3页
第3页 / 共38页
图书管理系统系统设计含代码_第4页
第4页 / 共38页
图书管理系统系统设计含代码_第5页
第5页 / 共38页
点击查看更多>>
资源描述

《图书管理系统系统设计含代码》由会员分享,可在线阅读,更多相关《图书管理系统系统设计含代码(38页珍藏版)》请在金锄头文库上搜索。

1、高级程序设计语言图书管理系统设计报告学院: 国土资源工程学院 专业: 测 绘 工 程 成员:*指导教师:黄云铠日期: 2014年11月5日1 系统设计1.1 设计目标本系统是针对图书管理工作过程进行设计的,主要实现如下目标:注册用户可以登录此系统;非注册用户注册后可以使用本系统;读者可以查询、借阅、归还图书等; 管理员可以对读者、图书进行管理。1.2数据库设计概述1.2.1概念结构设计将从需求分析中得到的数据信息抽象为概念模型,经分析可得到数据库的E-R模型。如图所示。 图书名称作者编号出版日期价格种类图1-1 图书实体ER图密码 读者XX编号专业借阅时间借书量年龄性别图1-2 实体读者ER图

2、用户密码类型编号图1- 3 用户实体ER图1.2 项目规划图书管理系统是一个典型的数据库应用程序,由应用程序和后台数据库两部分构成。(1)应用程序应用程序主要包括登录,注册,用户信息,读者信息,图书信息管理,借阅图书,综合查询,信息等几个部分组成。(2)数据库 数据库负责对图书信息,用户信息等数据的管理。2 数据库设计说明书21 数据库表结构2.1.1 图书表book2.1.2 借阅信息表borrow2.1.2用户信息表Reader2.1.4 用户信息权限表right2.1.5用户账号表user2.1.6 管理员账号表usererheper2.2数据关系图2.3图书管理系统暂有数据(模拟运行)

3、2.3.1管理员学工号:2014701020 :邢吉昌密码:1112.3.2普通用户学工号:2014701021 :猪八戒密码:333学工号:2014701022 :悟空密码:4442.3.3图书信息编号 作者 书名 出版日期 价格 书类H319584781 MARK C#入门经典 清华大学 2011/4/5 21.56 计算机H319584782 哪吒 和猴子的那些事 天庭文印 2010/1/2 216.5 情感H319584783二郎神 我也可以闹天宫 天庭文印 2009/8/1 29.32 技术3 程序功能的实现3.1登陆界面已注册用户登录时,用户类别选择普通用户或管理员,不选择会出现提

4、示主要代码如下:using System;using System.Collections.Generic;using System ponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsFormsApplication1publicpartialclassLoginForm : Form publicstring password;

5、privateint ErrorTimes;string User, Pwd;bool flagshow = false;privatebool yanzhengshuru() password = textBox3.Text;if(Typename.Text.Trim()=) MessageBox.Show(请选择登录类型,登录提示,MessageBoxButtons.OK,MessageBoxIcon.Information); Typename.Focus();returnfalse; elseif(loginid.Text.Trim()=) MessageBox.Show(请输入用户名

6、, 登录提示,MessageBoxButtons.OK, MessageBoxIcon.Information); loginid.Focus();returnfalse; elseif (password = ) MessageBox.Show(请输入密码, 登录提示,MessageBoxButtons.OK, MessageBoxIcon.Information); textBox3.Focus();returnfalse; else returntrue; public LoginForm() InitializeComponent(); privatevoid cancelbtn_Cl

7、ick(object sender, EventArgs e) Application.Exit(); privatevoid LoginForm_Load(object sender, EventArgs e) privatevoid LoginForm_Closing(object sender, FormClosingEventArgs e) Application.Exit(); privatevoid loginbtn_Click(object sender, EventArgs e) if (yanzhengshuru() if (Typename.Text.Trim() = 管理

8、员) SqlConnection conConnection = newSqlConnection(Data Source=.sqlexpress;Initial Catalog=学生管理数据库;Integrated Security=True); conConnection.Open();string cmd = select AdminID,AdminPass from userhelper ;SqlCommand = newSqlCommand(cmd, conConnection);SqlDataReader reader = .ExecuteReader();while (reade

9、r.Read() User = readerAdminID.ToString(); Pwd = readerAdminPass.ToString();if (User.Trim() = loginid.Text & Pwd.Trim() = textBox3.Text) flagshow = true; reader.Close(); conConnection.Close();if (flagshow = true) this.Hide();admin f1 = newadmin (); f1.ShowDialog(); else if (Typename.Text.Trim() = 普通用

10、户) SqlConnection conConnection1 = newSqlConnection(Data Source=.sqlexpress;Initial Catalog=学生管理数据库;Integrated Security=True); conConnection1.Open();stringd = select ReaderID,ReaderPassword from reader ;SqlCommandm = newSqlCommand(cnd, conConnection1);SqlDataReader reader1 =m.ExecuteReader();while (r

11、eader1.Read() User = reader1ReaderID.ToString(); Pwd = reader1ReaderPassword.ToString();if (User.Trim() = loginid.Text & Pwd.Trim() = textBox3.Text) flagshow = true; reader1.Close(); conConnection1.Close();if (flagshow = true) this.Hide();读者查阅 f1 = new读者查阅(); f1.ShowDialog(); else MessageBox.Show(用户名不存在或密码错误!, 提示); ErrorTimes+

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 商业/管理/HR > 商业计划书

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号