ImageVerifierCode 换一换
格式:DOCX , 页数:37 ,大小:959.13KB ,
资源ID:4278386      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bingdoc.com/d-4278386.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(图书管理系统软件报告.docx)为本站会员(b****3)主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(发送邮件至service@bingdoc.com或直接QQ联系客服),我们立即给予删除!

图书管理系统软件报告.docx

1、图书管理系统软件报告软件课程设计题目:图书管理系统姓名: 吴琼虹班级:0920542学号: 09软件课程设计姓名:吴琼虹 班级:0920542 学号:09设计题目:图书管理系统一、需求分析:一本好书就是一位益友,爱读书的朋友们,还在为从一大堆的图书中寻找自己喜爱的图书而烦恼吗?本软件将为您提供图书管理的方便资料 数据分析:需要4个表:图书表,用户表,借书表和图书类型表。 功能分析:用户直接登录到主界面,可以查询所有图书,也可以按图书类型查询所需图书; 用户可以点击注册,注册一个新用户,也可以在登录中选择用户登录,在下拉列表中找一个用户名,然后输入相应密码,登录。登录后可以查询,修改这个用户的资

2、料;也可以查询这个用户的借阅信息。 用管理员登录,登录后可以查询所有用户资料、图书借阅资料,添加图书及图书类型,添加借阅信息或归还图书。二、总体设计用户信息(用户名, 密码,真实姓名,电话,地址)图书信息(图书名,图书类型,出版社,数量)借阅信息(图书名,用户名,借阅数量)图书类型(图书类型)权限:所有人都可以查询图书信息用户还可以查询自己借阅和资料信息,并且修改自己的资料信息管理员还可以查询所有用户的借阅和资料信息,并修改借阅信息,添加图书信息。运行环境:C#,Server20053、详细设计首先进入主界面,可进行图书的查询和分类查询的操作;还可以进行注册,然后用用户登录。用户登录连接数据库

3、,用户名可以直接选择自己的名称,登录后可以使用查询中的用户查询,查询并修改自己的资料,同时还可以查询自己的借阅信息。管理员登录名与密码均为admin,登录后可以使用管理员查询,(用户查询不可用)可以查询所有或模糊查询个别用户的信息。也可以查询所有或模糊查询个别图书的信息,还可以添加图书类型,添加新图书,给用户借阅、归还图书,当借阅后,图书信息中的数量减一,借阅信息中添加一条借阅信息(借阅人,图书);当归还后该信息在借阅中消失,被借阅图书在图书信息中数量加一。SQL图:4、代码主界面:using System;using System.Collections.Generic;using Syst

4、em.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;namespace WindowsApplication1 public partial class Form1 : Form public static int load_type; public int visible_type; public Form1() InitializeComponent(); private void CuestLoad_Click(object sender

5、, EventArgs e) Load1 load = new Load1();/用户登陆 load.Show(); load_type=1; if (load_type = 2) AdminQuery.Enabled = true; else AdminQuery.Enabled = false; if (load_type = 1) GuestQuery.Enabled = true; else GuestQuery.Enabled = false; private void AdminLoad_Click(object sender, EventArgs e) Load1 load2 =

6、 new Load1();/管理员登陆 load2.Show(); load_type=2; if (load_type = 2) AdminQuery.Enabled = true; else AdminQuery.Enabled = false; if (load_type = 1) GuestQuery.Enabled = true; else GuestQuery.Enabled = false; private void RegisterMenuItem_Click(object sender, EventArgs e) Register register = new Registe

7、r();/注册新用户 register.Show(); private void GuestQuery_Click(object sender, EventArgs e) GuestQuery gusetquery = new GuestQuery();/客户查询 gusetquery.Show(); private void AdminQuery_Click(object sender, EventArgs e) AdminQuery adminquery = new AdminQuery();/管理员查询 adminquery.Show(); private void BookQuery_

8、Click(object sender, EventArgs e) BookQuery bookquery = new BookQuery();/图书查询 bookquery.Show(); private void Form1_Load(object sender, EventArgs e) if (load_type = 2) AdminQuery.Enabled = true; else AdminQuery.Enabled = false; if (load_type = 1) GuestQuery.Enabled = true; else GuestQuery.Enabled = f

9、alse; 图书查询:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsApplication1 public partial class BookQuery : Form string connectionstring = server=LE

10、NOVO-PC;uid=sa;pwd=sa;database=my sql;connect timeout=30; public SqlCommand cmd = new SqlCommand(); public string dataTableName = Book; public SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(); public DataSet dataSet = new DataSet(); public BindingSource bindingSource1 = new BindingSource(); publ

11、ic BookQuery() InitializeComponent(); private void BookQuery_Load(object sender, EventArgs e) SqlConnection conn = new SqlConnection(connectionstring); cmd.CommandType = CommandType.Text; cmd.Connection = conn; cmd.CommandText = Select * from BookType ; conn.Open(); sqlDataAdapter.SelectCommand = cm

