計(jì)算機(jī)設(shè)計(jì)課題項(xiàng)目源碼選課系統(tǒng)集合_第1頁
計(jì)算機(jī)設(shè)計(jì)課題項(xiàng)目源碼選課系統(tǒng)集合_第2頁
計(jì)算機(jī)設(shè)計(jì)課題項(xiàng)目源碼選課系統(tǒng)集合_第3頁
計(jì)算機(jī)設(shè)計(jì)課題項(xiàng)目源碼選課系統(tǒng)集合_第4頁
計(jì)算機(jī)設(shè)計(jì)課題項(xiàng)目源碼選課系統(tǒng)集合_第5頁
已閱讀5頁,還剩30頁未讀 繼續(xù)免費(fèi)閱讀

下載本文檔

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

文檔簡介

Withthedevelopmentoftheenrollingnumber,thedatafordailyregistryisincreasing,too.Andalwaysweshouldgotoclassroomtoenroll.Althoughthismethoddirectly,butresultinblindnessofthecourseenrollmentandregistrydataprocessingoftheheavy.Inordertoreducetheworkregistry,andbettereachstudenttochoosetheirownfavoritesubjects.Thissystemisspecialfortheon-linecoursechoosingtodesignbothfromtheaspectofthestudentandtheteacher.Thestudentcanchoosethecourseindependentlyandtheteachercanmanagetheinformationoftheannouncingcourse,also.ThispapergivesthebasicdesignideaoftheBrowser/ServerstructurebasedonlinecourseelectsystembyyzingthecharacteristicoftheBrowser/Serverstructureandcombiningwiththeactualpublicelectivecoursesconditionsofourschool.Itintroducesthefunctionmoduleanddatabasedesignbriefly,followedbyadiscussionondatabaseaccessingtechnologyandtheactivepagetechnologyofthecourseelectsystembasedonASP.NETandSQLServer2000.Byusingthissystem,studentscanelectcoursesonlineefficiently.ThisBrowser/ServerstructuresystemisdevelopedunderVS.NETtforminWindowsXPoperatingsystem,usingC#asASP.NETdevelopmentlanguageandSQLServer2000asthedatabase.Thissystemisofhighersecurityandbetterperformance.Thecharacterstring,whichisusedtoconnectingtothedatabase,canbemodifiedatanytimeinthefile“web.config”.Thestringisencodedandencrypted,increasingflexibilityofthesystemandsecurityofthedatabase.Incode,makinguseofstoredprocedureandminimizingthedatabaseopeningtimetoimproveperformanceofthesystem.Thispaperincludesthesystemysis,themaindesigning,thedatabasedesigning,thefunctiondesigningand,beforethis,somebasicknowledgeandpresentdevelopmentoftheprogramsmentionedabove.:onlinecourseelect,Browser/Serverstructure,ASP.NET, 第一章引 第二章系統(tǒng)分析與總體設(shè) 第三 數(shù)據(jù)庫設(shè)計(jì)與實(shí) 第四章公共類與公共頁面設(shè) 第五章系統(tǒng)說明 第6章總 參考文 Server大型的數(shù)據(jù)庫、來人們使用傳統(tǒng)人工的方式管理文件,這種管理方式存在著許多缺點(diǎn),如:效率低、作為計(jì)算機(jī)應(yīng)用的一部分,使用計(jì)算機(jī)對選課信息進(jìn)行管理,有著手工管理所無法比擬的優(yōu)點(diǎn).例如:檢索迅速、查找方便、可靠性高、量大、性好、長、成本ASP.NET話,E-mail編輯課程上間:教師在開設(shè)了課程后,可以靈活地設(shè)置上間和地點(diǎn)10用戶登用戶登 驗(yàn)證模模用戶登錄驗(yàn)證模塊驗(yàn)證用戶名和,并根據(jù)不同的用戶類型,跳轉(zhuǎn)到對應(yīng)的頁面中。設(shè)置選間模塊提供給系統(tǒng)管理員修改選間段。錄入信息模塊提供給系統(tǒng)管理課程的上間地點(diǎn)友好的界面和操作。評分模塊用于教師用戶給選修該教師開設(shè)的課程上課地點(diǎn)時(shí) 上課地點(diǎn)時(shí)M1E—R開課教師開課教師前導(dǎo)課程編上E—R圖轉(zhuǎn)換為關(guān)系模型的過程,即將所有實(shí)體和關(guān)系轉(zhuǎn)換成E—R教學(xué)樓(ID,教學(xué)樓名稱) 選課(學(xué)號,課程編號,成績教師(教師編號,,, ,電子郵件,個(gè)人簡介庫軟件實(shí)現(xiàn)這樣的結(jié)構(gòu)。本系統(tǒng)中數(shù)據(jù)庫采用SQLServer2000作為數(shù)據(jù)庫。首先我們在SQLServer2000的“企業(yè)管理器”創(chuàng)建一個(gè)數(shù)據(jù)庫,我們命名為“SC3-1:SC8個(gè)表:Student,Teacher,Course,SC,CourseTime,Building,RoomAdmin,每個(gè)表與邏輯設(shè)計(jì)中一種Student表。Student表用來學(xué)生的個(gè)人信息,使用學(xué)號作為主鍵,如圖3-Teacher表。Teacher表用來教師的個(gè)人信息,用學(xué)校分配給教師的教師編號作3-3:Course表。Course表用來課程信息,Course表以課程編號為主鍵,設(shè)置課程編1Id為外鍵,所有“TIdTeacher表中的“TId”值。設(shè)置外鍵關(guān)系可,3-4:SC表。SC表用于學(xué)生的選課信息,在SC表中學(xué)號和課程編號是主鍵,同CourseTime表。CourseTime表用來存放課程的上間和上課地點(diǎn)信息,其中課程3-6:Building表。Building表用來存放教學(xué)樓信息,Building表中教學(xué)樓編號為主鍵,自13-7:Room表。RoomRoomAdmin表。Admin3-g文件是用來保存的很多全局設(shè)置,代碼是通過usingConfiguration,在Web.Config<?xmlversion="1.0"encoding="utf-8"<!--compilationdebug="true"ASPXfalsecompilationdebug="true"(.pdb較慢的大文件,所以應(yīng)該只在調(diào)試時(shí)將此值設(shè)置為true

