程序設(shè)計(jì)訓(xùn)練課程設(shè)計(jì)_第1頁
程序設(shè)計(jì)訓(xùn)練課程設(shè)計(jì)_第2頁
程序設(shè)計(jì)訓(xùn)練課程設(shè)計(jì)_第3頁
程序設(shè)計(jì)訓(xùn)練課程設(shè)計(jì)_第4頁
程序設(shè)計(jì)訓(xùn)練課程設(shè)計(jì)_第5頁
已閱讀5頁,還剩25頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡(jiǎn)介

1、 經(jīng)濟(jì)管理學(xué)院 程序設(shè)計(jì)訓(xùn)練a(二)課程設(shè)計(jì)課程設(shè)計(jì)題目: 高等院??蒲泄芾硇畔⑾到y(tǒng) 專 業(yè) 班 級(jí): 信管101班 學(xué) 生 姓 名: 張沛梅 學(xué) 號(hào): 100201138 指 導(dǎo) 教 師: 李慶恒 王玉恒 陳軍霞 董紹輝 2013年 1 月 18 日1. 系統(tǒng)描述1.1背景某高等學(xué)校擬建立一套科研管理信息系統(tǒng),實(shí)現(xiàn)對(duì)科研工作的信息化管理,要求系統(tǒng)對(duì)數(shù)據(jù)的存儲(chǔ)完整,查詢迅速,操作方便。教職員工分屬于各個(gè)學(xué)院下的系或行政機(jī)關(guān),在學(xué)院的教職員工分屬于不同的系,在行政機(jī)關(guān)的教職員工分屬于不同的部門如教務(wù)處,人事處,財(cái)務(wù)處等。各級(jí)單位均有單位名稱,單位地址,電話等屬性。教職員工基本信息包括姓名,性別,

2、出生年月,政治面貌,籍貫,畢業(yè)院校,所學(xué)專業(yè),學(xué)歷,學(xué)位,研究方向,聯(lián)系電話等信息;教職員工的科研工作主要包括撰寫論文,著作和承擔(dān)課題的研究,發(fā)明創(chuàng)造等工作,其研究成果主要包括論文,著作,課題,專利四大類。撰寫的論文信息包括論文名稱,所有作者姓名,出版刊物名稱,刊號(hào),時(shí)間,刊物級(jí)別(核心期刊,一般期刊,報(bào)紙雜志,會(huì)議論文),是否被三大索引收錄等信息。著作主要包括書名,出版社,出版時(shí)間,著作類別(專著、編著、教材、譯著),字?jǐn)?shù),作者姓名及其分工等。課題包括三個(gè)環(huán)節(jié),立項(xiàng),鑒定,獲獎(jiǎng)。課題基本情況包括課題名稱,編號(hào),承擔(dān)單位,合作單位,課題立項(xiàng)情況包括課題來源分為縱向(國家,省部,廳局,一般)橫向

3、(其他單位),課題性質(zhì)(自然科學(xué),軟科學(xué),社會(huì)科學(xué)等),還包括立項(xiàng)時(shí)間,完成時(shí)間,課題成員,經(jīng)費(fèi)等;鑒定包括鑒定時(shí)間,鑒定級(jí)別(國家,省部,廳局,一般),人員,成果等級(jí)(國際先進(jìn),國際領(lǐng)先,國內(nèi)先進(jìn),國內(nèi)領(lǐng)先)等;獲獎(jiǎng)包括獲獎(jiǎng)時(shí)間,級(jí)別(國家,省部,廳局),等級(jí)(一等獎(jiǎng),二等獎(jiǎng),三等獎(jiǎng)),人員等。專利包括專利號(hào),名稱,專利類型(發(fā)明,實(shí)用新型,外觀設(shè)計(jì)等),授予時(shí)間,人員等。每位教職員工會(huì)參與多項(xiàng)課題,論文,著作和專利。每項(xiàng)科研也會(huì)有多人參加。教職員工的科研工作成果評(píng)價(jià)和他參與科研的數(shù)量和質(zhì)量都有關(guān)系。根據(jù)科研參與人數(shù)的不同和該教職員工的排名不同,他可以獲得相應(yīng)的科研分?jǐn)?shù),所以科研的總體信息和

