《圖書管理系統(tǒng)》系統(tǒng)設(shè)計(jì)報(bào)告
《《圖書管理系統(tǒng)》系統(tǒng)設(shè)計(jì)報(bào)告》由會(huì)員分享,可在線閱讀,更多相關(guān)《《圖書管理系統(tǒng)》系統(tǒng)設(shè)計(jì)報(bào)告(8頁珍藏版)》請(qǐng)?jiān)谘b配圖網(wǎng)上搜索。
1、《圖書管理系統(tǒng)》系統(tǒng)設(shè)計(jì)報(bào)告 一、 引言 1. 摘要:中學(xué)圖書館管理系統(tǒng) 目的:方便圖書館對(duì)書籍借閱的管理 主要功能: —學(xué)生基本信息查詢 —書籍借閱管理 —書籍管理 2. 背景:第十小組承擔(dān)開發(fā)任務(wù) 3. 工作條件與限制:windows操作平臺(tái),Visual Basic6.0和SQL Sserver2000等軟件為開發(fā)工具,利用上課時(shí)間和課外時(shí)間做成。由于現(xiàn)在圖書管理系統(tǒng)已經(jīng)比叫完善,所以我們暫時(shí)沒有能做出比以前有先進(jìn)技術(shù)的管理系統(tǒng)。 4. 參考和引用資料:《數(shù)據(jù)庫系統(tǒng)概論》,VB應(yīng)用 5. 專門術(shù)語定義: 二、系統(tǒng)總體技術(shù)方案 1. 計(jì)算機(jī)
2、系統(tǒng)配置:windows平臺(tái),VB/SqlServer2000,WINNT SERVER操作系統(tǒng), SQL server2000關(guān)系數(shù)據(jù)庫管理系統(tǒng) ,VB操作軟件,局域網(wǎng)。 2. 模塊設(shè)計(jì):主要分為三個(gè)模塊:即學(xué)生基本信息模塊,書籍借閱模塊,書籍管理模塊 代碼設(shè)計(jì):讀者信息查詢 Public connStr As ADODB.Connection Private Sub Command1_Click() End Sub Private Sub cmdAdd_Click() If Trim(List1.Text) <> "" Then List2.AddI
3、tem (List1.Text) End If End Sub Private Sub cmdMove_Click() If Trim(List2.Text) <> "" Then List2.RemoveItem (List2.ListIndex) End If End Sub Private Sub cmdSearch_Click() Dim cmdstr As String If List2.ListCount = 0 Then MsgBox "請(qǐng)選擇輸出列!", vbOKOnly, "提示" Exit Sub End If
4、 cmdstr = "select " For i = 0 To List2.ListCount - 1 If Trim(List2.List(i)) = "圖書證號(hào)" Then cmdstr = cmdstr + "READER_DATA." + Trim(List2.List(i)) + "," Else If Trim(List2.List(i)) = "書號(hào)" Then cmdstr = cmdstr + "MARC_DATA." + Trim(List2.List(i)) + "," Else cmdstr = cmdstr + Trim(List2.
5、List(i)) + "," End If End If Next cmdstr = Left(cmdstr, Len(cmdstr) - 1) If Opbook.Value = True Then cmdstr = cmdstr + " from MARC_DATA where " End If If Opreader.Value = True Then cmdstr = cmdstr + " from READER_DATA where " End If If Oplend.Value = True Then cmdstr = cmdstr
6、 + " from MARC_DATA,READER_DATA,LEND_DATA " & " where MARC_DATA.書號(hào)=LEND_DATA. 書號(hào) and " & " READER_DATA.圖書證號(hào)=LEND_DATA.圖書證號(hào) and " End If If Trim(comKey.Text) = "" Then MsgBox "請(qǐng)選擇查詢關(guān)鍵字!", vbOKOnly, "提示" Exit Sub End If If Trim(txtKey.Text) = "" Then MsgBox "請(qǐng)?jiān)O(shè)置查詢關(guān)鍵字的值!", vbOKOnly, "提示"
7、 Exit Sub End If If ComType.Text = "精確匹配" Then cmdstr = cmdstr + Trim(comKey.Text) + "=" + Trim(txtKey.Text) + "" Else cmdstr = cmdstr + Trim(comKey.Text) + " like " + Trim(txtKey.Text) + "%" End If Adodc1.RecordSource = cmdstr Adodc1.Refresh DataGrid1.Refresh End Sub Privat
8、e Sub Form_Load() Set connStr = New ADODB.Connection connStr.Open "driver={SQL Server}; Server=SYSLAB000;UID=jj138;PWD=;database=計(jì)教(1)班38號(hào)" Adodc1.ConnectionString = connStr ComType.AddItem ("精確匹配") ComType.AddItem ("前方一致匹配") End Sub Private Sub Label3_Click() End Sub Priva
9、te Sub List2_Click() End Sub Private Sub Opbook_Click() Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset rs.Open "MARC_DATA", connStr, adOpenKeyset, adLockReadOnly, adCmdTable comKey.Clear List1.Clear For i = 0 To rs.Fields.Count - 1 comKey.AddItem (rs.Fields(i).Name)
10、 List1.AddItem (rs.Fields(i).Name) Next rs.Close List2.Clear txtKey.Text = "" End Sub Private Sub Oplend_Click() comKey.Clear List1.Clear comKey.AddItem ("圖書證號(hào)") comKey.AddItem ("姓名") comKey.AddItem ("書號(hào)") comKey.AddItem ("書名") comKey.AddItem ("出版社") comKey.AddItem ("借出
11、日期") comKey.AddItem ("還書日期") List1.AddItem ("圖書證號(hào)") List1.AddItem ("姓名") List1.AddItem ("書號(hào)") List1.AddItem ("書名") List1.AddItem ("出版社") List1.AddItem ("借出日期") List1.AddItem ("還書日期") List2.Clear txtKey.Text = "" End Sub Private Sub Opreader_Click() Dim rs As ADODB.Records
12、et Set rs = New ADODB.Recordset rs.Open "READER_DATA", connStr, adOpenKeyset, adLockReadOnly, adCmdTable comKey.Clear List1.Clear For i = 0 To rs.Fields.Count - 1 comKey.AddItem (rs.Fields(i).Name) List1.AddItem (rs.Fields(i).Name) Next rs.Close List2.Clear txtKey.Text = "" E
13、nd Sub 借還書處理 Private Sub cmdLend_Click() Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset If Trim(txtBid.Text) = "" Or Trim(txtRid_1.Text) = "" Then MsgBox "請(qǐng)輸入圖書證號(hào)和書號(hào)!", vbOKOnly, "提示信息" Else rs.Open "LEND_DATA", connStr, adOpenKeyset, adLockOptimistic, adCmdTable rs.A
14、ddNew rs("書號(hào)") = txtBid.Text rs("借出日期") = Date rs("圖書證號(hào)") = txtRid.Text rs.Update Adodc1.Refresh End If End Sub Private Sub cmdReturn_Click() Dim rs As ADODB.Recordset Set rs = New ADODB.Recordset If Trim(txtBid.Text) = "" Or Trim(txtRid_1.Text) = "" Then MsgBox "請(qǐng)輸入圖書證號(hào)和書號(hào)
15、!", vbOKOnly, "提示信息" Else cmdstr = "update LEND_DATA set 還書日期=" _ & Date & " where 書號(hào)=" & Trim(txtBid.Text) & "" rs.Open cmdstr, connStr, adOpenKeyset, adLockOptimistic, adCmdText Adodc1.Refresh End If End Sub Private Sub cmds_Click() Dim rs As ADODB.Recordset Set rs = New ADOD
16、B.Recordset cmdstr = "select * from READER_DATA WHERE 圖書證號(hào) =" & Trim(txtRid_1.Text) & "" rs.Open cmdstr, connStr, adOpenForwardOnly, adLockReadOnly, adCmdText If Not rs.EOF Then txtRid.Text = rs("圖書證號(hào)") txtName.Text = rs("姓名") If Not IsNull(rs("性別")) Then txtXb.Text = rs("性別") End If
17、 If Not IsNull(rs("系名")) Then txtXm.Text = rs("系名") End If Else MsgBox "未找到該讀者信息!", vbOKOnly, "提示信息" End If cmdstr = "select 借出日期,還書日期,LEND_DATA.書號(hào),書名,作者,出版社" & " from LEND_DATA,MARC_DATA " & "where LEND_DATA.書號(hào)=MARC_DATA.書號(hào) and " & " 還書日期 is null and 圖書證號(hào)=" & Trim(txtRid_1.Text) & ""
18、 Adodc1.RecordSource = cmdstr Adodc1.Refresh End Sub Private Sub cmdSearch_Click() cmdstr = "select 借出日期,還書日期,LEND_DATA.書號(hào),書名,作者,出版社" & "from LEND_DATA,MARC_DATA " & "where LEND_DATA.書號(hào)=MARC_DATA.書號(hào) and 圖書證號(hào)=" & Trim(txtRid_1.Text) & "" Adodc1.RecordSource = cmdstr Adodc1.Refresh
19、End Sub Private Sub DataGrid1_Click() If Not Adodc1.Recordset.BOF And Not Adodc1.Recordset.BOF Then txtBid.Text = Adodc1.Recordset("書號(hào)") End If End Sub Private Sub Form_Load() Set connStr = New ADODB.Connection connStr.Open "driver={SQL Server}; Server=SYSLAB000;UID=jj138;PWD=;da
20、tabase=計(jì)教(1)班38號(hào)" Adodc1.ConnectionString = connStr End Sub 圖書館詳細(xì)信息 Private Sub txt_refresh() If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then txtBid.Text = Adodc1.Recordset("書號(hào)") txtBname.Text = Adodc1.Recordset("書名") txtWrite.Text = Adodc1.Recordset("作者") txtPubl
21、isher.Text = Adodc1.Recordset("出版社") txtYear.Text = Adodc1.Recordset("出版時(shí)間") txtGb.Text = Adodc1.Recordset("國別代碼") txtDate.Text = Adodc1.Recordset("進(jìn)館時(shí)間") txtCallno.Text = Adodc1.Recordset("分類號(hào)") End If End Sub Private Sub cmdDele_Click() Dim deletxt As String deletxt = "是否刪除圖書
22、《" & Adodc1.Recordset("書名") & "》的記錄?" If Not Adodc1.Recordset.EOF And Not Adodc1.Recordset.BOF Then If MsgBox(deletxt, vbOKCancel, "提示信息") = vbOK Then Adodc1.Recordset.Delete Adodc1.Refresh End If End If End Sub Private Sub cmdNew_Click() If cmdNew.Caption = "新增" Then txt_ena
23、ble (2) cmdNew.Caption = "保存" txtBid.Text = "" txtBname.Text = "" txtWrite.Text = "" txtPublisher.Text = "" txtYear.Text = "" txtGb.Text = "" txtDate.Text = "" txtCallno.Text = "" Else Adodc1.Recordset.AddNew Adodc1.Recordset("書號(hào)") = Trim(txtBid.Text) Adodc1.Recordset("書名")
24、 = Trim(txtBname.Text) Adodc1.Recordset("作者") = Trim(txtWrite.Text) Adodc1.Recordset("出版社") = Trim(txtPublisher.Text) Adodc1.Recordset("出版時(shí)間") = Trim(txtYear.Text) Adodc1.Recordset("國別代碼") = Trim(txtGb.Text) 4 Adodc1.Recordset("進(jìn)館時(shí)間") = Trim(txtDate.Text) Adodc1.Recordset("分類號(hào)") = Trim
25、(txtCallno.Text) Adodc1.Recordset.UpdateBatch Adodc1.Refresh txt_enable (1) cmdNew.Caption = "新增" Adodc1.Recordset.MoveFirst txt_refresh End If Private Sub cmdNext_Click() If Not Adodc1.Recordset.EOF Then Adodc1.Recordset.MoveNext txt_refresh End If End Sub Private Su
26、b cmdPre_Click() If Not Adodc1.Recordset.BOF Then Adodc1.Recordset.MovePrevious txt_refresh 2 End If End Sub Private Sub cmdUpdate_Click() If cmdUpdate.Caption = "修改" Then txt_enable (2) cmdUpdate.Caption = "保存" Else Adodc1.Recordset("書號(hào)") = Trim(txtBid.Text) Adodc1.Recor
27、dset("書名") = Trim(txtBname.Text) Adodc1.Recordset("作者") = Trim(txtWrite.Text) Adodc1.Recordset("出版社") = Trim(txtPublisher.Text) Adodc1.Recordset("出版時(shí)間") = Trim(txtYear.Text) Adodc1.Recordset("國別代碼") = Trim(txtGb.Text) Adodc1.Recordset("進(jìn)館時(shí)間") = Trim(txtDate.Text) Adodc1.Recordset("分類號(hào)")
28、= Trim(txtCallno.Text) Adodc1.Recordset.UpdateBatch Adodc1.Refresh txt_enable (1) cmdUpdate.Caption = "修改" End If End Sub Private Sub Form_Load() txt_refresh End Sub Private Sub Text1_Change() End Sub Private Sub Text8_Change() End Sub Private Sub txtBname_Change() End Sub
- 溫馨提示:
1: 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
2: 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
3.本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
5. 裝配圖網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 平均數(shù)課件(教育精品)
- 婦科腫瘤放療進(jìn)展
- 注射機(jī)有關(guān)參數(shù)校核
- 五年級(jí)科學(xué)維護(hù)生態(tài)平衡-PPT
- 心臟術(shù)后觀察及監(jiān)護(hù)要點(diǎn)
- 生本教育從改變自己開始
- 部編版一年級(jí)下冊(cè)《文具的家》課件
- 人教初中地理八上《1第2節(jié)-人口》課件-(10)
- 部編小學(xué)二年級(jí)下冊(cè)語文傳統(tǒng)節(jié)日課件
- 《科學(xué)探究:歐姆定律》課件-(公開課獲獎(jiǎng))2022年滬科版物理-
- S7-1200-PLC應(yīng)用基礎(chǔ)ppt課件第8章-PLC應(yīng)用系統(tǒng)設(shè)計(jì)實(shí)例
- 人教版五年級(jí)下冊(cè)長方體和正方體《求不規(guī)則物體的體積》課件
- 中職版《走進(jìn)物流》ppt課件模塊二-項(xiàng)目一-走進(jìn)貨運(yùn)物流
- 中考?xì)v史一輪復(fù)習(xí)-侵略與反抗課件-新人教版
- 肝功能障礙患者合理用藥房文通課件