調(diào)試ASP.NET文件的文檔。<!--設(shè)置customErrorsmode="On"或"RemoteOnly"以啟用自定義錯誤信息,或設(shè)置為"Off"以禁用自定義錯誤信息。為每個(gè)要處理的錯誤添加<error>"On""Off"ASP.NET"RemoteOnly"Web<!--驗(yàn)此節(jié)設(shè)置應(yīng)用程序的驗(yàn)證策略。可能的模式是"Windows"、"Forms"、"Passport"和"None"

"None"不執(zhí)行驗(yàn)證"Windows"IIS根據(jù)應(yīng)用程序的設(shè)置執(zhí)行驗(yàn)(基本、簡要或集成Windows)。在IIS中必須禁用"Forms"(Web在您的應(yīng)用程序中驗(yàn)證他們的。用戶憑據(jù)標(biāo)記在中。"Passport"驗(yàn)證是通過的集中驗(yàn)證服務(wù)執(zhí)行的,<authenticationmode="Windows"

-應(yīng)用程序資源。通配符:"*"表示任何人,"?"表示 驗(yàn)證的)用戶<allowusers="*"<!-- <!--應(yīng)用程序級別記應(yīng)用程序級別為應(yīng)用程序中的每一頁啟用日志輸出設(shè) traceenabled="true"可以啟用應(yīng)用程序記錄。如pageOutput="true",在每一頁的底部顯示信息。否則,可以通過瀏覽Web應(yīng)用程序 中的"trace.axd"頁來查看應(yīng)用程序日志<!--默認(rèn)情況下,ASP.NET使用來標(biāo)識哪些請求屬于特定的會話。如果不可用,則可以通過將會話標(biāo)識符添加到URL來會話。若要禁用,請?jiān)O(shè)置sessionStateless="true"。sqlConnectionString="datasource=;Trusted_Connection=yes"<!--

