畢業(yè)設(shè)計(論文)基于VB的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)畢業(yè)設(shè)計_第1頁
畢業(yè)設(shè)計(論文)基于VB的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)畢業(yè)設(shè)計_第2頁
畢業(yè)設(shè)計(論文)基于VB的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)畢業(yè)設(shè)計_第3頁
畢業(yè)設(shè)計(論文)基于VB的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)畢業(yè)設(shè)計_第4頁
畢業(yè)設(shè)計(論文)基于VB的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)畢業(yè)設(shè)計_第5頁
已閱讀5頁,還剩47頁未讀 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領(lǐng)

文檔簡介

1、題 目 基于vb的學(xué)生管理系統(tǒng)設(shè)計與實現(xiàn)目錄【內(nèi)容摘要】【關(guān)鍵詞】 第一章 概述 1.1 開發(fā)背景. 1.2 開發(fā)環(huán)境第二章 系統(tǒng)分析和設(shè)計 2.1 系統(tǒng)業(yè)務(wù)流程圖. 2.2 系統(tǒng)邏輯模型的提出. 2.3 總提模塊的劃分. 2.4各個模塊的功能 2.5數(shù)據(jù)庫的設(shè)計.第三章 系統(tǒng)實現(xiàn)3.1公共模塊.3.2登陸系統(tǒng).3.3系統(tǒng)管理.3.4學(xué)生檔案管理.3.5班級管理.3.6課程管理.3.7成績管理.第四章總結(jié).第五章參考文獻【內(nèi)容摘要】無論學(xué)校大小,每個學(xué)校手里總是會有很多很多的學(xué)生檔案,而且隨著一年一年的累積,學(xué)校規(guī)模的逐漸擴大,學(xué)生檔案信息是越來越多?,F(xiàn)在隨著中國加入了wto,很多的企業(yè)為了能

2、夠加強自己的競爭力,都不約而同的在工作效率和管理的規(guī)范性方面下功夫。現(xiàn)在計算機化管理已經(jīng)不知不覺中滲透到了各行各業(yè),并且提高了這些行業(yè)的效率。學(xué)校雖然不算是一個純粹的企業(yè),但是學(xué)校的管理一樣需要信息化,而且現(xiàn)在的學(xué)校逐漸的往大規(guī)模的方向發(fā)展,信息化對于學(xué)校就顯的更加的重要了。以前的手工管理,已經(jīng)越來越不適應(yīng)學(xué)校的發(fā)展要求了。針對這種情況下,我設(shè)計了這么一個簡單的學(xué)生檔案管理系統(tǒng),雖然很小,但是呢,還是有一定的使用價值的?!娟P(guān)鍵詞】學(xué)生檔案管理系統(tǒng) vb6.0 管理信息系統(tǒng)第一章 概述11開發(fā)背景現(xiàn)在的社會日新月異,發(fā)展的非??臁W(xué)校的發(fā)展也是非常的快了,而且每年都有不同的要求。學(xué)生的量也非常的

3、大,資料可能經(jīng)常性的發(fā)生更換,原來手工的管理模式就顯的不怎么的合適了。而且手工的數(shù)據(jù)是存放在多處的,沒有使用統(tǒng)一管理的模式,數(shù)據(jù)整理非常的麻煩,統(tǒng)計也困難,很多的情況下,老師都是在重復(fù)一些相同的工作。做一些相似的報表,這樣不但降低了工作效率,而且非常的容易出錯。在這種條件下,使用微機管理就顯的非常的合適了。只要你正確的錄入,統(tǒng)計,報表輸出一點問題都沒有的。學(xué)生做為學(xué)校的最主要的管理對象,學(xué)生檔案管理系統(tǒng)就成了學(xué)校信息化管理系統(tǒng)中中不可缺少的部分,它的內(nèi)容對于學(xué)校的管理者說都至關(guān)重要。但一直以來人們使用傳統(tǒng)人工的方式進行學(xué)生的檔案管理,這種管理方式存在著許多缺點,如:效率低,容易出錯,格式不規(guī)范