4、各人的對(duì)應(yīng)信息必須完整。最終提供的數(shù)據(jù)模式可以使用戶按照不同年份,人員,單位等各種口徑進(jìn)行查詢及統(tǒng)計(jì)工作,要求信息完整,設(shè)計(jì)規(guī)范。1.2目的和意義目的是使教職員工科研管理工作更加的簡(jiǎn)捷,管理更加先進(jìn)。其意義是通過系統(tǒng)開發(fā)使學(xué)生更深入的理解相關(guān)編程知識(shí),同時(shí)開發(fā)出有實(shí)際作用的系統(tǒng),用實(shí)踐帶動(dòng)學(xué)習(xí)積極性。2. 程序功能介紹程序從登陸窗口進(jìn)入,根據(jù)角色不同進(jìn)入的主頁不同。當(dāng)是用戶登錄時(shí),進(jìn)入到個(gè)人科研信息系統(tǒng)頁面,在這個(gè)頁面教職員工可以實(shí)現(xiàn)以下功能:(1) 查看個(gè)人的詳細(xì)信息;(2) 修改個(gè)人的密碼;(3) 可以進(jìn)行參加論文,著作,課題,專利信息的錄入;(4) 可以查詢個(gè)人參加不同科研項(xiàng)目的基本信息

5、與得分。當(dāng)是管理員登錄時(shí),進(jìn)入到管理員的主頁,可以實(shí)現(xiàn)以下功能: (1)可以查看管理員自己的詳細(xì)信息; (2)修改個(gè)人密碼; (3)可以查看全部教職員工的登錄密碼; (4)可以查看參加不同科研項(xiàng)目的詳細(xì)情況,進(jìn)行錄入,刪除,更新科研信息的操作; (5)可以按時(shí)間段對(duì)不同項(xiàng)目進(jìn)行時(shí)間檢索,查看某個(gè)時(shí)間段某個(gè)項(xiàng)目的具體信息; (6)對(duì)科研項(xiàng)目的評(píng)分規(guī)則進(jìn)行修改。3. 系統(tǒng)實(shí)現(xiàn)3.1開發(fā)環(huán)境軟硬件本系統(tǒng)適用于微型機(jī),內(nèi)存容量2g,應(yīng)配備的外部設(shè)備有鼠標(biāo)、鍵盤、顯示器、主機(jī)等. 軟件環(huán)境microsoft visual studio 2010和sql server 2005.本系統(tǒng)的設(shè)計(jì)采用的是asp

6、.net語言,在windows 7操作系統(tǒng)下microsoft visual studio 2010和sql server 2005軟件環(huán)境下使用。3.2程序調(diào)試情況1、調(diào)試登陸窗口遇到的問題在寫登陸按鈕的單擊事件代碼是出現(xiàn)了錯(cuò)誤,此登陸功能是:如果輸入的職工號(hào)是管理員,就倒轉(zhuǎn)到管理員的界面,如果輸入職工號(hào)是用戶,就跳轉(zhuǎn)到用戶界面。因?yàn)闆]有寫對(duì)代碼,導(dǎo)致沒有跳轉(zhuǎn)正確。解決方案:if(eid1!=null) & (paw1!=null) &(js1=管理員) sessioncurrentvalue = user.text; response.redirect(liuyidefault2.aspx

7、); if(eid1!=null) & (paw1!=null) &(js1=用?戶) sessioncurrentvalue = user.text; response.redirect(liuyidefault.aspx); 2.調(diào)試按時(shí)間檢索參加各項(xiàng)項(xiàng)目的具體情況出現(xiàn)的問題如上圖,我以論文時(shí)間檢索為例,時(shí)間檢索論文的詳細(xì)情況,需要調(diào)用數(shù)據(jù)庫的存儲(chǔ)過程。但是起初沒有調(diào)用,導(dǎo)致檢索不出結(jié)果。解決方案: mycommand.commandtext = time_select_eplw; sqlparameter parinput = mycommand.parameters.add(time1

8、, sqldbtype.datetime); parinput.direction = parameterdirection.input; parinput.value = convert.todatetime(dropdownlist1.text + / + dropdownlist2.text + / + dropdownlist3.text); sqlparameter parinput2 = mycommand.parameters.add(time2, sqldbtype.datetime); parinput2.direction = parameterdirection.inpu