<addvalue="datasource=(local);initialcatalog=sc;persistsecurityinfo=True;userid=sa;pwd=sa;packetsize=4096"/> 選間 value="2005-06-0100:00:00/2005-06-1500:00:00"/> value="E:\\選課系統(tǒng)\\time.txt"DatasourceIPInitialcatalog:Persistsecurityinfo:表示數(shù)據(jù)庫登錄驗(yàn)證模式。SQLServer支持用戶名登錄驗(yàn)證和Windows驗(yàn)證兩種模式。一般選用前一種,故這里Persistsecurityinfo的值署為Userid:表示登錄數(shù)據(jù)庫的用戶名。Packetsize:4096SqlConnectionSqlDataAdapter類、mandDataSet數(shù)據(jù)庫操作做了簡單的封裝—Db類。在Db類中有三個(gè)靜態(tài)函數(shù)ExecuteSelectSql、ExecuteSqlExecuteInsertSqlExecuteSelectSql函數(shù)用來執(zhí)行查詢操作,identityinsertOpenmandSQLSqlConnectionClose///selectsqlselect///<paramname="sqlSelect">select<returnsselectpublicstaticDataSetExecuteSelectSql(stringsqlSelect{SqlConnectionconn=newSqlConnection(connString);SqlDataAdaptersda=newSqlDataAdapter(sqlSelect,conn);DataSetds=newDataSet();{}catch(SqlException{thrownew}return}ExecuteSqlpublicstaticintExecuteSql(stringsql{introws=-SqlConnectionconn=newSqlConnection(connString);mandcmd=new {}

