【正文】
當(dāng)我基本完成此系統(tǒng)開發(fā)的時(shí)候,我發(fā)現(xiàn)其實(shí)也沒有那么難,在未做之前我還害怕做不出來。雖然本系統(tǒng)有比較強(qiáng)的安全功能,但安全功能還不夠強(qiáng)大,比如用戶真實(shí)姓名沒有糾錯(cuò),應(yīng)該把所有部門的職工全都輸入到表中,當(dāng)注冊(cè)的時(shí)候,輸入真實(shí)姓名,如果相關(guān)部門沒有此人,則不允許注冊(cè),此功能尚未實(shí)現(xiàn),將在以后的時(shí)間,繼續(xù)完善。)()ll_row=()if ll_row=0 then messagebox(系統(tǒng)提示,無記錄!) returnend if退出按鈕代碼:close(w_consumer_query)訂閱界面:(17)制作用戶菜單中統(tǒng)計(jì)菜單:制作用戶統(tǒng)計(jì)界面:w_consumer_stat,將數(shù)據(jù)窗口d_consumer_stat放入 w_consumer_stat中;代碼:窗口代碼:int ll_row(sqlca)(consumer_uname=39。if 0 then messagebox(系統(tǒng)提示,無此報(bào)刊!) = returnend ifselect Mhalfprice,Mwholeinto :halfprice,:wholepricefrom magazinewhere Mnumber=:magazinenum。 then messagebox(系統(tǒng)提示,對(duì)不起!請(qǐng)您輸入密碼) returnend ifif magazinenum= or magazinenum=39。39。代碼:窗口代碼://定義變量,用于存儲(chǔ)用戶各字段 string name,realname,pass,sex,dept,phone,address//查詢登陸者的相關(guān)信息select Uname,Upassword,Urealname,Usex,Dnumber,uphone,Uaddressinto :name,:pass,:realname,:sex,:dept,:phone,:addressfrom consumerwhere Uname=:gs_operator_id。39。 then MessageBox(系統(tǒng)提示,對(duì)不起!請(qǐng)輸入部門號(hào)!否則無法注冊(cè)!) () returnend ifselect Dnumberinto :number1from departmentwhere Dnumber=:number。if =0 then MessageBox(系統(tǒng)提示,對(duì)不起,此用戶名已被注冊(cè)!請(qǐng)另選一個(gè)試試!) = returnend ifif password= or password=39。39。查詢出的信息顯示在界面上。本系統(tǒng)主要面向的用戶有系統(tǒng)管理員、讀者。本課程設(shè)計(jì)主要在于加深學(xué)生對(duì)數(shù)據(jù)庫基礎(chǔ)理論和基本知識(shí)的理解,掌握數(shù)據(jù)庫應(yīng)用系統(tǒng)設(shè)計(jì)開發(fā)的基本方法,達(dá)到進(jìn)一步使學(xué)生綜合運(yùn)用所學(xué)知識(shí)和增強(qiáng)實(shí)際動(dòng)手能力的目的。它能夠?qū)崿F(xiàn)報(bào)刊訂閱的基本功能,包括新報(bào)刊信息的錄入、訂閱、查詢等操作以及后臺(tái)數(shù)據(jù)庫的備份和恢復(fù)。l (2)錄入新信息功能:對(duì)于管理員,包括新用戶信息和新報(bào)刊信息的錄入功能,信息一旦提交就存入到后臺(tái)數(shù)據(jù)庫中;普通用戶自行注冊(cè)進(jìn)行錄入個(gè)人信息。本系統(tǒng)的結(jié)構(gòu)功能圖: ER圖本系統(tǒng)采用ER圖(實(shí)體關(guān)系圖)的方法進(jìn)行數(shù)據(jù)庫概念結(jié)構(gòu)設(shè)計(jì)。 if 0 then messagebox(系統(tǒng)提示,無此用戶!) = = () return elseif getpasswordgs_password then messagebox(警告,口令錯(cuò)誤!) = () return end if gs_operator_id=id open(w_consumermain) close(w_login)elseif =false and =false then messagebox(系統(tǒng)提示,請(qǐng)選擇用戶類型!) returnend if(5)制作注冊(cè)界面w_enroll;代碼:注冊(cè)按鈕:string name,realname,password,copypassword,sex,number,phone,address,number1string nname=trim()password=trim()copypassword=trim()realname=trim()if =true then sex=男elseif =true then sex=女end ifnumber=trim()phone=trim()address=trim()if name= or name=39。39。 messagebox(系統(tǒng)提示,信息保存成功!) return end ifend ifif =b_4 then close(parent)end if數(shù)據(jù)窗口:界面:(9)制作管理員主菜單中查詢菜單:分別制作制作查詢數(shù)據(jù)窗口d_consumer_ruery, d_dept_query, d_magazine_query,分別制作管理員按用戶查詢界面w_consumer_ruery,按部門查詢界面w_dept_query,按報(bào)刊查詢界面w _magazine_query;將d_consumer_ruery, d_dept_query, d_magazine_query分別放入w_consumer_query,w_dept_query, w _magazine_query中。制作管理員按用戶統(tǒng)計(jì)界面w_stat_consumer,按部門統(tǒng)計(jì)界面w_stat_department,按報(bào)刊統(tǒng)計(jì)界面w_stat_magazine。 then MessageBox(系統(tǒng)提示,對(duì)不起!真實(shí)姓名不能為空!) () return end if if sex= or sex=39。39。39。update consumerset subscribenum=:kindnumwhere Uname=:name 。比較其他的管理系統(tǒng),本系統(tǒng)可以比較方便的統(tǒng)計(jì)出訂閱的所需金額及各報(bào)刊的訂閱總數(shù)。這個(gè)課程設(shè)計(jì)使我鞏固了數(shù)據(jù)庫的知識(shí)。只有了知識(shí)的積淀,才能為自己的發(fā)展鋪平道路!。但只有兩周的課程設(shè)計(jì)時(shí)間,時(shí)間比較倉促,所以開發(fā)的系統(tǒng)不是很完善,有一些功能未實(shí)現(xiàn),但是報(bào)刊訂閱的基本功能均已