




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、湖北工業(yè)大學(xué)商貿(mào)學(xué)院-計(jì)科本畢業(yè)論文(設(shè)計(jì)) 圖書管理信息系統(tǒng)圖書管理信息系統(tǒng)摘 要 這篇論文主要講述關(guān)于圖書館管理信息系統(tǒng)的信息,特別是討論了關(guān)于設(shè)計(jì)該系統(tǒng)時(shí)的思想、方法和過程,以及在細(xì)節(jié)上分析函數(shù)和方法的實(shí)現(xiàn)思想。在本論文中講述的圖書館管理信息系統(tǒng)擁有一個(gè)交互式的界面、邏輯的數(shù)據(jù)庫結(jié)構(gòu)。并且在設(shè)計(jì)數(shù)據(jù)庫時(shí)還考慮到了實(shí)體完整性約束、參照完整性約束、及盡量減少數(shù)據(jù)的冗余,在數(shù)據(jù)庫里有包括表、過程、函數(shù)、觸發(fā)器等5個(gè)數(shù)據(jù)庫對(duì)象。許多涉及到圖書、讀者的信息的功能在本系統(tǒng)中都有實(shí)現(xiàn)。例如,你可以將新書的信息插入到數(shù)據(jù)庫的圖書基本情況表里;還可以對(duì)已經(jīng)插入的關(guān)于圖書的信息進(jìn)行修改;更重要的是,讀者可以
2、從圖書館里借閱書籍。經(jīng)過多次的測試和運(yùn)行,本系統(tǒng)能實(shí)現(xiàn)其在設(shè)計(jì)時(shí)的所有功能?!娟P(guān)鍵字】圖書、讀者、管理系統(tǒng)、數(shù)據(jù)庫books management information systemabstract this dissertation mainly talk about information about the system of library, particularly discusses the design thinking ,method and process of creating a library management information system and ana
3、lyses the function and method of realization in detail. this system , which is implemented in our project talked about in this dissertation has a very interactive interface , a very logical database architecture. what has been taken into account most are entity integrity , reference integrity and re
4、duction of data redundancy. there are 5 database objects in total, including tables , procedure , trigger and so on. many kinds of functions related to book or reader closely have been implemented in our system .for example: you can insert the information of a new book into database, you can also al
5、ter the information which has been inserted , more important ,the reader can borrow book from the library.after being tested many times ,the system can be run well !【keywords】book、reader、management system、database 目錄第一章 系統(tǒng)概述11.1 系統(tǒng)開發(fā)背景和意義11.2 開發(fā)環(huán)境1第二章 系統(tǒng)需求分析12.1 任務(wù)概述12.2 數(shù)據(jù)描述(數(shù)據(jù)流圖+數(shù)據(jù)字典)22.3 功能需求62.4
6、性能需求6第三章 系統(tǒng)總體設(shè)計(jì)73.1 新的業(yè)務(wù)流程73.2 系統(tǒng)功能模塊圖73.3 系統(tǒng)的流程圖8第四章 詳細(xì)設(shè)計(jì)104.1 程序流程圖104.2 程序輸入輸出描述114.2.1 主模塊114.2.1 學(xué)生管理模塊124.2.2 圖書管理模塊124.2.3 借閱管理模塊124.2.4 歸還管理模塊124.2.5 管理措施設(shè)置模塊124.3 程序接口描述124.3.1 外部接口124.3.2 內(nèi)部接口124.4 數(shù)據(jù)庫的設(shè)計(jì)134.4.1 數(shù)據(jù)庫的邏輯設(shè)計(jì)13第五章 編碼實(shí)現(xiàn)145.1 程序編碼14第六章 測試分析報(bào)告316.1 測試計(jì)劃和要點(diǎn)316.1.1 主模塊測試要點(diǎn)326.1.2 借閱
7、模塊測試要點(diǎn)326.1.3 學(xué)生查詢模塊測試要點(diǎn)326.1.4 圖書查詢模塊測試要點(diǎn)326.1.5 圖書歸還模塊測試要點(diǎn)326.2 測試用例336.2.1 主模塊測試用例336.2.2 借閱模塊測試用例336.2.3 學(xué)生查詢模塊測試用例346.2.4 圖書塊測試用例356.2.5 圖書歸還模塊測查詢模試用例356.3 測試結(jié)果及結(jié)論366.3.1 測試的結(jié)果366.3.2 缺陷分析及改進(jìn)386.3.3 測試結(jié)論38總結(jié)39參考文獻(xiàn)405第一章 系統(tǒng)概述1.1 系統(tǒng)開發(fā)背景和意義圖書管理是高校內(nèi)每一個(gè)系部或院部都必須切實(shí)面對(duì)的工作,但一直以來人們使用傳統(tǒng)的人工方式管理圖書資料。這種方式存在著許
8、多缺點(diǎn),如效率低、保密性差且較為繁瑣。另外,隨著圖書資料數(shù)量的增加,其工作量也將大大增加,這必將增加圖書資料管理者的工作量和勞動(dòng)強(qiáng)度,這將給圖書資料信息的查找、更新和維護(hù)都帶來了很多困難。經(jīng)過詳細(xì)的調(diào)查,目前我國各類高等學(xué)校中有相當(dāng)一部分單位圖書資料管理還停留在人工管理的基礎(chǔ)上。這樣的管理機(jī)制已經(jīng)不能適應(yīng)時(shí)代的發(fā)展,其管理方法將浪費(fèi)許多人力和物力。隨著科學(xué)技術(shù)的不斷提高,這種傳統(tǒng)的手工管理方法必然被以計(jì)算機(jī)為基礎(chǔ)的信息管理方法所取代。圖書管理作為計(jì)算機(jī)應(yīng)用的一個(gè)分支,有著手工管理無法比擬的優(yōu)點(diǎn),如檢索迅速、查找方便、可靠性高、存儲(chǔ)量大、保密性好、壽命長、成本低等。這些優(yōu)點(diǎn)能夠極大地提高圖書管理
9、的效率。因此,開發(fā)一套能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄蔚膱D書管理系統(tǒng),將是非常必要的,也是十分及時(shí)的。1.2 開發(fā)環(huán)境開發(fā)環(huán)境的選擇會(huì)影響到數(shù)據(jù)庫的設(shè)計(jì),所以在這里給出圖書管理系統(tǒng)開發(fā)與運(yùn)行環(huán)境的選擇如下:開發(fā)環(huán)境:windows xp開發(fā)工具:myeclipse7.5 +visio數(shù)據(jù)庫系統(tǒng): mysql5.0web服務(wù)器:tomcat6.0第二章 系統(tǒng)需求分析2.1 任務(wù)概述經(jīng)過對(duì)我校詳細(xì)調(diào)查,并多次與負(fù)責(zé)圖書管理的老師進(jìn)行研討后,加深了對(duì)現(xiàn)行圖書管理業(yè)務(wù)的深刻了解,與此同時(shí),將整個(gè)圖書管理的業(yè)務(wù)流程抽象描述如下:1.新的圖書購進(jìn)后,分門別類地進(jìn)行歸并并匯總,加以編號(hào)。2.新書編號(hào)
10、后,上到書架以備學(xué)生借閱。3.如某學(xué)生需要借閱圖書,則在其本人的借閱登記表上進(jìn)行登記,記錄相關(guān)借閱信息與借閱日期。4.學(xué)生借閱圖書后,應(yīng)及時(shí)歸還圖書,并在本人的借閱登記表上注明還書日期和時(shí)間。根據(jù)以上調(diào)查分析,可以給出其現(xiàn)行業(yè)務(wù)流程圖如圖2.1所示。圖2.1 現(xiàn)行圖書管理業(yè)務(wù)流程圖2.2 數(shù)據(jù)描述(數(shù)據(jù)流圖+數(shù)據(jù)字典)經(jīng)過詳細(xì)的調(diào)查,我們已經(jīng)清楚了解了現(xiàn)行的業(yè)務(wù)流程,接下來給出系統(tǒng)的邏輯模型。構(gòu)造系統(tǒng)邏輯模型的工具是數(shù)據(jù)流圖和數(shù)據(jù)字典。根據(jù)現(xiàn)行圖書管理的業(yè)務(wù)流程,首先把數(shù)據(jù)流圖中的源點(diǎn)和終點(diǎn)都選定為學(xué)生,因此可以得到圖書管理系統(tǒng)的基本系統(tǒng)模型,如圖2.2所示。圖2.2 圖書管理系統(tǒng)的基本系統(tǒng)模
11、型根據(jù)基本系統(tǒng)模型,對(duì)其逐步細(xì)化,得到描述邏輯系統(tǒng)細(xì)化后的數(shù)據(jù)流圖,如圖2.3所示。圖2.3 圖書管理系統(tǒng)數(shù)據(jù)流圖(頂層dfd圖)對(duì)頂層dfd圖中的一個(gè)加工“學(xué)生管理”進(jìn)行展開,如圖2.4。圖2.4 細(xì)化后數(shù)據(jù)流圖對(duì)頂層dfd圖中的一個(gè)加工“圖書管理”進(jìn)行展開,如圖2.5。圖2.5 “圖書管理”展開對(duì)第1層dfd圖中的加工進(jìn)一步進(jìn)行展開,如圖2.6。(1)(2)圖2.6 進(jìn)一步細(xì)化數(shù)據(jù)流圖有了系統(tǒng)的數(shù)據(jù)流圖后,還有相當(dāng)多的數(shù)據(jù)信息如圖書、借閱、歸還等信息需要進(jìn)一步描述,這就是需要定義數(shù)據(jù)字典,才能把現(xiàn)有的系統(tǒng)描述清楚。圖2.7列出了系統(tǒng)的主要數(shù)據(jù)字典。西安培華學(xué)院本科畢業(yè)論文(設(shè)計(jì)) 圖書管理
12、系統(tǒng)的設(shè)計(jì)圖2.7 系統(tǒng)主要數(shù)據(jù)字典2.3 功能需求經(jīng)過以上詳細(xì)的用戶調(diào)查,在現(xiàn)行業(yè)務(wù)流程和數(shù)據(jù)分析的基礎(chǔ)上,基本可以確定系統(tǒng)設(shè)計(jì)必須達(dá)到的目標(biāo)。 以下是圖書管理系統(tǒng)必須具備的功能:1.新進(jìn)圖書的登記功能:對(duì)于購進(jìn)的新書,系統(tǒng)必須具備圖書信息資料的錄入功能。2.圖書的查詢修改功能:當(dāng)圖書資料發(fā)生變化,如圖書丟失或有錯(cuò)誤信息輸入時(shí),則應(yīng)能夠及時(shí)對(duì)數(shù)據(jù)進(jìn)行修改和補(bǔ)充。3.借閱的登記,歸還的登記功能:系統(tǒng)的主要功能之一,供本校學(xué)生借閱圖書、歸還圖書,并進(jìn)行登記。4.學(xué)生信息的增加、刪除和修改功能:系統(tǒng)主要功能之一,建立學(xué)生信息,并對(duì)其進(jìn)行維護(hù)。2.4性能需求為了保證系統(tǒng)能夠長期、安全、穩(wěn)定、可靠、高
13、效的運(yùn)行,圖書管理系統(tǒng)應(yīng)該滿足以下的性能需求:1、系統(tǒng)處理的準(zhǔn)確性和及時(shí)性系統(tǒng)處理的準(zhǔn)確性和及時(shí)性是系統(tǒng)的必要性能。在系統(tǒng)設(shè)計(jì)和開發(fā)過程中,要充分考慮系統(tǒng)當(dāng)前和將來可能承受的工作量,使系統(tǒng)的處理能力和響應(yīng)時(shí)間能夠滿足學(xué)校對(duì)信息處理的需求。2、系統(tǒng)的開放性和系統(tǒng)的可擴(kuò)充性圖書管理系統(tǒng)在開發(fā)過程中,應(yīng)該充分考慮以后的可擴(kuò)充性。例如用戶查詢的需求也會(huì)不斷的更新和完善。3、系統(tǒng)的易用性和易維護(hù)性圖書管理系統(tǒng)是直接面對(duì)使用人員的,而使用人員往往對(duì)計(jì)算機(jī)并不時(shí)非常熟悉。這就要求系統(tǒng)能夠提供良好的用戶接口,易用的人機(jī)交互界面。要實(shí)現(xiàn)這一點(diǎn),就要求系統(tǒng)應(yīng)該盡量使用用戶熟悉的術(shù)語和中文信息的界面;針對(duì)用戶可能出
14、現(xiàn)的使用問題,要提供足夠的在線幫助,縮短用戶對(duì)系統(tǒng)熟悉的過程。4、系統(tǒng)的標(biāo)準(zhǔn)性系統(tǒng)在設(shè)計(jì)開發(fā)使用過程中都要涉及到很多計(jì)算機(jī)硬件、軟件。所有這些都要符合主流國際、國家和行業(yè)標(biāo)準(zhǔn)。5、系統(tǒng)的先進(jìn)性目前計(jì)算系統(tǒng)的技術(shù)發(fā)展相當(dāng)快,做為圖書管理系統(tǒng)工程,在系統(tǒng)的生命周期盡量做到系統(tǒng)的先進(jìn),充分完成企業(yè)信息處理的要求而不至于落后。這一方面通過系統(tǒng)的開放性和可擴(kuò)充性,不斷改善系統(tǒng)的功能完成。另一方面,在系統(tǒng)設(shè)計(jì)和開發(fā)的過程中,應(yīng)在考慮成本的基礎(chǔ)上盡量采用當(dāng)前主流并先進(jìn)且有良好發(fā)展前途的產(chǎn)品。6、系統(tǒng)的響應(yīng)速度圖書管理系統(tǒng)系統(tǒng)在日常處理中的響應(yīng)速度為秒級(jí),達(dá)到實(shí)時(shí)要求,以及時(shí)反饋信息。在進(jìn)行統(tǒng)計(jì)分析時(shí),根據(jù)所
15、需數(shù)據(jù)量的不同而從秒級(jí)到分鐘級(jí),原則是保證操作人員不會(huì)因?yàn)樗俣葐栴}而影響工作效率。第三章 系統(tǒng)總體設(shè)計(jì)3.1 新的業(yè)務(wù)流程根據(jù)需求分析的得到的現(xiàn)行業(yè)務(wù)處理流程,在用戶反復(fù)研究后,首先確定目標(biāo)系統(tǒng)的業(yè)務(wù)流程,其處理流程如圖3.1。圖3.1 圖書管理系統(tǒng)的業(yè)務(wù)流程針對(duì)新的業(yè)務(wù)流程,現(xiàn)具體描述其功能如下:1.用戶登錄:系統(tǒng)對(duì)用戶合法性進(jìn)行檢查。2.圖書入庫:對(duì)新購進(jìn)的圖書分類進(jìn)行編號(hào),并把圖書基本信息錄入計(jì)算機(jī)。3.圖書借閱:對(duì)已入庫的圖書,學(xué)生可以借閱,并進(jìn)行登記。4.圖書歸還:對(duì)學(xué)生已歸還的圖書進(jìn)行歸還登記。 5.信息查詢:即對(duì)所有圖書的借閱情況,或?qū)W生的基本情況和借閱情況進(jìn)行查詢。6.管理措施
16、:定義系統(tǒng)規(guī)定的借閱圖書超期時(shí)間、超期處罰辦法和丟失賠償辦法。3.2 系統(tǒng)功能模塊圖依據(jù)需求分析階段得到的數(shù)據(jù)流圖,采用軟件工程中軟件設(shè)計(jì)的概念和原理,與用戶成分協(xié)商后,在保證系統(tǒng)基本功能要求的前提下,結(jié)合系統(tǒng)新的業(yè)務(wù)流程確定系統(tǒng)必須具備的所有功能,由此給出圖書管理系統(tǒng)的系統(tǒng)功能模塊圖如圖3.2所示。圖3.2 圖書管理系統(tǒng)功能模塊圖3.3 系統(tǒng)的流程圖依據(jù)軟件工程的基本原理,綜合以上分析給出系統(tǒng)流程圖如圖3.4所示。圖3.4 系統(tǒng)流程圖第四章 詳細(xì)設(shè)計(jì)4.1 程序流程圖依據(jù)軟件工程的基本原理,詳細(xì)設(shè)計(jì)階段的根本任務(wù)是確定應(yīng)該怎樣具體實(shí)現(xiàn)所要求的系統(tǒng),也就是說,經(jīng)過這個(gè)階段的設(shè)計(jì)工作,應(yīng)該得出對(duì)
17、目標(biāo)系統(tǒng)的精確描述,從而在系統(tǒng)實(shí)現(xiàn)階段可以把這個(gè)描述直接翻譯成用某種程序設(shè)計(jì)語言書寫的程序。具體來說就是把經(jīng)過總體設(shè)計(jì)得到的各個(gè)模塊詳細(xì)的加以描述。由于本系統(tǒng)采用支持面向?qū)ο蟮膙isual basic 6.0作為開發(fā)工具,而visual basic 6.0采用事件驅(qū)動(dòng)的編程機(jī)制,所以在此給出軟件系統(tǒng)的主程序流程圖,如圖4.1所示。圖4.1 主程序流程圖根據(jù)以上主程序的流程圖,我們可以得出下面的關(guān)于各個(gè)模塊的程序流程圖,如圖4.2所示。 圖4.2 程序流程圖4.2 程序輸入輸出描述4.2.1 主模塊1.輸入項(xiàng)目:操作系統(tǒng)傳遞至的各種消息以及用戶的輸入數(shù)據(jù)。2.輸出項(xiàng)目:用戶界面顯示。4.2.1
18、學(xué)生管理模塊1.輸入項(xiàng)目:與學(xué)生管理操作子對(duì)話框有關(guān)的用戶輸入及系統(tǒng)消息。2.輸出項(xiàng)目:操作結(jié)果顯示。4.2.2 圖書管理模塊1.輸入項(xiàng)目:用戶口令。2.輸出項(xiàng)目:相應(yīng)的界面。4.2.3 借閱管理模塊1.輸入項(xiàng)目:學(xué)生學(xué)號(hào)、圖書編號(hào)。2.輸出項(xiàng)目:學(xué)生信息、相關(guān)借書信息。4.2.4 歸還管理模塊1.輸入項(xiàng)目:圖書編號(hào)。2.輸出項(xiàng)目:相關(guān)學(xué)生信息。4.2.5 管理措施設(shè)置模塊1.輸入項(xiàng)目:用戶的輸入。2.輸出項(xiàng)目:根據(jù)用戶的輸入顯示相應(yīng)的對(duì)話框。4.3 程序接口描述4.3.1 外部接口按windows應(yīng)用軟件用戶界面的規(guī)范來設(shè)計(jì),使用以對(duì)話框?yàn)橹鞯挠脩艚缑妫阌谟脩羰褂谩?.3.2 內(nèi)部接口模塊
19、間接口采用數(shù)據(jù)耦合方式,通過參數(shù)表傳送數(shù)據(jù),交換信息。4.4 數(shù)據(jù)庫的設(shè)計(jì)4.4.1 數(shù)據(jù)庫的邏輯設(shè)計(jì)在需求分析階段已完成該系統(tǒng)所有的數(shù)據(jù)分析。根據(jù)該階段所建立的概念模型,已經(jīng)得出滿足系統(tǒng)設(shè)計(jì)要求的幾個(gè)關(guān)系描述,該階段的主要工作就是把前一階段的成果轉(zhuǎn)化為具體的數(shù)據(jù)庫。下面給出概念結(jié)構(gòu)設(shè)計(jì)得e-r圖如圖4.3所示。(1) 分e-r圖(2) 總e-r圖圖4.3 概念結(jié)構(gòu)設(shè)計(jì)e-r圖實(shí)體:圖書(圖書編號(hào),書名,作者,出版社,定價(jià),圖書類別,圖書isbn號(hào),圖書數(shù)量) 學(xué)生(學(xué)生學(xué)號(hào),學(xué)生姓名,性別,入校時(shí)間,畢業(yè)時(shí)間) 管理員(編號(hào),名字,密碼,加入時(shí)間)聯(lián)系:學(xué)生管理(圖書管理員,學(xué)生姓名,學(xué)生密
20、碼) 圖書管理(圖書管理員,借閱號(hào),歸還號(hào)) 查詢(圖書編號(hào),借閱證號(hào),圖書管理員,學(xué)生)第五章 編碼實(shí)現(xiàn)5.1 程序編碼登陸界面如圖5.1所示。圖5.1 登陸界面程序代碼如下:function check_password(byval username as string, byval userpassword as string) as integer on error goto er2: if connecttoserver = true then set objrs = new recordset strsql = select coperatorpassword from toper
21、ators where coperatorname= & trim(cboname.text) & getdata strsql reference function to get data if objrs.eof then check_password = 0 this operator not exist else if txtpassword.text trim(objrs.fields(coperatorpassword).value) then check_password = 1 password error else check_password = 2 password ok
22、 currentopname = trim(cboname.text) currentoppassword = objrs.fields(coperatorpassword).value here can save a operator grade for expand end if end if objcon.close exit functioner2: msgbox err.description check_password = 255 end ifend functionprivate sub cmdcancel_click() unload me endend subprivate
23、 sub cmdok_click() dim intcheck as integer static intlogtimes to save user login times static intlogtimes as integer intlogtimes = intlogtimes + 1 save login times if intlogtimes maxlogtimes then over allowed login times then list information msgbox you have over allowed loghin times,login failure !
24、, vbcritical, loginerror unload me else intcheck = check_password(trim(txtpassword), trim(cboname) select case intcheck case 0 msgbox your are not a system user !, vbinformation + vbokonly, loginerror case 1 msgbox password error ,please check your password !, vbinformation + vbokonly, loginerror ca
25、se 2 unload me if currentopname = admin and currentoppassword = 1 then mainwin.mnuop.visible = true else mainwin.mnuop.visible = false end if load mainwin mainwin.show end select end ifend sub主界面如圖5.2所示。圖5.2 程序主界面程序代碼如下:option explicitprivate sub mdiform_activate() if currentopname = admin then stat
26、usbar2.panels(1).text = 管理員: & currentopname toolbar1.buttons(1).visible = true toolbar1.buttons(2).visible = true else statusbar2.panels(1).text = 操作員: & currentopname toolbar1.buttons(1).visible = false toolbar1.buttons(2).visible = false end ifend subprivate sub mdiform_mousedown(button as intege
27、r, shift as integer, x as single, y as single) if button = vbrightbutton then popupmenu mnuoperation design popup menu end ifend subprivate sub mdiform_unload(cancel as integer) checkconnect reference function to make objcon break if connection is openend subprivate sub mnuabout_click() frmabout.sho
28、wend subprivate sub mnubookquery_click() checkconnect reference function to make objcon break if connection is open load frmbookquery frmbookquery.showend subprivate sub mnubookregist_click() checkconnect reference function to make objcon break if connection is open load frmbookreg frmbookreg.showen
29、d subprivate sub mnuborrowquery_click() checkconnect reference function to make objcon break if connection is open load frmreadquery frmreadquery.showend subprivate sub mnuexit_click() checkconnect reference function to make objcon break if connection is open unload me endend subprivate sub mnurelog
30、in_click() checkconnect reference function to make objcon break if connection is open unload me load frmlogin frmlogin.showend subprivate sub mnuvipquery_click() checkconnect reference function to make objcon break if connection is open load frmvipquery frmvipquery.showend subprivate sub mnuvipregis
31、t_click() checkconnect reference function to make objcon break if connection is open load frmvipreg frmvipreg.showend subprivate sub munreadregist_click() checkconnect reference function to make objcon break if connection is open load frmreadregist frmreadregist.showend subprivate sub toolbar1_butto
32、nclick(byval button as mscomctllib.button)select case button.key case operatorreg checkconnect reference function to make objcon break if connection is open load frmadmin frmadmin.show case vipreg checkconnect reference function to make objcon break if connection is open load frmvipreg frmvipreg.sho
33、w case vipquery checkconnect reference function to make objcon break if connection is open load frmvipquery frmvipquery.show case bookreg checkconnect reference function to make objcon break if connection is open load frmbookreg frmbookreg.show case bookquery checkconnect reference function to make
34、objcon break if connection is open load frmbookquery frmbookquery.show case readreg checkconnect reference function to make objcon break if connection is open load frmreadregist frmreadregist.show case readquery checkconnect reference function to make objcon break if connection is open load frmreadq
35、uery frmreadquery.showend selectend sub操作員管理界面如圖5.3所示。圖5.3 操作員管理界面代碼如下:option explicitsub settextempty()this function is set all text to empty txtopid.text = txtopname.text = txtoppwd.text = cboopgrade.text = txtopaddtime.text = end subsub refreshoperator()this function is to refresh text txtopid.te
36、xt = objrs.fields(0).value txtopname.text = objrs.fields(1).value txtoppwd.text = objrs.fields(2).value cboopgrade.text = objrs.fields(3).value txtopaddtime.text = objrs.fields(4).valueend subprivate sub cmdadd_click() txtopid.enabled = true you dont change datagrid untill you add data finish dgdop.
37、enabled = false if cmdadd.caption = 添加 then cmdadd.caption = 確定 settextempty reference settextempty founction to set empty cmddel.enabled = false cmdmodify.enabled = false cmdrefresh.enabled = false txtopid.setfocus else if trim(txtopname.text) = then msgbox operator name must not null ,please input
38、 operator name !, vbinformation + vbokonly txtopname.setfocus exit sub elseif trim(txtopid.text) = then msgbox operator id must not null ,please input operator id !, vbinformation + vbokonly txtopid.setfocus exit sub elseif trim(txtoppwd.text) = then msgbox operator password must not null ,please in
39、put operator password !, vbinformation + vbokonly txtoppwd.setfocus exit sub else with objrs checkaddnew = true .filter = coperatorid= & trim(txtopid.text) & if .recordcount 0 then msgbox this operator has been exist ! txtopid.text = txtopid.setfocus .filter = coperatorid cmdrefresh.value = true to
40、executer refresh once checkaddnew = false cmddel.enabled = true cmdmodify.enabled = true cmdadd.caption = 添加(&a) txtopid.enabled = false cmdrefresh.enabled = true dgdop.enabled = true checkaddnew = false exit sub end if checkaddnew = true .addnew .fields(0).value = trim(txtopid.text) .fields(1).valu
41、e = trim(txtopname.text) .fields(2).value = trim(txtoppwd.text) .fields(3).value = trim(cboopgrade.text) .fields(4).value = trim(txtopaddtime.text) .update msgbox operator add success !, vbinformation + vbokonly .filter = coperatorid cmdrefresh.value = true to executer refresh once end with checkadd
42、new = false -there will reference a founction to set empty txtopid.enabled = false cmddel.enabled = true cmdmodify.enabled = true cmdrefresh.enabled = true cmdadd.caption = 添加 dgdop.enabled = true you can use datagrid after add finish end if end ifend subprivate sub cmddel_click() if empty_check = t
43、rue then exit sub reference function to check if your database is null if not objrs.eof and objrs.recordcount 0 then if msgbox(the : & txtopname & s data will delete continue ?, vbyesno + vbinformation) = vbyes then objrs.delete end if end ifend subprivate sub cmdmodify_click() if empty_check = true
44、 then exit sub reference function to check if your database is null dgdop.enabled = false if txtopid.text objrs.fields(0).value then exit sub to check operator id if cmdmodify.caption = 修改 then cmdmodify.caption = 確定 cmddel.enabled = false cmdadd.enabled = false else with objrs .fields(0).value = trim(txtopid.text) .fields(1).value = trim(txtopname.text) .fields(2).value = trim(txtoppwd.text) .fields(3).value = trim(cboopgrade.text) .
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(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)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 中醫(yī)基礎(chǔ)學(xué)試題
- 公差配合與測量技術(shù)應(yīng)用考試題(附參考答案)
- 廣東再生鋁項(xiàng)目可行性研究報(bào)告模板參考
- 鍋爐設(shè)備評(píng)估報(bào)告(范本模板)
- 體育公園可行研究報(bào)告
- 2025年自動(dòng)直線玻璃磨邊機(jī)行業(yè)深度研究分析報(bào)告
- 半導(dǎo)體用石墨保溫材料項(xiàng)目節(jié)能評(píng)估報(bào)告(節(jié)能專)
- 中國射頻頻譜分析儀行業(yè)市場全景分析及投資前景展望報(bào)告
- 2020-2025年中國體育旅游行業(yè)發(fā)展?jié)摿Ψ治黾巴顿Y方向研究報(bào)告
- 2025至2030年中國滾輪式裁紙刀數(shù)據(jù)監(jiān)測研究報(bào)告
- 蘇州2025年江蘇蘇州太倉市高新區(qū)(科教新城婁東街道陸渡街道)招聘司法協(xié)理員(編外用工)10人筆試歷年參考題庫附帶答案詳解
- 幼兒園課件:健康教案
- 河南航空港發(fā)展投資集團(tuán)有限公司2025年社會(huì)招聘題庫
- 2025至2031年中國助眠床墊行業(yè)投資前景及策略咨詢研究報(bào)告
- 綿陽市高中2022級(jí)(2025屆)高三第二次診斷性考試(二診)語文試卷(含答案)
- 常州初三強(qiáng)基數(shù)學(xué)試卷
- 物業(yè)服務(wù)和后勤運(yùn)輸保障服務(wù)總體服務(wù)方案
- 《吞咽障礙膳食營養(yǎng)管理規(guī)范》(T-CNSS 013-2021)
- 2025四川中煙招聘高頻重點(diǎn)提升(共500題)附帶答案詳解
- 2025年極兔速遞有限公司招聘筆試參考題庫含答案解析
- 仁愛七年級(jí)下冊英語教學(xué)計(jì)劃
評(píng)論
0/150
提交評(píng)論