9、t; parinput2.value = convert.todatetime(dropdownlist4.text + / + dropdownlist5.text + / + dropdownlist6.text);3.調(diào)試評(píng)分規(guī)則管理時(shí)出現(xiàn)的問題如上圖,以著作評(píng)分規(guī)則修改為例,要修改評(píng)分規(guī)則需要查詢出數(shù)據(jù)庫中原始的評(píng)分,但是在查詢單擊事件的代碼沒有寫對(duì),執(zhí)行了很多次都沒有成功。解決方案:sqlconnection mycon = null; sqlcommand mycom = null; try string myconstr = data source=s-pc;initial ca

10、talog=kyglsystem;user id=sa;password=sa; mycon = new sqlconnection(myconstr); mycon.open(); string sql = select zzgrade from zz_sum where zzlx=+dropdownlistzzjb.text+; mycom = new sqlcommand(sql ,mycon); sqldatareader result = mycom.executereader(); if (result.read() textboxzzfz.text = resultzzgrade

11、.tostring(); catch (exception oe) response.write(數(shù)y據(jù)y庫a操作失敗 + oe); finally if (mycon != null) mycon.close(); 3.3 結(jié)論本系統(tǒng)是高等院校教職員工科研管理信息系統(tǒng),能夠簡(jiǎn)單的處理個(gè)人科研信息,界面清晰,易于理解,操作簡(jiǎn)單方便。用戶可以進(jìn)入用戶界面查詢個(gè)人參加項(xiàng)目的情況,修改密碼,可以進(jìn)行科研申報(bào)。管理員通過進(jìn)入管理界面查詢各個(gè)項(xiàng)目的具體情況,可以對(duì)參加項(xiàng)目的人員或其他信息進(jìn)行更新,刪除等工作,管理參加人員。管理員還可以根據(jù)需要更改各項(xiàng)目的評(píng)分規(guī)則。但是還存在一些問題,不能做到按折線圖或餅

12、圖的形式輸出,也不能按報(bào)表的形式輸出。完善方案如下:(1)應(yīng)該做到用折線圖或餅圖輸出各項(xiàng)目的情況; (2)應(yīng)該做到各個(gè)工能靈活使用。 4. 結(jié)束語通過做本次課程設(shè)計(jì),我有很大的感受,也學(xué)到了很多的東西。首先,我明白了自身所處的位置,我掌握的知識(shí)還很有限,在課程設(shè)計(jì)過程遇到很多問題,常常需要花很多時(shí)間去解決一個(gè)問題,這是因?yàn)闆]有充分掌握相關(guān)知識(shí),這就需要我在課下多學(xué)習(xí)。如果畢業(yè)后想從事這方面的工作,課余時(shí)間還應(yīng)該多看看有關(guān)的知識(shí)。另外,還應(yīng)該在課余多做一些類似的系統(tǒng),多接觸這種做系統(tǒng)的練習(xí),讓自己對(duì)數(shù)據(jù)庫和編程這方面做到熟練,總結(jié)出經(jīng)驗(yàn),以便于在以后做系統(tǒng)時(shí)能處理好,出現(xiàn)類似的錯(cuò)誤能盡快的解決。