rows=catch(SqlException{thrownew}{}return}在的編寫過程中經(jīng)常會有很多公共函數(shù)調(diào)用,把它們都寫在一個(gè)工具類里:AlertpublicstaticstringMD5(string{stringresult= returnresult;}Alert靜態(tài)成員函數(shù)的功能是顯示一個(gè)提示框,在的運(yùn)行過程中,經(jīng)常需要publicstaticstringAlert(string{return"<script}為-2publicstaticstringBack(int{ }錯誤,為了便于統(tǒng)一,本系統(tǒng)定義的錯誤信息類和錯誤顯示頁面。在錯誤信息類URL法運(yùn)用了ASP.NET的內(nèi)置對象Session記錄用戶登錄信息,同樣也可以在里隨時(shí)判斷下面是選課系統(tǒng)的預(yù)覽,此處簡單介紹本系統(tǒng)的部分功能privatevoidbtnLogin_Click(objectsender,System.EventArgs{stringuser=txtUser.Text.Trim();stringkey="";stringsql="";DataSetds;switch(type){ 1:////驗(yàn)證學(xué)生代 2:////驗(yàn)證教師代 //驗(yàn)證管理員代}}5-表中可以看到所有必修課程及課程的簡單信息,如授課教師、課程所占學(xué)分等。程的上間和地點(diǎn)。在頁面加載的時(shí)候從數(shù)據(jù)庫所有必修課信息,代碼如下stringsqlselectCourse.*,TNamefromCourse,TeacherwhereCTypelike必修andCourse.TIdlikeTeacher.TId";//查詢處所有必修課程信息DataSetds=Db.ExecuteSelectSql(sql);if(ds!=null&&ds.Tables.Count>0{dgCourse.DataSource=ds.Tables[0];dgCourse.DataBind();//DataGrid中}5-單擊“選修課程”,查看所有選修課程列表,在列表中給出了比必修課程的stringsql="selectx.*,TName,(selectCNamefromCourseasywherey.CId=x.CPreCId)asamefromCourseasx,Teacherwherex.CTypelike'選修'andx.TIdlikeTeacher.TId";DataSetds=Db.ExecuteSelectSql(sql);if(ds!=null&&ds.Tables.Count>0{dgCourse.DataSource=for(inti=0;i<ds.Tables[0].Rows.Count;i++{sql="selectcount(*)fromSCwhereCId="+ds.Tables[0].Rows[i]["CId"].ToString();DataSetds1=Db.ExecuteSelectSql(sql);if(ds1!=null&&ds1.Tables.Count>0&&ds1.Tables[0].Rows.Count>0 }}boollocked=bool.Parse(Session["Locked"].ToString());if(!locked){}{}

lbLock.TextlbLock.Text選課信息已被鎖定!";dgCourse.Columns[9].Visible=false;stringsql="selectcount(*)fromSCwhereSIdlike'"+Session["Id"].ToString()+"'";DataSetds=Db.ExecuteSelectSql(sql);intif(ds!=null&&ds.Tables.Count>0&&ds.Tables[0].Rows.Count>0{nCourse=}if(nCourse<2{}{

sqlselectCIdfromCoursewhereCType必修'";DataSetds2=Db.ExecuteSelectSql(sql);if(ds2!=null&&ds2.Tables.Count>0{for(inti=0;i<ds2.Tables[0].Rows.Count;i++{stringcid=sql="insertintoSC(SId,CId,Score)values('"+Session["Id"].ToString()+"',"+cid+",0)";}}sql="updateStudentsetSLocked=1whereSIdlike'"+Session["Id"].ToString()+"'";if(Db.ExecuteSql(sql)==1){lbLock.Text="選課信息已被鎖定!";Session["Locked"]="true";}}設(shè)置開始選間段:選間段在項(xiàng)目 示開始時(shí)間,第二行表示結(jié)束時(shí)間。如圖5-5:DateTimedtStart,dtEnd;{dtStart=DateTime.Parse(txttimeStart.Text);dtEnd=DateTime.Parse(txtTimeEnd.Text);}{}StreamWritersw=newStreamWriter("",false); lbTime.Text="選間為:"+dtStart.ToString()+"到//更新選間段顯

privatevoidbtnAddTearcher_Click(objectsender,System.EventArgs{stringsql="insertintoTeacher(TId,TKey,TName){if(Db.ExecuteSql(sql)==1{sql="select*fromDataSetds1=Db.ExecuteSelectSql(sql);if(ds1!=null&&ds1.Tables.Count>0){}}

在!

Response.Write(MyUtility.Alert("添加失敗-_-,}}{")

Response.Write(MyUtility.Alert("添加失敗-_-,}}5-7:

privatevoidbtnAddBuilding_Click(objectsender,System.EventArgs{if(txtBuilding.Text.Trim()==""{}stringsql="insertintoBuilding(BuildingName)values('"+txtBuilding.Text.Trim()+"')";}教師個(gè)人信息在Teacher.Aspx中在這里可以修改和添寫教師個(gè)人信息如圖5-從數(shù)據(jù)庫中教師個(gè)人信息顯示代碼如下stringsql="select*fromTeacherwhereTIdlike'"+lbTId.Text.Trim()+"'";DataSetds=Db.ExecuteSelectSql(sql); ds.Tables[0].Rows.Count>0){txtTName.Text=ds.Tables[0].Rows[0]["TName"].ToString();txtTAge.Text=ds.Tables[0].Rows[0]["TAge"].ToString();txtTPhone.Textds.Tables[0].Rows[0]["TPhone"].ToString();txtTMail.Text=ds.Tables[0].Rows[0]["TMail"].ToString();if(ds.Tables[0].Rows[0]["T"].ToString()=="男")ddlT.SelectedIndex=}

ddlT.SelectedIndex=stringsql="updateTeachersetTName="',TAge="+txtTAge.Text.Trim()+",T='"+ddlT.SelectedItem.Text+"',TPhone='"+txtTPhone.Text.Trim()+"',TMail='"+txtTMail.Text.Trim()+"'whereTId='"+Session["Id"].ToString()+"'";if(Db.ExecuteSql(sql)==1)修改代碼如下if(txtKey.Text.Trim()!=txtKeyConfirm.Text.Trim(){Response.Write(MyUtility.Alert("兩次輸入不相符合"));}stringsql="updateTeachersetTKey='"+MyUtility.MD5(txtKey.Text.Trim())+"'whereTId=if(Db.ExecuteSql(sql)==1)5-11:從數(shù)據(jù)庫所有課程編號和課程名稱代碼如下stringsql="select amefromCourse";DataSetds=Db.ExecuteSelectSql(sql);if(ds!=null&&d

溫馨提示

  • 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)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論