




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、摘 要目前大多數(shù)院校對(duì)學(xué)生“職業(yè)生涯規(guī)劃”仍停留在學(xué)生在紙上寫計(jì)劃、教師在班會(huì)課、講座中對(duì)典型案例進(jìn)行指導(dǎo),指導(dǎo)效率較低、管理監(jiān)督起來并不容易,并且學(xué)生的規(guī)劃不能實(shí)時(shí)動(dòng)態(tài)進(jìn)行。而基于網(wǎng)絡(luò)的動(dòng)態(tài)管理系統(tǒng),可以讓學(xué)生隨時(shí)隨地查看自己的規(guī)劃,進(jìn)行自檢和修改完善,教師也可以進(jìn)行網(wǎng)上指導(dǎo),對(duì)某個(gè)學(xué)生進(jìn)行一對(duì)一、或一對(duì)多地指導(dǎo),將建議填寫在學(xué)生規(guī)劃中。本文完整論述了研究及架構(gòu)“基于WEB的學(xué)生職業(yè)動(dòng)態(tài)規(guī)劃系統(tǒng)”的過程,對(duì)學(xué)生職業(yè)生涯動(dòng)態(tài)規(guī)劃的必要性進(jìn)行觀點(diǎn)描述,論證學(xué)生職業(yè)需要“動(dòng)態(tài)”規(guī)劃,提出架構(gòu)基于WEB的學(xué)生職業(yè)動(dòng)態(tài)規(guī)劃系統(tǒng)。同時(shí),本文對(duì)系統(tǒng)涉及的計(jì)算機(jī)技術(shù)知識(shí)進(jìn)行了研究。從系統(tǒng)體系結(jié)構(gòu)開始,介紹了
2、WEB體系結(jié)構(gòu)中的客戶端技術(shù)、服務(wù)器端技術(shù)及BS結(jié)構(gòu)體系;對(duì)目前流行的兩大項(xiàng)目開發(fā)平臺(tái)進(jìn)行對(duì)比,詳細(xì)描述了本次研究所使用的.NET平臺(tái)結(jié)構(gòu)組成;對(duì)開發(fā)程中使用的面向?qū)ο蟮腃#語言進(jìn)行介紹;對(duì)程序設(shè)計(jì)的靈魂OO思想三大特性:封裝、繼承、多態(tài),及泛型與泛型接口進(jìn)行研究;詳細(xì)介紹了ASP.NET技術(shù)的特點(diǎn)及SQL關(guān)系數(shù)據(jù)庫設(shè)計(jì)的方法原則;在系統(tǒng)實(shí)現(xiàn)方法上,擬采用三層架構(gòu)的方式,因此本文還著重介紹ADO.NET數(shù)據(jù)接口技術(shù)、三層架構(gòu)及三層架構(gòu)中涉及的實(shí)體類。最后,綜合論述研究內(nèi)容的設(shè)計(jì)和實(shí)現(xiàn)方法。系統(tǒng)擬采用SQL2005作為數(shù)據(jù)庫設(shè)計(jì)平臺(tái),Microsoft Visual Studio 2005作為軟
3、件開發(fā)平臺(tái),以. Microsoft .NET Framework 2.0作為項(xiàng)目開發(fā)框架,C#語言為開發(fā)語言,嘗試以三層結(jié)構(gòu)架構(gòu)項(xiàng)目。本文從界面設(shè)計(jì)到系統(tǒng)架構(gòu)進(jìn)行論述,闡述了系統(tǒng)架構(gòu)和實(shí)現(xiàn)的過程。 基于WEB的學(xué)生職業(yè)規(guī)劃系統(tǒng)重在“動(dòng)態(tài)”管理學(xué)生規(guī)劃,目標(biāo)在于“師生互動(dòng)”、“生生互動(dòng)”、“資源共享”,有效指導(dǎo)在校大學(xué)生進(jìn)行職業(yè)生涯規(guī)劃。關(guān)鍵詞:職業(yè)生涯規(guī)劃 基于web 三層架構(gòu) 面向?qū)ο驛BSTRACTMost colleges for students career planning still remains a piece of paper to write programs for
4、students, teachers in the class will be classes, lectures on the typical cases to guide, to guide low efficiency, management and supervision is not easily, and the students planning can not be real-time dynamics. The Web-based dynamic management system that can allow students to check their plan at
5、any time to carry out self-test, and revise and improve, teachers can also make online guidance to a student one on one, or one to many in the guide, would recommend fill in the student planning.This article discusses the study and a complete framework WEB-based students in career planning system dy
6、namic process, pairs of students to a career point of view the necessity of dynamic programming, described the students demonstrate occupational requirement dynamic plan and proposed architecture is based on students in career dynamics WEB planning system.At the same time, the paper covered by the s
7、ystem knowledge of computer technology were studied. Starting from the system architecture is introduced WEB architecture client technology, server-side technology and B S structure system; on the current popular development platform to compare the two projects described in detail in this study used
8、. NET Platform composition; on the development process used in object-oriented C # language are introduced; on the soul of the program design - Object-Oriented Thought of the three features: encapsulation, inheritance, polymorphism in-depth study; detailed information on ASP.NET technology, SQL Rela
9、tional Database Design features and methodological principles; in system implementation method, the proposed three-tier approach, this article also highlights the ADO.NET data interface technology, the three-tier architecture and three-tier structure of the entities involved in class.Finally, a comp
10、rehensive study of the content discussed in the design and realization method. System to be used SQL2005 as database design platform, Microsoft Visual Studio 2005 as a software development platform. Microsoft. NET Framework 2.0 as a project development framework, C # language for the development of
11、language, try to three-tier architecture framework of the project. In this paper, interface design to system architecture discussed to explain the system architecture and implementation process.WEB-based career planning system focuses on the students dynamic management students planning with the aim
12、 of teacher-student interaction, student-student interaction, resource sharing, effectively guide the college students to career planning.Key words: Career Planning based on Web three tiers Object-oriented目 錄 4.1系統(tǒng)開發(fā)平臺(tái)411軟件平臺(tái)本系統(tǒng)開發(fā)是基于Microsoft Visual Studio 2005、SQL Server 2005、IIS6.0進(jìn)行開發(fā)的。412硬件平臺(tái)數(shù)據(jù)庫
13、服務(wù)器、Web服務(wù)器、因特網(wǎng)(或局域網(wǎng))、客戶端。4.2系統(tǒng)總體架構(gòu)設(shè)計(jì)421架構(gòu)軟件系統(tǒng)體系結(jié)構(gòu)軟件系統(tǒng)的架構(gòu)目前大致有兩種方式,一種是客戶端/服務(wù)器模式,也稱為C/S(Client/ Server)模式;另一種是瀏覽器/服務(wù)器模式,也稱為B/S(Browser/Server)模式。4.3系統(tǒng)功能模塊設(shè)計(jì)學(xué)生職業(yè)動(dòng)態(tài)規(guī)劃系統(tǒng)模塊設(shè)計(jì)如圖所示:圖4.2431學(xué)生用戶主要模塊1 個(gè)人資料管理模塊。該模塊包含學(xué)生的注冊(cè)信息及在其它模塊需要用到的一些個(gè)人信息。例如姓名、學(xué)號(hào)、年齡、專業(yè)、年級(jí)、電話等。2 自我分析管理模塊。在此模塊中,學(xué)生需要對(duì)自己的一些性格、愛好、特長、社會(huì)關(guān)系做一些分析,然后根據(jù)
14、自己的分析做最初步的規(guī)劃。在此模塊中,有教師寄語和他人建議部分,教師通過查看學(xué)生的自我分析,給出評(píng)價(jià)和建議,可以是多個(gè)教師給予一個(gè)學(xué)生建議,并由該學(xué)生決定是否公開把教師建議分享給其它同學(xué)。3 職業(yè)生涯規(guī)劃管理模塊。在該模塊提供學(xué)生撰寫整個(gè)職業(yè)生涯規(guī)劃的平臺(tái)。它包括一個(gè)人整個(gè)職業(yè)生涯過程,從18歲入大學(xué)到60歲退休為止的一個(gè)長期目標(biāo)規(guī)劃,考慮到規(guī)劃系統(tǒng)的發(fā)展持續(xù)性和學(xué)生流動(dòng)性,該模塊主要目的是為讓學(xué)生在大學(xué)生涯中樹立一個(gè)長遠(yuǎn)目標(biāo),有利于其近期目標(biāo)的實(shí)施。4 高職學(xué)習(xí)規(guī)劃管理模塊。該模塊是一個(gè)對(duì)大學(xué)日常學(xué)習(xí)管理的一個(gè)規(guī)劃,對(duì)比“職業(yè)生涯規(guī)劃”中長達(dá)40年的規(guī)劃來說,是一個(gè)非常詳細(xì)的規(guī)劃。模塊分為三
15、(四)個(gè)階段,分別對(duì)應(yīng)大學(xué)生活的三年。每個(gè)階段中有三個(gè)培養(yǎng)目標(biāo),分別為:專業(yè)培養(yǎng)目標(biāo)、興趣特長培養(yǎng)目標(biāo)、綜合能力培養(yǎng)目標(biāo),要求學(xué)生制定在某個(gè)階段內(nèi),專業(yè)領(lǐng)域要取得的目標(biāo)、興趣特長所在領(lǐng)域要取得的目標(biāo)、綜合能力,例如心理調(diào)節(jié)能力、社會(huì)交際能力等方面要取得的目標(biāo)。并規(guī)劃出,為取得這些目標(biāo),自己將要實(shí)施怎樣的行動(dòng)。教師可以查看該生的規(guī)劃情況,寫留言和建議,督促學(xué)生實(shí)施自己的計(jì)劃。5 高職專業(yè)方向管理模塊該模塊是專門針對(duì)高職學(xué)生而設(shè)定。由于高職院校對(duì)技能要求非常強(qiáng),并且高職教育的宗旨是“職業(yè)教育就是就業(yè)教育”,在就業(yè)時(shí)要求無需培訓(xùn)就能上崗?fù)瓿晒ぷ魅蝿?wù),與企業(yè)實(shí)現(xiàn)“無縫”連接。因此,學(xué)生的校期間,必須對(duì)
16、自己將要主攻哪一門技術(shù),哪一個(gè)崗位有明確規(guī)劃,在三年學(xué)生生涯中,時(shí)刻以就業(yè)崗位技能為目標(biāo),由初級(jí)到高級(jí),將自己培訓(xùn)成為一個(gè)熟練技能人才。在該模塊中,不以教學(xué)內(nèi)容、而是要以技能或崗位能力為培養(yǎng)目標(biāo)。學(xué)生填寫自己的技能目標(biāo),分初、中、高、熟練四個(gè)階段,并填寫自己將要如何做,才能實(shí)現(xiàn)目標(biāo),以此制定具體的實(shí)施計(jì)劃,每一階段完成后,進(jìn)行自我總結(jié),教師在此過程中,利用網(wǎng)絡(luò),可與學(xué)生充分互動(dòng),學(xué)生可根據(jù)教師建議修改自己的計(jì)劃。6 職業(yè)規(guī)劃論文模塊該模塊為預(yù)留模塊。學(xué)生在經(jīng)過專業(yè)規(guī)劃師指導(dǎo)、及自我分析后,形成論文形式的規(guī)劃書,以便在規(guī)劃實(shí)施時(shí)及時(shí)查看規(guī)則,在出現(xiàn)重大決策時(shí)及時(shí)獲得參考。7 個(gè)人職業(yè)規(guī)劃分享模塊
17、本模塊為功能性模塊,學(xué)生有權(quán)決定是否將自己的規(guī)劃公布于眾,讓其它同學(xué)分享,輔導(dǎo)員可以從中找到典型范例,指導(dǎo)其它學(xué)生進(jìn)行正確適當(dāng)?shù)囊?guī)劃。在該模塊中顯示的是各學(xué)生分享的規(guī)劃及老師的建議。432教師用戶主要模塊1為學(xué)生注冊(cè)模塊。輔導(dǎo)員有權(quán)為學(xué)生注冊(cè)。例如本年級(jí)轉(zhuǎn)學(xué)學(xué)生或轉(zhuǎn)班學(xué)生重新注冊(cè)等。2公告欄模塊。公告欄主要存放日常公告。3查看學(xué)生規(guī)劃模塊。教師和輔導(dǎo)員均可查看所有學(xué)生的規(guī)劃和實(shí)施日程。并且在需要填寫的地方寫上教師寄語。輔導(dǎo)員通過查看學(xué)生的計(jì)劃,給予建議和評(píng)價(jià)。當(dāng)然,其他科任老師也可以進(jìn)行指導(dǎo),因此這部分可以多位老師對(duì)同一學(xué)生同一模塊的計(jì)劃進(jìn)行指導(dǎo)。433管理員用戶主要模塊1用戶管理模塊管理員用
18、戶主要用于日常系統(tǒng)的維護(hù),添加、管理教師、學(xué)生用戶等功能。4.4 數(shù)據(jù)庫設(shè)計(jì) 設(shè)計(jì)思路數(shù)據(jù)庫設(shè)計(jì)主要遵循第一范式、第二范式、第三范式守則。原則上每個(gè)功能模塊設(shè)計(jì)一張表,但以學(xué)生信息表為基礎(chǔ),遵循第二范式和第三范式設(shè)計(jì)主外鍵關(guān)系。表4.1學(xué)生信息表表名Students主鍵StudentsId列名數(shù)據(jù)類型長度是否允許為空字段說明StudentsIdint4n自動(dòng)編號(hào)SLoginnvarchar50n登錄名SLoginPwdnarchar50n登錄密碼PowerIdint4n角色權(quán)限UserStateIdint4n當(dāng)前是否在線StudentsNamenvarchar255n姓名StudentsNon
19、varchar255n學(xué)號(hào)Sexnvarchar255y性別BrithDaydatetimey生日DeptIdinty系部代碼SpecialityIdinty年級(jí)代碼ClassIdinty專業(yè)班級(jí)代碼EnroTimeinty入學(xué)時(shí)間,如:2008Phonenvarchar255y電話SAddressnvarchar255y家庭住址SchoolBeforenvarchar255y曾就讀的高中Sinterestnvarchar255y興趣Sdegreenvarchar255y政治面貌SnativePlacenvarchar255y籍貫其中年級(jí)、專業(yè)、系部等大量重復(fù)內(nèi)容的字段,權(quán)衡冗余和數(shù)據(jù)庫系統(tǒng)工
20、作性能后進(jìn)行設(shè)置外鍵處理。 設(shè)計(jì)結(jié)果數(shù)據(jù)庫關(guān)系圖如圖4.3所示圖4.34.5 系統(tǒng)界面設(shè)計(jì)4. 5. 1個(gè)人職業(yè)生涯規(guī)劃管理界面管理界面使用ASP.NET技術(shù),客戶端使用HTML語言編寫,用.NET框架下的服務(wù)器端控件實(shí)現(xiàn)事件響應(yīng),觸發(fā)事件響應(yīng)程序。圖4.44. 5. 2自我分析界面自我分析界面及以下的專業(yè)方向規(guī)劃界面、學(xué)生管理界面使用了ListBox、ReadioButton、ComBobox、TextBox等控件,界面靜態(tài)信息以HTML表示,服務(wù)端響應(yīng)程序以C#編寫、以.NET框架為支撐。這些由.NET框架提供的控件,體現(xiàn)了面向?qū)ο蟮某绦蛟O(shè)計(jì)思想,大大簡化了代碼編寫過程,使企業(yè)利潤最大化。
21、圖4.54. 5. 3專業(yè)方向規(guī)劃界面圖4.64. 5. 3學(xué)生管理界面圖4.74.6 用戶類型設(shè)計(jì)本系統(tǒng)設(shè)置了三種類型的用戶:學(xué)生、教師和管理員。學(xué)生和教師是系統(tǒng)應(yīng)用的主體,管理員配合日常維護(hù)。三種類的部分模塊權(quán)限分工如下:模塊功能學(xué)生教師管理員備注個(gè)人職業(yè)生涯分析在線測試個(gè)人職業(yè)生涯管理創(chuàng)建查看由學(xué)生決定是否公開修改刪除個(gè)人高職學(xué)習(xí)生涯管理創(chuàng)建查看由學(xué)生決定是否公開修改刪除個(gè)人高職專業(yè)方向管理創(chuàng)建查看由學(xué)生決定是否公開修改刪除學(xué)生信息創(chuàng)建查看修改刪除教師信息創(chuàng)建查看修改刪除管理員信息創(chuàng)建查看修改刪除4.7 本章小結(jié)本章對(duì)要研究的系統(tǒng)架構(gòu)進(jìn)行了介紹,并詳細(xì)描述了各模塊的主要功能、數(shù)據(jù)庫結(jié)構(gòu)設(shè)
22、計(jì)及系統(tǒng)的用戶類型設(shè)計(jì)。對(duì)系統(tǒng)界面也進(jìn)行了簡單描述。第五章 系統(tǒng)實(shí)現(xiàn)5.1 三層結(jié)構(gòu)實(shí)現(xiàn)WEB架構(gòu)項(xiàng)目以三層結(jié)構(gòu)形式架框網(wǎng)站。分表是表示層(放在解決方案第一項(xiàng))、業(yè)務(wù)邏輯層(ZYGHBLL)、數(shù)據(jù)訪問層(ZYGHDAL)。1數(shù)據(jù)訪問層 數(shù)據(jù)訪問項(xiàng)目執(zhí)行從數(shù)據(jù)庫(或其他數(shù)據(jù)服務(wù))獲取數(shù)據(jù)或向數(shù)據(jù)庫發(fā)送數(shù)據(jù)的功能。在分布式應(yīng)用程序結(jié)構(gòu)中,相應(yīng)功能使用 ADO.NET 數(shù)據(jù)適配器來完成。 “數(shù)據(jù)訪問”層的作用: (1)從“業(yè)務(wù)規(guī)則”層接收請(qǐng)求,從“數(shù)據(jù)服務(wù)”獲取數(shù)據(jù)或向其發(fā)送數(shù)據(jù)。 (2)使用存儲(chǔ)過程獲取數(shù)據(jù),并可選用 ADO.NET 向數(shù)據(jù)庫發(fā)送數(shù)據(jù)。 (3)將數(shù)據(jù)庫查詢結(jié)果返回到“業(yè)務(wù)規(guī)則”層,
23、作為ADO.NET 數(shù)據(jù)集。 2業(yè)務(wù)邏輯層 業(yè)務(wù)規(guī)則項(xiàng)目包含業(yè)務(wù)對(duì)象本身以及應(yīng)用于它們的規(guī)則。這也是主要業(yè)務(wù)對(duì)象所在的位置。它們實(shí)現(xiàn)業(yè)務(wù)實(shí)體或系統(tǒng)對(duì)象。 業(yè)務(wù)規(guī)則層的作用: (1) 從“用戶界面”層接受請(qǐng)求。 (2) 根據(jù)編碼的業(yè)務(wù)規(guī)則處理請(qǐng)求。 (3) 從“數(shù)據(jù)訪問”層獲取數(shù)據(jù)或?qū)?shù)據(jù)發(fā)送到“數(shù)據(jù)訪問”層。 (4)將處理結(jié)果傳遞回“用戶界面”層。 3表示層(用戶界面) 用戶界面項(xiàng)目是指在應(yīng)用程序中實(shí)現(xiàn)的客戶端。在分布式應(yīng)用程序結(jié)構(gòu)中,用戶服務(wù)可以是 Web 客戶端。這種一般類型的應(yīng)用程序包含以下功能: 用戶界面層的作用: (1)管理 Web 頁的呈現(xiàn)和行為 (2)顯示數(shù)據(jù) (3)捕獲數(shù)據(jù) (
24、4)數(shù)據(jù)驗(yàn)證檢查 (5)為用戶提供任務(wù)指南 (6)向“業(yè)務(wù)規(guī)則”發(fā)送用戶輸入 (7)從“業(yè)務(wù)規(guī)則”接收結(jié)果 (8)向用戶顯示錯(cuò)誤在三層結(jié)構(gòu)中各層之間相互依賴:表示層依賴于業(yè)務(wù)邏輯層,業(yè)務(wù)邏輯層依賴于數(shù)據(jù)訪問層。項(xiàng)目結(jié)構(gòu)圖如圖5.1所示圖5.15.2 實(shí)現(xiàn)業(yè)務(wù)實(shí)體類 學(xué)生用戶信息實(shí)體類的實(shí)現(xiàn)在圖5.1中,最后一項(xiàng)ZYGHMODEL是實(shí)體類,實(shí)體類用封裝和繼承實(shí)現(xiàn),提高數(shù)據(jù)安全性及代碼復(fù)用率。其中,userMODEL是父類,封裝系統(tǒng)中各用戶的公共屬性和方法,Student及Teacher是子類,繼承父類屬性和方法,并在子類中重寫父類方法。userMODEL類:public class userMO
25、DEL public userMODEL() public userMODEL( int id,string name,string loginid,string loginpwd,int power,int userstate) this.Id = id; this.Name = name; this.Loginid = loginid; this.Loginpwd = loginpwd; this.Power = power; this.Userstate = userstate; private int id; public int Id get return id; set id =
26、value; private string name; public string Name get return name; set name = value; private string loginid; public string Loginid get return loginid; set loginid = value; private string loginpwd; public string Loginpwd get return loginpwd; set loginpwd = value; private int power; public int Power get
27、return power; set power = value; private int userstate; public int Userstate get return userstate; set userstate = value; public virtual string SayHi() string message; message = String.Format(0你好,你已成功登陸本系統(tǒng)!,); Student類:public class Student:userMODEL public Student () public Student (int id,
28、 string name, string loginid, string loginpwd, int power, int userstate,string _StudentsNo, string _Sex,DateTime _BrithDay,string _SpecialityName,string _GradeName,int _EnroTime,string _Phone, string _SAddress,string _SchoolBefore,string _Sinterest,string _Sdegree,string _SnativePlace):base(id,name,
29、loginid,loginpwd,power,userstate) this.StudentsNo = _StudentsNo; this.Sex = _Sex; this.BrithDay = _BrithDay; this.SpecialityName = _SpecialityName; this.GradeName = _GradeName; this.EnroTime = _EnroTime; this.Phone = _Phone; this.SAddress = _SAddress; this.SchoolBefore = _SchoolBefore; this.Sinteres
30、t = _Sinterest; this.Sdegree = _Sdegree; this.SnativePlace = _SnativePlace; private string _StudentsNo; private string _Sex; private DateTime _BrithDay; private string _SpecialityName; private string _GradeName; private int _EnroTime; private string _Phone; private string _SAddress; private string _
31、SchoolBefore; private string _Sinterest; private string _Sdegree; private string _SnativePlace; public string StudentsNo get return _StudentsNo; set _StudentsNo = value; public string Sex get return _Sex; set _Sex = value; public DateTime BrithDay get return _BrithDay; set _BrithDay = value; public
32、string SpecialityName get return _SpecialityName; set _SpecialityName = value; public string GradeName get return _GradeName; set _GradeName = value; public int EnroTime get return _EnroTime; set _EnroTime = value; public string Phone get return _Phone; set _Phone = value; public string SAddress get
33、 return _SAddress; set _SAddress = value; public string SchoolBefore get return _SchoolBefore; set _SchoolBefore = value; public string Sinterest get return _Sinterest; set _Sinterest = value; public string Sdegree get return _Sdegree; set _Sdegree = value; public string SnativePlace get return _Sna
34、tivePlace; set _SnativePlace = value; Teacher類:public class Teacher : userMODEL public Teacher () public Teacher (int id, string name, string loginid, string loginpwd, int power, int userstate, string _Sex, int _DeptId,string _Phone) :base(id,name,loginid,loginpwd,power,userstate) this.Sex = _Sex; t
35、his.DeptId = _DeptId; this.Phone = _Phone; private string _Sex; private int _DeptId; private string _Phone; public string Sex get return _Sex; set _Sex = value; public int DeptId get return _DeptId; set _DeptId = value; public string Phone get return _Phone; set _Phone = value; public override strin
36、g SayHi() return base.SayHi(); 專業(yè)方向規(guī)劃實(shí)體類的實(shí)現(xiàn)專業(yè)方向?qū)嶓w類主要在程序與數(shù)據(jù)庫間傳遞關(guān)于專業(yè)方向規(guī)劃內(nèi)容數(shù)據(jù),為保證數(shù)據(jù)的安全性及代碼復(fù)用性,此處采用了數(shù)據(jù)字段與屬性封裝。public class SdirectionMODEL int _SdirectionId; string _StudentsNo; string _direction; string _技能目標(biāo); string _理論知識(shí)目標(biāo); string _工作能力目標(biāo); string _個(gè)人身心目標(biāo); string _個(gè)人總結(jié); public int SdirectionId get ret
37、urn _SdirectionId; set _SdirectionId = value; public string StudentsNo get return _StudentsNo; set _StudentsNo = value; public string direction get return _direction; set _direction = value; public string 技能目標(biāo) get return _技能目標(biāo); set _技能目標(biāo)= value; public string 理論知識(shí)目標(biāo) get return _理論知識(shí)目標(biāo); set _理論知識(shí)目標(biāo)=
38、value; public string 工作能力目標(biāo) get return _工作能力目標(biāo); set _工作能力目標(biāo)= value; public string 個(gè)人身心目標(biāo) get return _個(gè)人身心目標(biāo); set _個(gè)人身心目標(biāo)= value; public string 個(gè)人總結(jié) get return _個(gè)人總結(jié); set _個(gè)人總結(jié)= value; 5.3實(shí)現(xiàn)數(shù)據(jù)訪問層 實(shí)現(xiàn)數(shù)據(jù)庫訪問及學(xué)生登陸數(shù)據(jù)訪問StudentService完成了數(shù)據(jù)庫配置和學(xué)生賬戶的增、刪、改、查功能。StudentService使用了泛型接口IStudentService ,在泛型接口中,實(shí)現(xiàn)了增刪改
39、查方法。接口中的查找方法:public IList GetAllStudents() IList objStudentList = new List(); using (SqlConnection conn = new SqlConnection(connString) SqlCommand objCommand = new SqlCommand(dboOwner + .usp_SelectStudentsAll, conn); objCommand.CommandType = CommandType.StoredProcedure; conn.Open(); using (SqlDataRe
40、ader objReader = objCommand.ExecuteReader(CommandBehavior.CloseConnection) while (objReader.Read() Student objStudent = new Student(); objStudent.LoginId = Convert.ToString(objReaderLoginId); objStudent.StudentNO = Convert.ToString(objReaderStudentNO); objStudent.StudentName = Convert.ToString(objRe
41、aderStudentName); objStudent.Sex = Convert.ToString(objReaderSex); objStudent.StudentIDNO = Convert.ToString(objReaderStudentIDNO); objStudent.Phone = Convert.ToString(objReaderPhone); objStudentList.Add(objStudent); return objStudentList; StudentService類使用了泛型接口:public class StudentService : IStuden
42、tService #region Private Members /從配置文件中讀取數(shù)據(jù)庫連接字符串 private readonly string connString = ConfigurationManager.ConnectionStringsMySchoolConnectionString.ToString(); private readonly string dboOwner = ConfigurationManager.ConnectionStringsDataBaseOwner.ToString(); #endregion #region Public Methods / /
43、創(chuàng)建學(xué)員帳戶 / / 學(xué)員實(shí)體對(duì)象 / 生成帳戶記錄的 public int AddSutdent(Student objStudent) int number; using (SqlConnection conn = new SqlConnection(connString) SqlCommand objCommand = new SqlCommand(dboOwner + .usp_InsertPartStudentInfo, conn); objCommand.CommandType = CommandType.StoredProcedure; objCommand.Parameters
44、.Add(LoginID, SqlDbType.NVarChar, 50).Value = objStudent.LoginId; objCommand.Parameters.Add(LoginPwd, SqlDbType.NVarChar, 50).Value = objStudent.LingPwd; objCommand.Parameters.Add(UserStateId, SqlDbType.Int).Value = objStudent.UserStateId; objCommand.Parameters.Add(ClassID, SqlDbType.Int).Value = objStudent.ClassID;
溫馨提示
- 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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 兼并重組案例中的企業(yè)品牌重塑策略實(shí)施路徑分析考核試卷
- 派遣員工工作滿意度影響因素分析考核試卷
- 疫苗不良反應(yīng)報(bào)告處理流程規(guī)范考核試卷
- 2025年中國PE液體包裝膜數(shù)據(jù)監(jiān)測報(bào)告
- 2025年中國EPE珍珠棉片材數(shù)據(jù)監(jiān)測研究報(bào)告
- 2025年中國ABS塑料原料數(shù)據(jù)監(jiān)測研究報(bào)告
- 2025年中國2-異丙基-4-甲基噻唑數(shù)據(jù)監(jiān)測報(bào)告
- 2025至2030年中國高速電主軸軸承市場分析及競爭策略研究報(bào)告
- 2025至2030年中國防磁防潮防靜電柜市場分析及競爭策略研究報(bào)告
- 2025至2030年中國鋼筋氣壓焊接機(jī)市場分析及競爭策略研究報(bào)告
- 品管圈PDCA提高手衛(wèi)生依從性
- 2025高考物理步步高同步練習(xí)選修1練透答案精析
- TGDNAS 043-2024 成人靜脈中等長度導(dǎo)管置管技術(shù)
- 六年級(jí)數(shù)學(xué)下冊(cè)期末試卷及答案【可打印】
- 陜西省西安市雁塔區(qū)2024年五年級(jí)數(shù)學(xué)第二學(xué)期期末綜合測試試題含解析
- 2024年黔東南州能源投資限公司招聘(高頻重點(diǎn)提升專題訓(xùn)練)共500題附帶答案詳解
- 2024版俄羅斯易貨貿(mào)易操作手冊(cè)
- 2024-2030年中國民辦中小學(xué)教育行業(yè)改革創(chuàng)新模式及投資規(guī)劃分析報(bào)告
- 北京市西城區(qū)2023-2024學(xué)年八年級(jí)下學(xué)期期末考試語文試題
- CJJ181-2012 城鎮(zhèn)排水管道檢測與評(píng)估技術(shù)規(guī)程
- 人音版六年級(jí)下冊(cè)音樂教案及反思
評(píng)論
0/150
提交評(píng)論