VB 图书管理系统

前端之家收集整理的这篇文章主要介绍了VB 图书管理系统前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

VB 简单图书管理系统设计

图书管理系统源代码下载(包含源代码数据库、设计报告)

一、基本概述

  1. 基于VB,MysqL数据库
  2. 拥有可操作界面
  3. 实现基本图书管理功能

二、数据库的概念设计

  1. 图书信息

    图书信息:{书号,书名,作者,分类号,出版社,价格,摘要,入馆日期,是否在架}

  2. 读者用户信息

    读者用户信息:{读者号(用户ID),密码,姓名,性别,单位,类型,身份证号,罚款金额,办理日期,住址,电话,邮箱}

  3. 管理员信息

    管理员信息:{账号,密码,姓名,性别是否删除}

  4. 借阅信息

    借阅信息:{借阅编号,读者号(用户ID),书号,借书时间,还书时间,是否已归还}

系统E-R图

三.部分运行截图

'登陆页代码
Private Sub Command1_Click()

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim stru$,strp$,strsql$
Static count As Byte
stru = Text1.text
strp = Text2.text
username = Text1.text

If stru = "" Then
MsgBox "用户名不能为空,请输入用户名!","登陆错误"
Text1.SetFocus
Exit Sub
ElseIf strp = "" Then
MsgBox "密码不能为空,请输入密码!","登陆错误"
Text2.SetFocus
Exit Sub
End If
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

conn.Open "provider=sqlOLEDB.1;datasource=(local);persist security info=false;integrated security=sspi;database=bms"


rs.Open "select * from ruser where ruser='" & stru & " 'and rpsw='" & strp & "'; ",conn

If rs.EOF Then
count = count + 1
MsgBox "用户名不存在或者密码错误!","登录失败"
Text1.text = ""
Text2.text = ""
Text1.SetFocus
Else
logins = True
username = rs("ruser").Value
pass = rs("rpsw").Value
F_index.Show
Me.Hide
End If
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
If count >= 3 Then
MsgBox "超过登录次数,无权登录本系统!","登录失败"
End
End If
End Sub


Private Sub Command2_Click()

Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim stru$,strsql$
Static count As Byte
stru = Text1.text
strp = Text2.text
If stru = "" Then
MsgBox "用户名不能为空,请输入用户名!","登陆错误"
Text2.SetFocus
Exit Sub
End If
Set conn = New ADODB.Connection
Set rs = New ADODB.Recordset

conn.Open "provider=sqlOLEDB.1;datasource=(local);persist security info=false;integrated security=sspi;database=bms"


rs.Open "select * from auser where auser='" & stru & " 'and apsw='" & strp & "'; ","登录失败"
Text1.text = ""
Text2.text = ""
Text1.SetFocus
Else
logins = True
username = rs("auser").Value
pass = rs("apsw").Value
F_a_index.Show
Me.Hide
End If
rs.Close
conn.Close
Set rs = Nothing
Set conn = Nothing
If count >= 3 Then
MsgBox "超过登录次数,无权登录本系统!","登录失败"
End
End If
End Sub

Private Sub Command3_Click()
Text1.text = ""
Text2.text = ""
Text1.SetFocus
End Sub
原文链接:https://www.f2er.com/vb/256532.html

猜你在找的VB相关文章