【正文】
nder: TObject)。 begin if =39。修改 39。 then begin 。 //修改課程表中的記錄 :=39。確定 39。 :=true。 :=false。 :=false。 end else begin 。 :=39。修改 39。 :=false。 :=true。 :=true。 end。 end。 procedure (Sender: TObject)。 begin form11:=(application)。 。 end。 end. 課程查詢(xún)部分: procedure (Sender: TObject)。 begin :=39。39。 :=false。 end。 procedure (Sender: TObject)。 begin if =true then begin 。 //先將數(shù)據(jù)庫(kù)關(guān)閉 。 //清空 ADOQuery1 內(nèi)的 SQL 值清空 (39。select * from kecheng where 39。++39。 = 39。+39。39。39。39。++39。39。39。 and 學(xué)期 = 39。+39。39。39。39。++39。39。39。39。)。 //合并查詢(xún),符合的話在DBGrid 中顯示出來(lái) 。 。 end else begin 。 。 (39。select * from kecheng where 39。++39。 = 39。+39。39。39。39。++39。39。39。39。)。//單個(gè)條件查詢(xún) 。 。 end。 end。 procedure (Sender: TObject)。 begin //開(kāi)啟其他管理界面 。 。 end。 procedure (Sender: TObject)。 begin 。 。 end。 procedure (Sender: TObject)。 begin 。 。 end。 procedure (Sender: TObject)。 begin 。 。 end。 procedure (Sender: TObject)。 begin 。 end。 procedure (Sender: TObject。 var Key: Char)。 begin :=true。 //當(dāng)輸入條件后,“確定”按鈕為有效狀態(tài) end。 procedure (Sender: TObject)。 begin :=。// 把 查 詢(xún) 到 的 數(shù) 據(jù) 放 在DBGrid 上顯示出來(lái) end。 end. 四、學(xué)校學(xué)生管理信息系統(tǒng)的使用說(shuō)明 本系統(tǒng)分為學(xué)生用戶和管理用戶,如果你不是管理員,那只能進(jìn)行查詢(xún),對(duì)數(shù)據(jù)沒(méi)有修改權(quán)力。只能進(jìn)行查詢(xún),里面有各個(gè)方面的,如成績(jī)查詢(xún),課程查詢(xún),班級(jí)查詢(xún),學(xué)籍查詢(xún)。 各個(gè)界面都簡(jiǎn)單明了,只要輸入你所需要的條件,系統(tǒng)自動(dòng)調(diào)出數(shù)據(jù)。 管理員登陸點(diǎn)系統(tǒng),點(diǎn)系統(tǒng),輸入管理員用戶及密碼,跟數(shù)據(jù)庫(kù)的用戶表比較。如果通過(guò) 則能進(jìn)行課程,學(xué)籍,成績(jī),班級(jí)的管理。 五、結(jié)束語(yǔ) 學(xué)生信息管理系統(tǒng)有利于學(xué)校對(duì)學(xué)生資料的查詢(xún),具有可使用性和可維護(hù)性,利于學(xué)校在需要之時(shí)快速了解學(xué)生的情況。并可以讓具有最高權(quán)限的管理員更新、修改信息,已經(jīng)具備了一定的功能。但由于時(shí)間關(guān)系和其它原因,本系統(tǒng)還有些不足之處, 如本系統(tǒng)沒(méi)有實(shí)現(xiàn)報(bào)表打印的功能等等, 還有待于完善。 在張波爾老師的指導(dǎo)下,經(jīng)過(guò)一 段時(shí)間的討論和上機(jī)的不斷調(diào)試,我順利的完成了開(kāi)發(fā)任務(wù)。在開(kāi)發(fā)過(guò)程中,我不僅增強(qiáng)了自學(xué)的能力和開(kāi)發(fā)軟件的能力。對(duì)一些軟件開(kāi)發(fā)模式有了更加深刻的認(rèn)識(shí),對(duì)應(yīng)用軟件的熟練程度有所提高,已經(jīng)能運(yùn)用這項(xiàng)開(kāi)發(fā)過(guò)程,學(xué)會(huì)了如何進(jìn)行小組式的開(kāi)發(fā)一個(gè)綜合系統(tǒng)。還從張老師身上學(xué)到了很多東西。張老師認(rèn)真負(fù)責(zé)的態(tài)度嚴(yán)謹(jǐn)治治學(xué)精神都使我收益非淺。在此我特向給了 很 多 指 導(dǎo)和 提 供我 們 開(kāi) 發(fā)小 組 寶貴 意 見(jiàn) 的 張波爾 老師 表示感謝!因?yàn)楸鞠到y(tǒng)所涉及的內(nèi)容非常廣泛并且比較復(fù)雜,加上時(shí)間的倉(cāng)促,盡管我竭盡全力來(lái)保證系統(tǒng)的可靠性,但是肯定還有不足之處,懇請(qǐng)用 戶批評(píng)指正。謝謝 ! 參考文獻(xiàn) :( 1) Delphi6 數(shù)據(jù)庫(kù)系統(tǒng)開(kāi)發(fā)實(shí)例子導(dǎo)航 人民郵電出版社 ( 2)程序設(shè)計(jì)從入門(mén)到精通 科學(xué)出版社 (3) 程序設(shè)計(jì)教程 冶金工業(yè)出版社 (4)Delphi 數(shù)據(jù)庫(kù)開(kāi)發(fā)自學(xué)教程 人民郵電出版社 各模塊主要代碼 成績(jī)管理模塊 ⑴ 成績(jī)管理 procedure (Sender: TObject)。 var i:boolean。 begin i:=false。 。 。 (39。select * from pjcj where 39。++39。39。)。 。 。 if not then ( 判斷是否數(shù)據(jù)庫(kù)最后一項(xiàng)) i:=true。 if i then begin 。 。 (39。select * from dkcj where 學(xué)號(hào) =39。+39。39。39。39。+[39。 學(xué)號(hào) 39。]+39。39。39。39。)。 (使用 SQL 進(jìn)行查詢(xún)) 。 。 :=false。 end else begin showmessage(39。沒(méi)有符合查詢(xún)條件的記錄 !!39。)。 (如果沒(méi)有符合條 :=39。39。 :=39。39。 件的,顯示該語(yǔ)句) :=39。39。 :=39。39。 :=39。39。 。 。 :=true。 end。 :=39。學(xué)號(hào) 39。 :=39。姓名 39。 :=39。班級(jí) 39。 :=39。學(xué)號(hào) 39。 :=39。姓名 39。 :=39。課程號(hào) 39。 :=39。課程名 39。 :=39。成績(jī) 39。 end。 ( 2)成績(jī)查詢(xún) procedure (Sender: TObject)。 var i:boolean。 begin i:=false。 。 。 (39。select * from pjcj where 39。++39。39。)。 。 (根據(jù) SQL 進(jìn)查詢(xún)) 。 if not then i:=true。 if i then begin 。 。 (39。select * from dkcj where 學(xué)號(hào) =39。+39。39。39。39。+[39。學(xué)號(hào) 39。]+39。39。39。39。)。 。 。 :=false。 end else begin showmessage(39。沒(méi)有符合查詢(xún)條件的記錄 !!39。)。 :=39。39。 (當(dāng)沒(méi)有符合條件的記錄,自動(dòng) :=39。39。 清空選擇框里的查詢(xún)條件) :=39。39。 :=39。39。 :=39。39。 。 。 :=true。 end。 end。 procedure (Column: TColumn)。 var str:string。 begin str:=[39。學(xué)號(hào) 39。]。 。 。 (39。select * from dkcj where 學(xué)號(hào) =39。+39。39。39。39。+str+39。39。39。39。)。 。 。 end。 procedure (Sender: TObject)。 (管理界面的切換) begin 。 。 end。 procedure (Sender: TObject)。 begin 。 。 end。 procedure (Sender: TObject)。 begin if =39。平均成績(jī) 39。 then (根據(jù)平均成績(jī)查詢(xún)) begin :=+。 end else begin :=+39。 :=+。 :=+39。 end。 end。 procedure (Sender: TObject)。 begin (本段為對(duì)查詢(xún)條件的刷新,進(jìn) :=39。39。 行不同條件的輸入) :=39。39。 :=39。39。 :=39。39。 :=39。39。 。 。 :=false。 :=true。 end。 班級(jí)管理模塊 ( 1)班級(jí)管理 procedure (Sender: TObject)。 begin 。 。 (39。select * from class where 系名 = 39。+39。39。39。39。++39。39。39。39。)。 。 。 (根據(jù)系別顯示班級(jí)信息) :=39。系名 39。 (這五項(xiàng)為表的數(shù)據(jù)項(xiàng)名) :=39。班級(jí) 39。 :=39。輔導(dǎo)員 39。 :=39。班長(zhǎng) 39。 :=39。專(zhuān)業(yè) 39。 :=true。 :=true。 :=true。 :=true。 end。 procedure (Sender: TObject)。 (記錄的刪除操作)《修改與添加操作與這類(lèi)似》 begin if =39。刪除 39。 then begin :=39。確定 39。 :=false。 :=false。 :=true。 end ( 2)班級(jí)查詢(xún) procedure (Sender: TObject)。 begin if then begin 。 。 (39。select * from class where 班級(jí) = 39。+39。39。39。39。++39。39。39。39。)。 。 。 end。 if then begin 。 。 (39。select * from class where 專(zhuān)業(yè) = 39。+39。39。39。39。++39。39。39。39。)。 。 。 end。 if [39。系名 39。]39。39。 then begin 。 。 (39。select * from xi where 系名 = 39。+39。39。39。39。+[39。系名 39。]+39。39。39。39。)。 。 。 end。 學(xué)籍管理模塊 ( 1)學(xué)籍管理 procedure (Sender: TObject)。 begin 。 。 (39。select * from xi39。)。 。 。 。 。 (39。select * from class where 系名 = 39。+39。39。39。39。++39。39。39。39。)。 。 。 。 。 (39。select * from student where 班級(jí) = 39。+39。39。39。39。+[39。班級(jí) 39。]+39。39。39。39。)。 (根據(jù)班級(jí)條件列出該班學(xué)生學(xué)籍情況) 。 。 :=39。學(xué)號(hào) 39。 (表的數(shù)據(jù)項(xiàng),以及學(xué)生學(xué)籍信息) :=39。班級(jí) 39。 :=39。姓名 39。 :=39。出生年月 39。 :=39。籍貫 39。 :=39。聯(lián)系電話 39。 :=39。聯(lián)系地址 39。 :=39。性別 39。 while not do begin ([39。系 名 39。])。 。 end。 ( 2)學(xué)籍查詢(xún) procedure (Sender: TObject)。 var tf:boolean。 begin tf:=false。 。 。 (39。select * from student 39。)。 if or or or then (39。where39。)。 if then begin (39。39。++39。=39。+39。39。39。39。+ +39。39。39。39。)。 tf:=true。 end。 if then begin if tf then (39。and39。)。 (39。39。++39。=39。+39。39。39。39。+ +39。39。39。39。)。 tf:=true。 end。 if then begin if tf then (39。and39。)。 (39。39。++39。=39。+39。39。39。39。+ +39。39。39。39。)。 tf:=true。 end。 if then begin if tf then (39。and39。)。 (39。39。++39。=39。+39。39。39。39。+ +39。39。39。39。)。 tf:=true。 end。 。 。 end。 (4)課程管理部分的代碼: 選課管理: begin ([39。 系名 39。])。 //ComboBox1 連到系表的 系名 字段 。 end。 end。 procedure (Sender: TObject)。 begin 。 。 (39。select * from class w