4、。另外時間一長,不容易進行統(tǒng)計和分析。隨著科學(xué)技術(shù)的不斷提高,計算機科學(xué)日漸成熟,其強大的功能已為人們深刻認識,它已進入人類社會的各個領(lǐng)域并發(fā)揮著越來越重要的作用。作為計算機應(yīng)用的一部分,使用計算機對學(xué)生檔案進行管理,具有手工管理所無法比擬的優(yōu)點。例如:檢索迅速、查找方便、可靠性高、存儲量大、壽命長、成本低等。這些優(yōu)點能夠極大地提高學(xué)校學(xué)生檔案管理的效率。因此,開發(fā)這樣一套管理軟件成為很有必要的事情。而且只要軟件的設(shè)計合理,可以為學(xué)校提供合理的管理模式。12開發(fā)運行環(huán)境在操作系統(tǒng)方面,雖然現(xiàn)在linux的發(fā)展速度非常的快,但是對于大多數(shù)的使用者來說,操作顯然沒有微軟的windows那么的流行和

5、傻瓜化。而且現(xiàn)在計算機的運算速度已經(jīng)不能和以前相提并論了,而且硬件的價格也一天天的在下降了,所以也不用為了節(jié)省整體的造價而改用硬件要求很低的dos系統(tǒng)了。所以我們決定該檔案管理系統(tǒng)將運行在強大的工具來協(xié)助管理人員輕松地進行與數(shù)據(jù)庫的連接和管理。綜上所述,我們選擇了visual basic+sql來開發(fā)整個系統(tǒng)。第二章 系統(tǒng)分析和設(shè)計21系統(tǒng)業(yè)務(wù)流程圖詳細調(diào)查的重點是對管理業(yè)務(wù)的流程進行描述,通過采用系統(tǒng)流程圖中部分圖形工具來描述管理活動,進行規(guī)范化說明。業(yè)務(wù)流程圖的符號說明如圖21所示:1、 2、 3、 4、 5、系統(tǒng)中人員 實體或單據(jù) 實物或信息流 處理 數(shù)據(jù)存儲圖21 業(yè)務(wù)流程圖圖例詳細調(diào)

6、查之后,繪制出的學(xué)生檔案管理系統(tǒng)的管理業(yè)務(wù)流程圖如圖22所示。每學(xué)年9月份各班學(xué)生名單各班學(xué)生名單(空白,供填寫學(xué)生成績)學(xué)生檔案處理報表教導(dǎo)處存檔校領(lǐng)導(dǎo)各班主任各年級主任各班學(xué)生名單微機室教導(dǎo)處轉(zhuǎn)退復(fù)留學(xué)生名單錄入有關(guān)信息打印各班名單學(xué)生檔案處理學(xué)生檔案處理報表學(xué)生檔案處理報表年級主任 圖22 學(xué)生檔案管理系統(tǒng)業(yè)務(wù)流程圖2.2系統(tǒng)邏輯模型的提出系統(tǒng)分析的主要成果是系統(tǒng)的邏輯模型。本系統(tǒng)的邏輯模型主要是以系統(tǒng)的數(shù)據(jù)流圖和數(shù)據(jù)字典為主要描述工具。即在對學(xué)生成績管理方式和業(yè)務(wù)流程進行認真分析和研究的基礎(chǔ)上,排除現(xiàn)有組織機構(gòu)和業(yè)務(wù)分工所造成的信息障礙。完全從業(yè)務(wù)管理功能和管理對象出發(fā),按照信息系統(tǒng)中

