图书管理系统ER图-流程图-功能结构图-源代码 第11页
源程序清单
1、文件名 login(login.frm)
功能说明:整个系统的登陆界面,需要输入用户名和登陆密码才能进入到系统中,进行借阅等操作。
源代码:
Option Explicit
Dim cnt As Integer
Private Sub Command1_Click()
Dim sql As String
Dim rs_login As New ADODB.Recordset
If Trim(Combo1.Text) = "" Then
MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
Combo1.SetFocus
Else
sql = "select * from 系统管理 where 用户名='" & Combo1.Text & "'"
rs_login.Open sql, conn, adOpenKeyset, adLockPessimistic
If rs_login.EOF = True Then
MsgBox "没有这个用户", vbOKOnly + vbExclamation, ""
Combo1.SetFocus
Else
If Trim(rs_login.Fields(1)) = Trim(txtpwd.Text) Then
userID = Combo1.Text
rs_login.Close
Unload Me
form1.Show
Else
MsgBox "密码不正确", vbOKOnly + vbExclamation, ""
txtpwd.SetFocus
End If
End If
End If
cnt = cnt + 1
If cnt = 3 Then
Unload Me
End If
Exit Sub
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim connectionstring As String
connectionstring = "provider=Microsoft.Jet.oledb.4.0;" & _
"data source=book.mdb"
conn.Open connectionstring
cnt = 0
End Sub
Private Sub txtuser_Change()
End Sub
2、文件名 form1(form1.frm)
功能说明:整个系统的主界面,其中包括图书管理、读者管理、图书借阅管理、系统管理、关于,以及在这下面的子菜单。
源代码:
Private Sub add_admin_Click()
frmadduser.Show
End Sub
Private Sub add_back_book_Click()
frmbackbookinfo.Show
End Sub
Private Sub add_book_info_Click()
frmaddbookinfo.Show
End Sub
Private Sub add_book_style_Click()
frmaddbookstyle.Show
End Sub
Private Sub add_lend_book_Click()
frmfindbook.Show
End Sub
Private Sub add_reader_info_Click()
frmaddreaderinfo.Show
End Sub
Private Sub add_reader_style_Click()
frmaddreaderstyle.Show
End Sub
Private Sub change_pwd_Click()
frmchangepwd.Show
End Sub
Private Sub del_book_info_Click()
frmmodifybookinfo.Show
End Sub
Private Sub del_book_style_Click()
frmmodifybookstyle.Show
End Sub
Private Sub del_reader_info_Click()
frmreaderinfo.Show
End Sub
Private Sub del_reader_style_Click()
frmmodifyreaderstyle.Show
End Sub
Private Sub exit_sys_Click()
End
End Sub
Private Sub find_book_info_Click()
frmfindbook.Show
End Sub
Private Sub find_lend_book_Click()
frmfindborrowinfo.Show
End Sub
Private Sub find_reader_info_Click()
frmfindreader.Show
End Sub
Private Sub Form_Load()
End Sub
Private Sub gly_Click()
Form2.Show
End Sub
End Sub
Private Sub modify_reader_info_Click()
frmreaderinfo.Show
End Sub
Private Sub modify_reader_style_Click()
<< 上一页 [11] [12] [13] [14] [15] [16] [17] [18] 下一页