【正文】
then messagebox(數(shù)據(jù)錯(cuò)誤 ,開始日期不能大于結(jié)束日期 .) else (id_start,id_end) end if () “重置”按鈕: = = () 43 數(shù)據(jù)窗口的數(shù)據(jù)源 SQL語句: SELECT bookinfo.bookonloan, bookinfo.number, bookinfo.title, bookinfo.author, bookinfo.pub, bookinfo.publishdate, bookinfo.isbn, bookinfo.keywords, bookinfo.abstract FROM bookinfo WHERE bookinfo.publishdate between :date1 and :date2 //:date1 與 :date2 為查詢變量 ( 11)統(tǒng)計(jì)窗口 各類圖書比例窗口 w_count_booktype、庫存 /借出比例窗口 w_count_loan 說明:由于這兩個(gè)窗口大同小異,所以僅對(duì) w_count_booktype 進(jìn)行說明 。 mit。 //查詢“免費(fèi)天數(shù)”、“罰金規(guī)定” SELECT days,fine INTO :li_days,:ld_fine FROM regular。 WHERE bookid=:ls_bookid。 messagebox(錯(cuò)誤提示 ,無法注銷! ) end if li_row=()//得到當(dāng)前行 if li_row() then//判斷是否至少有兩行存在 (0,false) //高亮顯示當(dāng)前行 (li_row,true) end if end if else messagebox(系統(tǒng)提示 ,沒有要注銷的數(shù)據(jù) ) end if =false//使“銷毀”按鈕恢復(fù)不可用狀態(tài) 32 ( 6) 登記借閱人窗口 w_newmember 圖 功能介紹:增加、修改借閱人信息 操作方法:類同“新書入庫窗口 w_newbook” 代碼分析: Open 事件:類同“新書入庫窗口 w_newbook” “ 檢索 ” 按鈕:類同“新書入庫窗口 w_newbook” “新增”按鈕:類同“新書入庫窗口 w_newbook” “保存”按鈕:類同“新書入庫窗口 w_newbook” ( 7)注銷借閱人窗口 w_delmember 33 圖 功能介紹:刪除借閱人信息 操作方法:類同“舊書銷毀窗口 w_delbook” 代碼分析: Open 事件:類同“舊書銷毀窗口 w_delbook” “檢索”按鈕:類同“舊書銷毀窗口 w_delbook” “銷毀”按鈕:類同“舊書銷毀窗口 w_delbook” ( 8) 借書窗口 w_loan 圖 34 功能介紹:借閱圖書, 操作方法:輸入 “借閱人編號(hào)”與“圖書編號(hào)”后,借閱人姓名與圖書編號(hào)將顯示出來,然后點(diǎn)擊“借閱”按鈕借閱圖書。 代碼分析: Open 事件:類同“新書入庫窗口 w_newbook” “檢索”按鈕: string ls_bookid,ls_filter ls_bookid=(bookid=39。 27 ( 3) 菜單 m_main 圖 功能介紹:打開各功能窗口 操作方法:點(diǎn)擊菜單項(xiàng)或工具欄上相應(yīng)的按鈕,狀態(tài)欄可顯示幫助信息。) end if 6 具體窗口的實(shí)現(xiàn) ( 1)登錄窗口 w_login 圖 功能介紹:本窗口主要是檢查操作員輸入的用戶名及密碼是否正確,如果正確,允許登錄。DSN=librarian。 Lev 值即不同職責(zé)的權(quán)限(系統(tǒng)管理 圖書管理 借閱人管理 借閱操作員 4),從 people 表中的 level字段中讀取。當(dāng)修改祖先窗口時(shí),所有的子孫窗口都會(huì)自動(dòng)修改。例如: li_selectrow 反映出的含義: ”l” 代表是本地變量,是 local 的縮寫, ” i” 代表是 integer 類型的變量, selectrow 表示該變量是用來記錄一個(gè)行號(hào)的計(jì)數(shù)器。可以在開發(fā)環(huán)境中隨時(shí)運(yùn)行應(yīng)用程序,發(fā)現(xiàn)錯(cuò)誤后,可以用調(diào)試工具進(jìn)行調(diào)試。窗 口里的菜單可包括菜單條,下拉式菜單,級(jí)聯(lián)菜單和彈出式菜單為菜單編寫事件響應(yīng)的腳本。是功能強(qiáng)大并易于使 用的第 4 代編程語言 (4GL),它內(nèi)置了包括數(shù)據(jù)窗口在內(nèi)的多種對(duì)象類,可以方便地訪問數(shù)據(jù)庫。該約束使用唯一的索引來強(qiáng)制實(shí)體的完整性。具有高選擇性的列是索引的最好候選列。具有較高數(shù)據(jù)插入操作頻率的數(shù)據(jù)庫最好不要索引。 表 列名 數(shù)據(jù)類型 長度 可否為空 注釋 Bookid Char 10 Not null 圖書編號(hào) Isbn Char 30 Null 圖書 ISBN Classname Char 20 Null 圖書類型 Title Char 40 Null 圖書名稱 publishdate date Null 出版日期 author Char 20 Null 作者 words int Null 字?jǐn)?shù)(千字) pub Char 30 Null 出版社 price numeric Null 價(jià)格 disk Char 1 Null 附帶光盤 keyword Char 30 Null 關(guān)鍵詞 number int Null 存放代碼 Abstract varchar 100 Null 摘要 bookonloan Char 1 Null 圖書在借標(biāo)志 17 (Y在借 N未借 ) 出版社基本信息表 publishinfo 說明:記錄出版社信息, pubid設(shè)為主鍵。 PB 的數(shù)據(jù)窗口與其他語言的數(shù)據(jù)控件不一樣,它的很多東西是預(yù)編譯的。數(shù)據(jù)表設(shè)計(jì)時(shí) ,最好不要使用用戶輸入的信息作為主鍵,每一個(gè)數(shù)據(jù)表自己定義一個(gè)主鍵,添加信息是由程序自動(dòng)添加,這樣就可以減少數(shù)據(jù)更新時(shí)產(chǎn)生的錯(cuò)誤。 為了實(shí)現(xiàn)圖書信息錄入的方便性與規(guī)范性以及相關(guān)的統(tǒng)計(jì)功能,還應(yīng)增加出版社信息 與圖書分類信息: ( 4) 出版社信息,其數(shù)據(jù)項(xiàng)有出版社編號(hào)、出版社名稱、地址、電話、傳真等。進(jìn)行圖書借出處理后,在圖書借閱庫中進(jìn)行登記, 并將借出圖書的在借標(biāo)志設(shè)為“是”。 3 系統(tǒng)各功能模塊設(shè)計(jì) 在系統(tǒng)功能 分析的基礎(chǔ)上,考慮 PowerBuilder 程序編制的特點(diǎn),得到如圖所示的系統(tǒng)功能模塊圖: 圖 圖書借閱管理系統(tǒng) 數(shù)據(jù)輸入子系統(tǒng) 數(shù)據(jù)輸出子系統(tǒng) 數(shù)據(jù)管理子系統(tǒng) 9 4 數(shù)據(jù)流圖 ( 1) 圖書基本信息登記 /修改 圖 說明:出版社信息人工錄入后,存放在出版社信息庫中,便于今后書籍信息的錄入以及出版社信息的查詢。 提供統(tǒng)計(jì)分析功能。 7 三 系統(tǒng)總體結(jié)構(gòu)設(shè)計(jì) 如果要完成一個(gè)完整的圖書管理系統(tǒng),需要的相關(guān)信息很多。 3 解決方案 基于以上的對(duì)問題的分析,利用計(jì)算機(jī)給我 們提供信息,及時(shí)地調(diào)整學(xué)校圖書館圖書結(jié)構(gòu),并且對(duì)學(xué)生們的借閱過程形成一整套動(dòng)態(tài)的管理就十分必要了。 1 現(xiàn)行業(yè)務(wù)描述 下面以一所學(xué)校的圖書館為例子進(jìn)行分析,畫出圖書館的組織結(jié)構(gòu)圖如下: 圖 該圖書館各個(gè)部門負(fù)責(zé)的主要業(yè)務(wù)如下: ( 1)采編組主要負(fù)責(zé)圖書采編工作,包括購 置新書、打印編目、增加數(shù)量。測試工作中發(fā)現(xiàn)的錯(cuò)誤應(yīng)及時(shí)改正,然后將它記錄到測試文檔中。詳細(xì)設(shè)計(jì)完成后,整個(gè)程序就確定了,再由編程人員根據(jù)詳細(xì)設(shè)計(jì)文檔將代碼完成。此時(shí),數(shù)據(jù)庫中的表格還未成形,通過各種分析工具(如 PowerDesigner 等)畫出數(shù)據(jù)流圖,最后就可抽象出數(shù)據(jù)庫的具體表結(jié)構(gòu)。 面向?qū)ο螅?Object Oriented)的開發(fā)方法于 20世紀(jì) 80年代開始興起的,是一種基于問題對(duì)象的自底向上的一種系統(tǒng)開發(fā)方法,這種方法的特點(diǎn)是以對(duì)象為基礎(chǔ),對(duì)象是分析問題和解決問題的核心。在這種形勢下,書籍就漸漸地成為人們獲取并增長知識(shí)的主要途徑,而圖書館就自然而然地在人們的生活中占據(jù)了一定的位置,如何科學(xué)地管理圖書館 不但關(guān)系到讀者求知的方便程度,也關(guān)系到圖書館的發(fā)展,因此,開發(fā)一套完善的圖書館管理系統(tǒng)就必不可少了。 1 摘 要 隨著信息技術(shù)在管理上越來越深入而廣泛的應(yīng)用,管理信息系統(tǒng)的實(shí)施在技術(shù)上已逐步成熟。 2 Abstract With more and more widespread and profound application of information technology in management, the implement of management information system has bee mature in technology step by step. Managing information system is a new subject. Enterprise needs existence and development, so enterprise activities should be anized efficiently and anically, which means tightening up the enterprise management and strengthening effective management of any resource (staff, finance, property, etc.) internal the enterprise, and also establishing a management information system fitting in with its own characteristics. This article introduces the detailed process of exploring a management information system under the environment of PowerBuilder, utilizing “TopBottom” overall plan and a strategy according to “BottomTop” application and exploitation. That is to establish a set of effective scheme for library management by puter, through analyzing disadvantages of traditional library management by human resources. This article emphasizes on three sections. The system analysis section of library management information includes feasible analysis, anizing ans analysis, management function analysis, technological process of business analysis, technological process of data analysis, data dictionary, disposal description and the like. The system design section mainly focuses on system function design and data base design. And the system realization section has provided several major program charts, together with the main windows and pro