7、應(yīng)有的數(shù)據(jù)流和數(shù)據(jù)結(jié)構(gòu)來勾畫系統(tǒng)的概貌。2.2.1數(shù)據(jù)流圖(簡稱為dfd)數(shù)據(jù)流圖是組織中信息運動的抽象。是在調(diào)研的基礎(chǔ)上,從系統(tǒng)的科學(xué)性、管理的合理性、實際運動的可行性角度出發(fā)。將信息處理功能和彼此之間的聯(lián)系自頂向下,逐層分解,從邏輯上精確地描述系統(tǒng)應(yīng)具有的數(shù)據(jù)加工功能、數(shù)據(jù)輸入、數(shù)據(jù)輸出、數(shù)據(jù)存儲及數(shù)據(jù)來源和去向(外部實體)等項目。首先,分析學(xué)生檔案管理的總體情況,劃分系統(tǒng)邊界,識別系統(tǒng)的數(shù)據(jù)來源和去處,確定外部實體,得出系統(tǒng)的頂層數(shù)據(jù)流程圖;然后劃分出幾個主要的信息管理功能,并明確各功能之間的聯(lián)系,繪制出數(shù)據(jù)流程圖。數(shù)據(jù)流程圖的符號說明如圖23所示。學(xué)生檔案管理系統(tǒng)的頂層數(shù)據(jù)流程圖如圖2

8、4所示。學(xué)生檔案管理系統(tǒng)的數(shù)據(jù)流程圖如圖25所示 外部實體 處理 數(shù)據(jù)流 數(shù)據(jù)存儲 圖23 數(shù)據(jù)流程圖的符號學(xué)生簡明情況p學(xué)生檔案處理 用戶 校領(lǐng)導(dǎo)學(xué)生檔案報表d1 圖24 學(xué)生檔案處理的頂層數(shù)據(jù)流程圖 222數(shù)據(jù)字典(簡稱為dd)繪制dfd,只是對數(shù)據(jù)處理和彼此之間的聯(lián)系進行了說明。為進一步明確數(shù)據(jù)的詳細內(nèi)。述清楚,以便于此后系統(tǒng)設(shè)計的進行。這就需要開發(fā)人員編寫詳細的數(shù)據(jù)字典。據(jù)項、數(shù)據(jù)流、數(shù)據(jù)存儲、加工處理和數(shù)據(jù)結(jié)構(gòu)的數(shù)據(jù)字典。23 總體模塊劃分學(xué)生信息管理是一項非常重要的工作,它負責(zé)整個學(xué)校的檔案管理,學(xué)生資料管理成績管理等,教務(wù)工作者急切希望計算機提高工作效率。在各大中小學(xué)校中,用計算

9、機管理學(xué)校的信息已經(jīng)越來有越普遍了。采用學(xué)生信息管理系統(tǒng)不僅可以節(jié)省人力物力,而且增強學(xué)校資料的安全性,提高了學(xué)校的管理能力在第一章的開發(fā)背景中已經(jīng)說明了本學(xué)生檔案管理系統(tǒng)的流程了,于是在下面的這個功能設(shè)計中,我們將針對這里的流程進行設(shè)計。我們把系統(tǒng)功能分為如下圖。學(xué)生檔案管理系統(tǒng)班級管理學(xué)生檔案管理課程管理成績管理系統(tǒng)管理231、登陸系統(tǒng)對于這類系統(tǒng)如果誰都能登陸到本系統(tǒng)的話,系統(tǒng)里面的數(shù)據(jù)將非常的危險和有可能會受到蓄意破壞者的攻擊了。考慮到數(shù)據(jù)的安全性,用戶必須擁有密碼才能夠登陸到本系統(tǒng)的主頁面。232、主頁面有5個菜單。分別為。系統(tǒng)管理,學(xué)生檔案管理,班級管理,課程管理,成績管理。對于這

10、個主頁面。我們可以完成所有對學(xué)生檔案的管理,修改,查詢。方便登陸的用戶進行一系列的操作,提供了方便。24各個模塊的功能系統(tǒng)管理:系統(tǒng)菜單包括有兩個功能添加用戶對于一個系統(tǒng)來說,永遠不可能只是存在一個用戶,用戶的添加體現(xiàn)了這個系統(tǒng)的方便靈活性,適合多人來使用。所有設(shè)計了這個功能是理所當(dāng)然的。學(xué)生檔案管理:包括添加檔案菜單,檔案瀏覽菜單。檔案添加正如一個添加用戶一樣。永遠不可能只是存在一個學(xué)生的學(xué)籍信息,學(xué)生畢業(yè)后會有新的學(xué)生進來,自然要添加新的學(xué)生學(xué)籍信息。這個菜單恰好提供這個功能,檔案瀏覽當(dāng)我們將學(xué)生的學(xué)籍信息存放在數(shù)據(jù)庫中,最大的方便就是我們有需要知道學(xué)生的學(xué)籍信息時能夠及時查詢到。因為人的