13、 其次,我明白了自己在做界面和編寫代碼時(shí)還是做得不夠好,還是經(jīng)常出現(xiàn)錯(cuò)誤,在編程方面的能力也還是十分有限的,不能靈活掌握課本的知識(shí)。自己有不明白的問題時(shí),應(yīng)該盡快的詢問老師或者參考其他資料。自己編寫代碼時(shí)考慮問題還欠缺全面性,不能做到令人很滿意。最后,我明白了開發(fā)一個(gè)系統(tǒng)不是一朝一夕的事情,雖然三個(gè)星期的時(shí)間不算太長(zhǎng),但是也有很多其他的同學(xué)做的很好。經(jīng)過這次訓(xùn)練,自己要加油,下次能做得更好。 附錄:源代碼清單1. 登陸頁面using system;using system.data;using system.configuration;using system.collections;usin

14、g system.web;using system.web.security;using system.web.ui;using system.web.ui.webcontrols;using system.web.ui.webcontrols.webparts;using system.web.ui.htmlcontrols;using system.data.sqlclient;public partial class dl : system.web.ui.page protected void buttsure_click(object sender, eventargs e) stri

15、ng eid1 = null; string paw1 = null; string js1 = null; string sqlconn = data source=s-pc;initial catalog=kyglsystem;user id=sa;password=sa; sqlconnection myconnection = new sqlconnection(sqlconn); myconnection.open(); string sqlsel=select eid,paw,js from dl where eid=+user.text+and paw=+paw.text+; s