12、d; sqlDataAdapter.Fill(dataSet, dataTableName); SqlDataReader r = cmd.ExecuteReader(); while (r.Read() BooktypecomboBox.Items.Add(rbooktype.ToString(); / BooktypecomboBox.Text = BooktypecomboBox.Items0.ToString(); r.Close(); private void BooktypecomboBox_SelectedIndexChanged(object sender, EventArgs

13、 e) BooktypecomboBox.Text = BooktypecomboBox.ItemsBooktypecomboBox.SelectedIndex.ToString(); private void BookQuerybutton_Click(object sender, EventArgs e) string fstr = select * from + dataTableName; fstr += where booktype= + BooktypecomboBox.Text + ; SqlConnection conn = new SqlConnection(connecti

14、onstring); cmd.CommandType = CommandType.Text; cmd.Connection = conn; cmd.CommandText = fstr; conn.Open(); sqlDataAdapter.SelectCommand = cmd; dataSet.Clear(); sqlDataAdapter.Fill(dataSet, dataTableName); bindingSource1.DataSource = dataSet.TablesdataTableName; BookdataGridView.DataSource = bindingS

15、ource1; conn.Close(); private void All_Click(object sender, EventArgs e) string fstr = select * from + dataTableName; SqlConnection conn = new SqlConnection(connectionstring); cmd.CommandType = CommandType.Text; cmd.Connection = conn; cmd.CommandText = fstr; conn.Open(); sqlDataAdapter.SelectCommand

16、 = cmd; dataSet.Clear(); sqlDataAdapter.Fill(dataSet, dataTableName); bindingSource1.DataSource = dataSet.TablesdataTableName; BookdataGridView.DataSource = bindingSource1; conn.Close(); 注册:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawi

17、ng;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsApplication1 public partial class Register : Form string connectionstring = server=LENOVO-PC;uid=sa;pwd=sa;database=my sql;connect timeout=30; public SqlCommand cmd = new SqlCommand(); public string dataTabl

18、eName = User_1; /public SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(); /public DataSet dataSet = new DataSet(); /public DataTable table = new DataTable(); /public BindingSource bindingSource1 = new BindingSource(); public Register() InitializeComponent(); private void RegisterOkbutton_Click(o

19、bject sender, EventArgs e) if (RegisterPasswordtextBox.Text != RegisterPasswordOktextBox.Text) MessageBox .Show(输入密码与确定密码不匹配,请重新输入); RegisterPasswordtextBox.Text = ; RegisterPasswordOktextBox.Text = ; if (UserNametextBox.Text=) MessageBox .Show (用户名不能为空!); if (RegisterTruenametextBox.Text= ) Message

20、Box .Show (真实姓名不能为空!); if(RegisterPhonetextBox.Text=) MessageBox .Show (联系电话不能为空!); if (RegisterAddresstextBox.Text=) MessageBox .Show (地址不能为空!); SqlConnection conn = new SqlConnection(connectionstring); cmd.CommandType = CommandType.Text; cmd.Connection = conn; string sql = insert into User_1(Usern

21、ame,password,turename,address,phone) values(; sql = sql + UserNametextBox.Text.ToString() + , + RegisterPasswordtextBox.Text.ToString() + , + RegisterTruenametextBox.Text.ToString() + , + RegisterAddresstextBox.Text.ToString() + , + RegisterPhonetextBox.Text.ToString() + ); cmd.CommandText = sql; tr

22、y conn.Open(); int n = cmd.ExecuteNonQuery(); MessageBox.Show(添加新用户成功!); catch (Exception err) MessageBox.Show(添加新用户失败! + err.ToString(), 错误!); private void Register_Load(object sender, EventArgs e) 登录:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using

23、System.Drawing;using System.Text;using System.Windows.Forms;using System.Data.SqlClient;namespace WindowsApplication1 public partial class Load1 : Form public int i = 0; public static string name=; /string connectionstring = server=SQL Server 9.0.1399,sa;uid=sa;pwd=sa;database=ma sql;connect timeout

24、=30; string connectionstring = server=LENOVO-PC;uid=sa;pwd=sa;database=my sql;connect timeout=30; public SqlCommand cmd = new SqlCommand(); public string dataTableName = User_1; public SqlDataAdapter sqlDataAdapter = new SqlDataAdapter(); public DataSet dataSet = new DataSet(); public Load1() Initia

25、lizeComponent(); private void Load_Load(object sender, EventArgs e) comboBoxUser.Focus(); SqlConnection conn = new SqlConnection(connectionstring); cmd.CommandType = CommandType.Text; cmd.Connection = conn; cmd.CommandText = Select * from + dataTableName; conn.Open(); sqlDataAdapter.SelectCommand =

26、cmd; sqlDataAdapter.Fill(dataSet, dataTableName); SqlDataReader r = cmd.ExecuteReader(); while (r.Read() = true) comboBoxUser.Items.Add(rusername.ToString(); comboBoxPWord.Items.Add(rpassword.ToString(); comboBoxUser.Text = ; /comboBoxPWord.Hide(); r.Close(); if (Form1.load_type = 2) comboBoxUser.Te

27、xt = ; private void comboBoxUser_SelectedIndexChanged(object sender, EventArgs e) comboBoxPWord.SelectedIndex = comboBoxUser.SelectedIndex; comboBoxPWord.Text = comboBoxPWord.ItemscomboBoxPWord.SelectedIndex.ToString(); private void LoadOKbutton_Click(object sender, EventArgs e) if (Form1.load_type

28、= 2) if (comboBoxUser .Text = admin & LoadPasswordtextBox.Text = admin) MessageBox.Show(登陆成功!); this.Hide(); else MessageBox.Show(管理员名或密码错误!); if (Form1.load_type = 1) /LoadtextBox.Enabled = false; /comboBoxUser.Enabled = true; if (comboBoxPWord.Items.Contains(LoadPasswordtextBox.Text) if (comboBoxU

29、ser.Text != & LoadPasswordtextBox.Text = comboBoxPWord.Text) MessageBox.Show(密码正确!欢迎使用! + comboBoxUser.Text); string time = DateTime.Now.ToString(); this.Hide(); name = comboBoxUser.Text.ToString(); else i+; if (i = 3) LoadOKbutton.Enabled = false; MessageBox.Show(密码错误3次,请退出!); else MessageBox.Show(密码错误,请重新输入!); LoadPasswordtextBox.Text = ; LoadPasswordtextBox.Focus();

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2