




版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、 經濟管理學院 程序設計訓練a(二)課程設計課程設計題目: 高等院校科研管理信息系統 專 業 班 級: 信管101班 學 生 姓 名: 張沛梅 學 號: 100201138 指 導 教 師: 李慶恒 王玉恒 陳軍霞 董紹輝 2013年 1 月 18 日1. 系統描述1.1背景某高等學校擬建立一套科研管理信息系統,實現對科研工作的信息化管理,要求系統對數據的存儲完整,查詢迅速,操作方便。教職員工分屬于各個學院下的系或行政機關,在學院的教職員工分屬于不同的系,在行政機關的教職員工分屬于不同的部門如教務處,人事處,財務處等。各級單位均有單位名稱,單位地址,電話等屬性。教職員工基本信息包括姓名,性別,
2、出生年月,政治面貌,籍貫,畢業院校,所學專業,學歷,學位,研究方向,聯系電話等信息;教職員工的科研工作主要包括撰寫論文,著作和承擔課題的研究,發明創造等工作,其研究成果主要包括論文,著作,課題,專利四大類。撰寫的論文信息包括論文名稱,所有作者姓名,出版刊物名稱,刊號,時間,刊物級別(核心期刊,一般期刊,報紙雜志,會議論文),是否被三大索引收錄等信息。著作主要包括書名,出版社,出版時間,著作類別(專著、編著、教材、譯著),字數,作者姓名及其分工等。課題包括三個環節,立項,鑒定,獲獎。課題基本情況包括課題名稱,編號,承擔單位,合作單位,課題立項情況包括課題來源分為縱向(國家,省部,廳局,一般)橫向
3、(其他單位),課題性質(自然科學,軟科學,社會科學等),還包括立項時間,完成時間,課題成員,經費等;鑒定包括鑒定時間,鑒定級別(國家,省部,廳局,一般),人員,成果等級(國際先進,國際領先,國內先進,國內領先)等;獲獎包括獲獎時間,級別(國家,省部,廳局),等級(一等獎,二等獎,三等獎),人員等。專利包括專利號,名稱,專利類型(發明,實用新型,外觀設計等),授予時間,人員等。每位教職員工會參與多項課題,論文,著作和專利。每項科研也會有多人參加。教職員工的科研工作成果評價和他參與科研的數量和質量都有關系。根據科研參與人數的不同和該教職員工的排名不同,他可以獲得相應的科研分數,所以科研的總體信息和
4、各人的對應信息必須完整。最終提供的數據模式可以使用戶按照不同年份,人員,單位等各種口徑進行查詢及統計工作,要求信息完整,設計規范。1.2目的和意義目的是使教職員工科研管理工作更加的簡捷,管理更加先進。其意義是通過系統開發使學生更深入的理解相關編程知識,同時開發出有實際作用的系統,用實踐帶動學習積極性。2. 程序功能介紹程序從登陸窗口進入,根據角色不同進入的主頁不同。當是用戶登錄時,進入到個人科研信息系統頁面,在這個頁面教職員工可以實現以下功能:(1) 查看個人的詳細信息;(2) 修改個人的密碼;(3) 可以進行參加論文,著作,課題,專利信息的錄入;(4) 可以查詢個人參加不同科研項目的基本信息
5、與得分。當是管理員登錄時,進入到管理員的主頁,可以實現以下功能: (1)可以查看管理員自己的詳細信息; (2)修改個人密碼; (3)可以查看全部教職員工的登錄密碼; (4)可以查看參加不同科研項目的詳細情況,進行錄入,刪除,更新科研信息的操作; (5)可以按時間段對不同項目進行時間檢索,查看某個時間段某個項目的具體信息; (6)對科研項目的評分規則進行修改。3. 系統實現3.1開發環境軟硬件本系統適用于微型機,內存容量2g,應配備的外部設備有鼠標、鍵盤、顯示器、主機等. 軟件環境microsoft visual studio 2010和sql server 2005.本系統的設計采用的是asp
6、.net語言,在windows 7操作系統下microsoft visual studio 2010和sql server 2005軟件環境下使用。3.2程序調試情況1、調試登陸窗口遇到的問題在寫登陸按鈕的單擊事件代碼是出現了錯誤,此登陸功能是:如果輸入的職工號是管理員,就倒轉到管理員的界面,如果輸入職工號是用戶,就跳轉到用戶界面。因為沒有寫對代碼,導致沒有跳轉正確。解決方案: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.調試按時間檢索參加各項項目的具體情況出現的問題如上圖,我以論文時間檢索為例,時間檢索論文的詳細情況,需要調用數據庫的存儲過程。但是起初沒有調用,導致檢索不出結果。解決方案: 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.調試評分規則管理時出現的問題如上圖,以著作評分規則修改為例,要修改評分規則需要查詢出數據庫中原始的評分,但是在查詢單擊事件的代碼沒有寫對,執行了很多次都沒有成功。解決方案: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(數y據y庫a操作失敗 + oe); finally if (mycon != null) mycon.close(); 3.3 結論本系統是高等院校教職員工科研管理信息系統,能夠簡單的處理個人科研信息,界面清晰,易于理解,操作簡單方便。用戶可以進入用戶界面查詢個人參加項目的情況,修改密碼,可以進行科研申報。管理員通過進入管理界面查詢各個項目的具體情況,可以對參加項目的人員或其他信息進行更新,刪除等工作,管理參加人員。管理員還可以根據需要更改各項目的評分規則。但是還存在一些問題,不能做到按折線圖或餅
12、圖的形式輸出,也不能按報表的形式輸出。完善方案如下:(1)應該做到用折線圖或餅圖輸出各項目的情況; (2)應該做到各個工能靈活使用。 4. 結束語通過做本次課程設計,我有很大的感受,也學到了很多的東西。首先,我明白了自身所處的位置,我掌握的知識還很有限,在課程設計過程遇到很多問題,常常需要花很多時間去解決一個問題,這是因為沒有充分掌握相關知識,這就需要我在課下多學習。如果畢業后想從事這方面的工作,課余時間還應該多看看有關的知識。另外,還應該在課余多做一些類似的系統,多接觸這種做系統的練習,讓自己對數據庫和編程這方面做到熟練,總結出經驗,以便于在以后做系統時能處理好,出現類似的錯誤能盡快的解決。
13、 其次,我明白了自己在做界面和編寫代碼時還是做得不夠好,還是經常出現錯誤,在編程方面的能力也還是十分有限的,不能靈活掌握課本的知識。自己有不明白的問題時,應該盡快的詢問老師或者參考其他資料。自己編寫代碼時考慮問題還欠缺全面性,不能做到令人很滿意。最后,我明白了開發一個系統不是一朝一夕的事情,雖然三個星期的時間不算太長,但是也有很多其他的同學做的很好。經過這次訓練,自己要加油,下次能做得更好。 附錄:源代碼清單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(請?輸?入?用?戶名?和密碼?!?!?!?); 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、(數y據y庫a內容y修t改?成功|!?!?!?) ); else if (result != null) result.close(); response.write(if(confirm(此?原-始?密碼?與?數y據y庫a中d的?不?符?!?!?!?請?重?新?輸?入?!?!?)window.navigate(glymima1.aspx); ); catch (exception oe) response.write(數y據y庫a操作失敗 + oe); finally if (mycon != null) mycon.close(); /try 結束? 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) /定義要使用的對象 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(數據庫內容修改成功!) ); /response.write(if(confirm(數據庫內容修改成功)window.navigat
33、e(liuyidefault.aspx); ); catch (exception oe) response.write(數據庫操作失敗 + 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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
- 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024年項目管理專業人士資格認證內容試題及答案
- 2025年燃氣安全生產管理人員模擬考試題及答案
- 植物園綠色建筑設計與節能環保考核試卷
- 2024年項目管理考試真題解析試題及答案
- 園藝師多功能果園管理試題及答案
- 2023年中國聯通博爾塔拉蒙古自治州分公司招聘筆試參考題庫附帶答案詳解
- 2023年中國石化高校畢業生專項招聘筆試參考題庫附帶答案詳解
- 煙草機械設備的遠程監控與故障分析考核試卷
- 地鐵檢修庫維修施工方案
- 紙板容器市場前景預測考核試卷
- DB62∕T 25-3111-2016 建筑基坑工程技術規程
- 大班音樂《水果百變秀》課件
- 婦幼保健院醫療保健服務轉介工作制度和流程
- 國家職業技能鑒定考評員考試題庫1100題【含答案】
- 監察機關執法工作規定學習測試
- 產品鑒定試驗大綱
- 2022職業病防治法宣傳周PPT
- 常州市武進區征地拆遷房屋裝修及附屬設施補償標準
- 民辦教師人員花名冊
- 國家開放大學《管理英語4》章節測試參考答案
- 公路工程決算編制辦法(交公路發2004-507號)附表
評論
0/150
提交評論