16、qlcommand mycommand = new sqlcommand(sqlsel,myconnection); sqldatareader result = mycommand.executereader(); if(result.read() eid1 = resulteid.tostring(); paw1 = resultpaw.tostring(); js1= resultjs.tostring(); if(user.text=null)&(paw.text=null)response.write(請(qǐng)?輸?入?用?戶名?和密碼?!?!?!?); if(eid1!=user.tex

17、t) &(paw1!=paw.text) response.write(if(confirm(用?戶名?或密碼?不?正y確!?!?!?)window.navigate(dl.aspx); ); if(eid1!=null) & (paw1!=null) &(js1=管理員) sessioncurrentvalue = user.text; response.redirect(liuyidefault2.aspx); if(eid1!=null) & (paw1!=null) &(js1=用?戶) sessioncurrentvalue = user.text; response.redirec

18、t(liuyidefault.aspx); myconnection.close(); protected void buttoncz_click(object sender, eventargs e) user.text = ; paw.text = ; 2. 管理員界面2.1 管理員人員基本信息using system;using system.data;using system.configuration;using system.collections;using system.web;using system.web.security;using system.web.ui;usin

19、g system.web.ui.webcontrols;using system.web.ui.webcontrols.webparts;using system.web.ui.htmlcontrols;using system.data.sqlclient;public partial class glyjbxinix : system.web.ui.page protected void page_load(object sender, eventargs e) string sqlconn = data source=s-pc;initial catalog=kyglsystem;use

20、r id=sa;password=sa; sqlconnection myconnection = new sqlconnection(sqlconn); myconnection.open(); sqlcommand mycommand = new sqlcommand(select employee.*,section.sname,department.dname from employee,section,department where employee.eid= + sessioncurrentvalue + and section.sid= employee.sid and dep

21、artment.did=section.did, myconnection); sqldatareader myreader; myreader = mycommand.executereader(); if (myreader.read() label4.text = myreadereid.tostring(); label2.text = myreaderename.tostring(); label6.text = myreaderesex.tostring(); label14.text = myreadersname.tostring(); label8.text = myread

22、erebri.tostring(); label20.text = myreaderesxzy.tostring(); label10.text = myreaderemm.tostring(); label12.text = myreaderejg.tostring(); label18.text = myreaderebyxy.tostring(); label16.text = myreaderdname.tostring(); label22.text = myreaderexw.tostring(); label24.text = myreaderexl.tostring(); la

23、bel26.text = myreadereyjfx.tostring(); label28.text = myreaderetel.tostring(); myreader.close(); myconnection.close(); 2.2管理員密碼修改using system;using system.data;using system.configuration;using system.collections;using system.web;using system.web.security;using system.web.ui;using system.web.ui.webco

24、ntrols;using system.web.ui.webcontrols.webparts;using system.web.ui.htmlcontrols;using system.data.sqlclient;public partial class glymima1 : system.web.ui.page protected void page_load(object sender, eventargs e) protected void button1_click(object sender, eventargs e) sqlconnection mycon = null; sq

25、lcommand mycom = null; sqldatareader result=null; sqlcommand comm=null; string paw1=null; try string myconstr = data source=s-pc;initial catalog=kyglsystem;user id=sa;password=sa; mycon = new sqlconnection(myconstr); mycon.open(); mycom = new sqlcommand(); mycom.connection = mycon; string oldmm = ys

26、mm.text.trim(); string newmm = xmm.text.trim(); string sqlsel=select paw from dl where eid=+sessioncurrentvalue+; comm = new sqlcommand(sqlsel,mycon); result = comm.executereader(); if(result.read() paw1 = resultpaw.tostring(); if (paw1 = ysmm.text) if (result != null) result.close(); /string strupd

27、ate = update stu set stuname=李?芳?,xydm=02,zydm=0201 where stunum=091001; string strupdate = update dl set paw=0 where eid=1; string sql = string.format(strupdate, newmm, sessioncurrentvalue); mycom.commandtype = commandtype.text; mycom.commandtext = sql; mycom.executenonquery(); response.write(alert

28、(數(shù)y據(jù)y庫a內(nèi)容y修t改?成功|!?!?!?) ); else if (result != null) result.close(); response.write(if(confirm(此?原-始?密碼?與?數(shù)y據(jù)y庫a中d的?不?符?!?!?!?請(qǐng)?重?新?輸?入?!?!?)window.navigate(glymima1.aspx); ); catch (exception oe) response.write(數(shù)y據(jù)y庫a操作失敗 + oe); finally if (mycon != null) mycon.close(); /try 結(jié)束? protected void butt

29、on2_click(object sender, eventargs e) response.redirect(liuyidefault2.aspx); 3. 用戶密碼修改代碼(同管理員密碼修改的代碼)using system;using system.data;using system.configuration;using system.collections;using system.web;using system.web.security;using system.web.ui;using system.web.ui.webcontrols;using system.web.ui.w

30、ebcontrols.webparts;using system.web.ui.htmlcontrols;using system.data.sqlclient;public partial class mima : system.web.ui.page protected void qd_click(object sender, eventargs e) /定義要使用的對(duì)象 sqlconnection mycon = null; sqlcommand mycom = null; try string myconstr = data source=s-pc;initial catalog=ky

31、glsystem;user id=sa;password=sa; mycon = new sqlconnection(myconstr); mycon.open(); mycom = new sqlcommand(); mycom.connection = mycon; string oldmm = ysmm.text.trim(); string newmm = xmm.text.trim(); /eid1 = e000000022; /string strupdate = update stu set stuname=李芳,xydm=02,zydm=0201 where stunum=09

32、1001; string strupdate = update dl set paw=0 where eid=1; string sql = string.format(strupdate, newmm, sessioncurrentvalue); mycom.commandtype = commandtype.text; mycom.commandtext = sql; mycom.executenonquery(); response.write(alert(數(shù)據(jù)庫內(nèi)容修改成功!) ); /response.write(if(confirm(數(shù)據(jù)庫內(nèi)容修改成功)window.navigat

33、e(liuyidefault.aspx); ); catch (exception oe) response.write(數(shù)據(jù)庫操作失敗 + oe); finally if (mycon != null) mycon.close(); protected void page_load(object sender, eventargs e) protected void qx_click(object sender, eventargs e) requiredfieldvalidator1.visible = false; requiredfieldvalidator2.visible = fa

34、lse; requiredfieldvalidator3.visible = false; comparevalidator1.visible = false; xmm.text = ; zsr.text = ; ysmm.text = ; response.redirect(liuyidefault.aspx); 4.論文信息錄入代碼using system;using system.collections.generic;using system.web;using system.web.ui;using system.web.ui.webcontrols;using system.dat

35、a.sqlclient;using system.data;public partial class lwsb : system.web.ui.page protected void page_load(object sender, eventargs e) for (int i = 2000; i 2014; i+) this.dropdownlist2.items.add(i.tostring(); for (int i = 1; i 13; i+) this.dropdownlist3.items.add(i.tostring(); for (int i = 1; i = 31; i+)

36、 this.dropdownlist4.items.add(i.tostring(); this.label2.visible = false; this.textbox8.visible = false; this.label7.visible = false; this.textbox13.visible = false; this.label3.visible = false; this.textbox9.visible = false; this.label8.visible = false; this.textbox14.visible = false; this.label4.vi

37、sible = false; this.textbox10.visible = false; this.label9.visible = false; this.textbox15.visible = false; this.label5.visible = false; this.textbox11.visible = false; this.label10.visible = false; this.textbox16.visible = false; protected void dropdownlist1_selectedindexchanged(object sender, even

38、targs e) if (dropdownlist1.selectedindex = 1) dfh1.text = lw_ l1; if (dropdownlist1.selectedindex = 2) dfh1.text = lw_l4; if (dropdownlist1.selectedindex = 3) dfh1.text = lw_l2; if (dropdownlist1.selectedindex = 0) dfh1.text = lw_l3; protected void button2_click(object sender, eventargs e) string cb

39、sj = dropdownlist2.text + / + dropdownlist3.text + / + dropdownlist4.text; string sqlconn = data source=s-pc;initial catalog=kyglsystem;user id=sa;password=sa; sqlconnection conn = new sqlconnection(sqlconn); conn.open(); /sqlcommand comm0 = new sqlcommand(select * from kylw where lwbh= + lwbh.text.

40、trim() + ,conn); /int j = comm0.executenonquery(); /if (j = 0) / string sfsl; if (radiobutton1.checked) sfsl = 是; else sfsl = 否; string strsql = insert into lw(lwid,lwname,lwpublic,lwlx,rank,kan_no,lwtime,lwrecord)values(0,1,2,3,4,5,6,7); string str = string.format(strsql, textbox1.text.trim(), text

41、box2.text.trim(), textbox4.text.trim(), dropdownlist1.text,dfh1.text.trim(), textbox5.text.trim(), cbsj, sfsl); sqlcommand comm1 = new sqlcommand(str, conn); int n = convert.toint32(textbox6.text.trim(); string zzbh = new stringn - 1; string fgh = new stringn - 1; switch (n) case 1: zzbh = new strin

42、g1 textbox7.text.trim() ; fgh = new string1 textbox12.text.trim() ; break; case 2: zzbh = new string2 textbox7.text.trim(), textbox8.text.trim() ; fgh = new string2 textbox12.text.trim(), textbox13.text.trim() ; break; case 3: zzbh = new string3 textbox7.text.trim(), textbox8.text.trim(), textbox9.t

43、ext.trim() ; fgh = new string3 textbox12.text.trim(), textbox13.text.trim(), textbox14.text.trim() ; break; case 4: zzbh = new string4 textbox7.text.trim(), textbox8.text.trim(), textbox9.text.trim(), textbox10.text.trim() ; fgh = new string4 textbox12.text.trim(), textbox13.text.trim(), textbox14.text.trim(), textbox15.text.trim() ; break; case 5: zzbh = new string5 textbox7.text.trim(), textbox8.text.trim(), textbox9.text.trim(), textbox10.text.trim(), textbox11.text.trim() ; fgh = new string5 textbox12.text.trim(), textbox13.text.trim(), textbox14

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(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)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論