11、記憶有限,不可能記得住所有學(xué)生的學(xué)籍信息以及相關(guān)的一系列資料,所以就要靠查詢學(xué)籍信息來實現(xiàn)了。這個菜單的功能最大的優(yōu)點就是方便。班級管理單:包括班級瀏覽菜單,班級添加菜單 班級添加菜單 每一年,學(xué)校都會增見新的年級,因此就會有新的班級信息添加。 班級瀏覽菜單可以方便學(xué)校統(tǒng)一瀏覽班級的信息課程管理菜單:包括基本課程設(shè)置,基本課程設(shè)置 可以對課程的信息進行修改增加班級課程設(shè)置 可以選擇班級相應(yīng)的課程。成績管理菜單:包括添加添加成績,修改成就,查詢成績。考試類型設(shè)置不同的功課自然有不同的成績。我們針對這個提前對考試類型做下設(shè)置。方便學(xué)校同學(xué)老師查成績。 成績添加 現(xiàn)今的教育 ,學(xué)生的成績是體現(xiàn)學(xué)生在

12、學(xué)校的表現(xiàn)之一。也可以作為對學(xué)生評價的準則之一。因次添加學(xué)生的成績是比較重要的一個功能。成績?yōu)g覽一個完成的學(xué)生管理系統(tǒng),自然要提供學(xué)生的查詢,方便學(xué)生和老師25 數(shù)據(jù)庫設(shè)計251數(shù)據(jù)庫表的建立系統(tǒng)數(shù)據(jù)庫名稱為studengmis。其中包括allkechengcjclassclasskechengkaoshileixinguserinfoxj第三章 系統(tǒng)實現(xiàn)3.1公共模塊 module1模塊主要三個函數(shù)組成,函數(shù)executesql用于執(zhí)行響應(yīng)的sql命令,函數(shù)connstring用于連接字符串,函數(shù)executeqx用于檢查權(quán)限。代碼如下:public modi as booleanpubli

13、c classmodi as booleanpublic xuefeimodi as booleanpublic txtsql as stringpublic find as booleanpublic classfind as booleanpublic xuefeifind as booleanpublic username as stringpublic qxstr as string執(zhí)行相應(yīng)的sql命令public function executesql(byval sql as string) as adodb.recordset dim mycon as adodb.connect

14、ion dim rst as adodb.recordset set mycon = new adodb.connection mycon.connectionstring = connstring mycon.open dim stokens() as string on error goto exectuesql_error stokens = split(sql) if instr(inser,delete,update, ucase(stokens(0) then mycon.execute sql else set rst = new adodb.recordset rst.open

15、 trim(sql), mycon, adopenkeyset, adlockoptimistic set executesql = rst end ifexectuesql_exit: set rst = nothing set mycon = nothing exit functionexectuesql_error: resume exectuesql_exitend function連接字符串,用戶可以根據(jù)自己的數(shù)據(jù)庫進行修改相應(yīng)參數(shù)public function connstring() as string connstring = provider=sqloledb.1;persi

16、st security info=false;uid=sa;pwd=12345;initial catalog=studentmis;data source=(local)end function檢查用戶的權(quán)限public function executeqx(byval txt as integer) as string dim sql as string dim mycon as adodb.connection dim rst as adodb.recordset set mycon = new adodb.connection mycon.connectionstring = conn

17、string mycon.open set rst = new adodb.recordset sql = select admin from userinfo where username= & username & rst.open trim(sql), mycon, adopenkeyset, adlockoptimistic if rst.eof = true then msgbox 非法用戶!, vbexclamation + vbokonly, 警告 executeqx = nothing exit function end if if rst.fields(0) = y then

18、 executeqx = admin exit function end if rst.close sql = select readonly from userinfo where username= & username & rst.open trim(sql), mycon, adopenkeyset, adlockoptimistic if rst.fields(0) = y then executeqx = readonly exit function end if select case txt case 1 sql = select qx1 from userinfo where

19、 username= & username & case 2 sql = select qx2 from userinfo where username= & username & case 3 sql = select qx3 from userinfo where username= & username & end select on error goto exectuesql_error set rst = new adodb.recordset rst.open trim(sql), mycon, adopenkeyset, adlockoptimistic if rst.field

20、s(0) = y then executeqx = true else executeqx = false end ifexectuesql_exit: set rst = nothing set mycon = nothing exit functionexectuesql_error: resume exectuesql_exitend function32登陸系統(tǒng) 這個模塊主要有確定跟取消組成。確定按紐的主要功能是檢查用戶名和用戶密碼是否正確。以及確定權(quán)限。取消按紐則是退出該功能。代碼如下private sub command1_click() dim mrc as adodb.reco

21、rdset txtsql = select username from userinfo where username= & trim(text1.text) & set mrc = executesql(txtsql) if mrc.eof = true then msgbox 用戶名錯誤!, vbexclamation + vbokonly, 警告 text1.setfocus text1.selstart = 0 text1.sellength = len(text1.text) exit sub end if username = mrc.fields(0) txtsql = sele

22、ct username from userinfo where password= & trim(text2.text) & set mrc = executesql(txtsql) if mrc.eof = true then msgbox 密碼錯誤!, vbexclamation + vbokonly, 警告 text2.setfocus text2.selstart = 0 text2.sellength = len(text2.text) exit sub end if mdiform1.show unload meend subprivate sub command2_click()

23、 unload meend subprivate sub text1_keypress(keyascii as integer) if keyascii = 13 then text2.setfocus end ifend subprivate sub text2_keypress(keyascii as integer) if keyascii = 13 then command1.setfocus end ifend sub33系統(tǒng)管理 這個模塊的功能主要是添加用戶。并且設(shè)置權(quán)限。代碼如下private sub command1_click()if trim(text1(0).text)

24、= then msgbox 用戶名不能為空!, vbexclamation + vbokonly, 警告 text1(0).setfocus exit subend ifif trim(text1(1).text) = then msgbox 密碼不能為空!, vbexclamation + vbokonly, 警告 text1(1).setfocus exit subend ifif trim(text1(2).text) = then msgbox 確認密碼不能為空!, vbexclamation + vbokonly, 警告 text1(2).setfocus exit subend i

25、fif trim(text1(1).text) trim(text1(2).text) then msgbox 確認密碼不正確!, vbexclamation + vbokonly, 警告 text1(2).setfocus exit subend ifdim aa as integeraa = 0if option1(2).value = true then for i = 0 to 3 if check1(i).value = 1 then aa = 1 exit for end ifnext iif aa = 0 then msgbox 普通用戶至少要有一項權(quán)限!, vbexclamat

26、ion + vbokonly, 警告exit subend ifend ifdim mrc as adodb.recordsettxtsql = select * from userinfo where username= & trim(text1(0).text) & set mrc = executesql(txtsql)if mrc.eof = false then msgbox 已存在該用戶!, vbexclamation + vbokonly, 警告 text1(0).setfocus text1(0).selstart = 0 text1(0).sellength = len(te

27、xt1(0).text) exit subend iftxtsql = select * from userinfoset mrc = executesql(txtsql)mrc.addnew mrc.fields(0) = trim(text1(0).text) mrc.fields(1) = trim(text1(1).text)for i = 0 to 2 if option1(i).value = true then select case i case 0 mrc.fields(admin) = y case 1 mrc.fields(readonly) = y case 2 for

28、 j = 0 to 2 if check1(j).value = 1 then select case j case 0 mrc.fields(qx1) = y case 1 mrc.fields(qx2) = y case 2 mrc.fields(qx3) = y end select end if next j end select end if next i mrc.update msgbox 用戶添加成功!, vbexclamation + vbokonly, 警告 text1(0).text = text1(1).text = text1(2).text = end subpriv

29、ate sub command2_click()unload meend subprivate sub form_load()option1(2).value = trueend subprivate sub form_resize()text1(0).setfocusend subprivate sub option1_click(index as integer)if index 2 thenfor i = 0 to 2 check1(i).enabled = falsenext ielsefor i = 0 to 2 check1(i).enabled = truenext iend i

30、fend sub34學(xué)生檔案管理 檔案添加窗體的主要功能是錄入學(xué)生的基本檔案。代碼如下dim txtsql1 as stringprivate sub combo1_click(index as integer) dim mrc as adodb.recordset txtsql1 = select 專業(yè),年制 from class where 班級= & trim(combo1(1).text) & set mrc = executesql(txtsql1) mrc.closeend subprivate sub combo1_keypress(index as integer, keyas

31、cii as integer) if keyascii = 13 then sendkeys tab end ifend subprivate sub command1_click() for j = 0 to 7 if text1(j) = then ss = msgbox(label1(j).caption & 不能為空!, vbexclamation + vbokonly, 警告) text1(j).setfocus text1(j).selstart = 0 text1(j).sellength = len(text1(j).text) exit sub end if next dim

32、 mrc as adodb.recordset txtsql1 = select * from xj where 學(xué)號= & trim(text1(0).text) & set mrc = executesql(txtsql1) if modi = false then if mrc.eof = false then sss = msgbox(已經(jīng)存在該學(xué)號的記錄,學(xué)號不能重復(fù)!, vbexclamation + vbokonly, 警告) text1(0).setfocus text1(0).selstart = 0 text1(0).sellength = len(text1(0).tex

33、t) mrc.close exit sub end if end if if not isdate(text1(2).text) then 判斷是否日期格式 ssss = msgbox(應(yīng)輸入日期 mm-dd-yy, vbinformation + vbokonly, 警告) text1(2).setfocus text1(2).selstart = 0 text1(2).sellength = len(text1(2).text) exit sub end if if not isdate(text1(6).text) then ssss = msgbox(應(yīng)輸入日期 mm-dd-yy, v

34、binformation + vbokonly, 警告) text1(6).setfocus text1(6).selstart = 0 text1(6).sellength = len(text1(6).text) exit sub end if if modi = true then txtsql1 = update xj set 學(xué)號= & trim(text1(0).text) & ,姓名= & trim(text1(1).text) & ,性別= & trim(combo1(0).text) & ,班級= & trim(combo1(1).text) & ,出生年月= & trim(

35、text1(2).text) & ,家庭住址= & trim(text1(3).text) & ,郵政編碼= & trim(text1(4).text) & ,聯(lián)系電話= & trim(text1(5).text) & ,入學(xué)時間= & trim(text1(6).text) & ,備注= & trim(text1(7).text) & where 學(xué)號= & trim(form3.msf1.textmatrix(form3.msf1.row, 1) & set mrc = executesql(txtsql1) txtsql1 = update cj set 學(xué)號= & trim(text1

36、(0).text) & where 學(xué)號= & trim(form3.msf1.textmatrix(form3.msf1.row, 1) & set mrc = executesql(txtsql1) txtsql1 = update jf set 學(xué)號= & trim(text1(0).text) & where 學(xué)號= & trim(form3.msf1.textmatrix(form3.msf1.row, 1) & set mrc = executesql(txtsql1) unload me exit sub end if txtsql1 = select * from xj set

37、 mrc = executesql(txtsql1) mrc.addnew for i = 4 to 9 mrc.fields(i) = text1(i - 2).text next i mrc.fields(0) = trim(text1(0).text) mrc.fields(1) = trim(text1(1).text) mrc.fields(2) = trim(combo1(0).text) mrc.fields(3) = trim(combo1(1).text) mrc.update set mrc = nothing for j = 0 to 7 text1(j) = nexte

38、nd subprivate sub command2_click() unload meend subprivate sub form_activate() text1(0).setfocus form1.load1end subpublic sub load1() dim mrc as adodb.recordset txtsql1 = select distinct 班級 from class order by 班級 set mrc = executesql(txtsql1) if mrc.eof then ddd = msgbox(請先設(shè)置班級部署!, 警告) mrc.close exi

39、t sub end if combo1(1).clear mrc.movefirst do while not mrc.eof combo1(1).additem mrc.fields(0) mrc.movenext loop combo1(1).listindex = 0 combo1(0).listindex = 0 if modi then 如果是修改狀態(tài) me.caption = 修改 txtsql1 = select * from xj where 學(xué)號= & trim(form3.msf1.textmatrix(form3.msf1.row, 1) & set mrc = exec

40、utesql(txtsql1) mrc.movefirst for i = 4 to 9 text1(i - 2).text = mrc.fields(i) next i text1(0).text = mrc.fields(0) text1(1).text = mrc.fields(1) combo1(0).text = mrc.fields(2) combo1(1).text = mrc.fields(3) mrc.close else me.caption = 登記 for i = 2 to 7 text1(i).text = next i text1(6).text = date te

41、xt1(0).text = text1(1).text = end ifend subprivate sub text1_gotfocus(index as integer) if index = 6 then text1(6).selstart = 0 text1(6).sellength = len(text1(6).text) end ifend subprivate sub text1_keypress(index as integer, keyascii as integer) if keyascii = 13 then sendkeys tab end ifend sub檔案瀏覽窗

42、體的功能是能夠查詢學(xué)生的基本信息。代碼如下public printstr as stringprivate declare function setwindowpos lib user32 (byval hwnd as long, byval hwndinsertafter as long, byval x as long, byval y as long, byval cx as long, byval cy as long, byval wflags as long) as longpublic sub showtitle() msf1.clear dim i as integer wit

43、h msf1 .cols = 14 .textmatrix(0, 1) = 學(xué)號 .textmatrix(0, 2) = 姓名 .textmatrix(0, 3) = 性別 .textmatrix(0, 4) = 年級 .textmatrix(0, 5) = 班級 .textmatrix(0, 6) = 專業(yè) .textmatrix(0, 7) = 年制 .textmatrix(0, 8) = 出生年月 .textmatrix(0, 9) = 家庭住址 .textmatrix(0, 10) = 郵政編碼 .textmatrix(0, 11) = 聯(lián)系電話 .textmatrix(0, 12)

44、= 入學(xué)時間 .textmatrix(0, 13) = 備注 .colwidth(0) = 200 .colwidth(1) = 500 .colwidth(2) = 700 .colwidth(3) = 500 .colwidth(4) = 1000 .colwidth(5) = 800 .colwidth(6) = 700 .colwidth(7) = 800 .colwidth(8) = 800 .colwidth(9) = 3000 .colwidth(10) = 800 .colwidth(11) = 1000 .colwidth(12) = 800 .colwidth(13) =

45、6000 .fixedrows = 1 for i = 1 to 13 .colalignment(i) = 0 next i .fillstyle = flexfillsingle .col = 0 .row = 0 .rowsel = 1 .colsel = .cols - 1 .cellalignment = 4 .row = 1 end withend subprivate sub form_activate()if find = true thenform4.zorderend ifif find = true then exit subelseif modi = true then

46、showdata treeview1_dblclick modi = falseelse treeend ifend subpublic sub showdata()dim j as integerdim i as integerdim mrc as adodb.recordsetset mrc = new adodb.recordset set mrc = executesql(txtsql) if mrc.eof = false then mrc.movefirst with msf1 .rows = 50 .row = 1 do while not mrc.eof .rows = .ro

47、ws + 1 for i = 1 to mrc.fields.count .textmatrix(.row, i) = mrc.fields(i - 1) next i .row = .row + 1 mrc.movenext loop end with else if find = true then form3.hide form4.show zzz = msgbox(對不起,沒有此學(xué)生的檔案記錄!, vbokonly, 查詢) form4.zorder (0) form4.text1(0).setfocus end if end if set mrc = nothingend subprivate sub form_unload(cancel as integer)if find = true then find = false form4.text1(0).setfocusend ifend subpublic sub tree()treeview1.nodes.cleardim nodex as nodedim mrc as adodb.recordsetdim

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

最新文檔

評論

0/150

提交評論