計算機設計課題項目源碼選課系統集合_第1頁
計算機設計課題項目源碼選課系統集合_第2頁
計算機設計課題項目源碼選課系統集合_第3頁
計算機設計課題項目源碼選課系統集合_第4頁
計算機設計課題項目源碼選課系統集合_第5頁
已閱讀5頁,還剩30頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

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, 第一章引 第二章系統分析與總體設 第三 數據庫設計與實 第四章公共類與公共頁面設 第五章系統說明 第6章總 參考文 Server大型的數據庫、來人們使用傳統人工的方式管理文件,這種管理方式存在著許多缺點,如:效率低、作為計算機應用的一部分,使用計算機對選課信息進行管理,有著手工管理所無法比擬的優點.例如:檢索迅速、查找方便、可靠性高、量大、性好、長、成本ASP.NET話,E-mail編輯課程上間:教師在開設了課程后,可以靈活地設置上間和地點10用戶登用戶登 驗證模模用戶登錄驗證模塊驗證用戶名和,并根據不同的用戶類型,跳轉到對應的頁面中。設置選間模塊提供給系統管理員修改選間段。錄入信息模塊提供給系統管理課程的上間地點友好的界面和操作。評分模塊用于教師用戶給選修該教師開設的課程上課地點時 上課地點時M1E—R開課教師開課教師前導課程編上E—R圖轉換為關系模型的過程,即將所有實體和關系轉換成E—R教學樓(ID,教學樓名稱) 選課(學號,課程編號,成績教師(教師編號,,, ,電子郵件,個人簡介庫軟件實現這樣的結構。本系統中數據庫采用SQLServer2000作為數據庫。首先我們在SQLServer2000的“企業管理器”創建一個數據庫,我們命名為“SC3-1:SC8個表:Student,Teacher,Course,SC,CourseTime,Building,RoomAdmin,每個表與邏輯設計中一種Student表。Student表用來學生的個人信息,使用學號作為主鍵,如圖3-Teacher表。Teacher表用來教師的個人信息,用學校分配給教師的教師編號作3-3:Course表。Course表用來課程信息,Course表以課程編號為主鍵,設置課程編1Id為外鍵,所有“TIdTeacher表中的“TId”值。設置外鍵關系可,3-4:SC表。SC表用于學生的選課信息,在SC表中學號和課程編號是主鍵,同CourseTime表。CourseTime表用來存放課程的上間和上課地點信息,其中課程3-6:Building表。Building表用來存放教學樓信息,Building表中教學樓編號為主鍵,自13-7:Room表。RoomRoomAdmin表。Admin3-g文件是用來保存的很多全局設置,代碼是通過usingConfiguration,在Web.Config<?xmlversion="1.0"encoding="utf-8"<!--compilationdebug="true"ASPXfalsecompilationdebug="true"(.pdb較慢的大文件,所以應該只在調試時將此值設置為true

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

"None"不執行驗證"Windows"IIS根據應用程序的設置執行驗(基本、簡要或集成Windows)。在IIS中必須禁用"Forms"(Web在您的應用程序中驗證他們的。用戶憑據標記在中。"Passport"驗證是通過的集中驗證服務執行的,<authenticationmode="Windows"

-應用程序資源。通配符:"*"表示任何人,"?"表示 驗證的)用戶<allowusers="*"<!-- <!--應用程序級別記應用程序級別為應用程序中的每一頁啟用日志輸出設 traceenabled="true"可以啟用應用程序記錄。如pageOutput="true",在每一頁的底部顯示信息。否則,可以通過瀏覽Web應用程序 中的"trace.axd"頁來查看應用程序日志<!--默認情況下,ASP.NET使用來標識哪些請求屬于特定的會話。如果不可用,則可以通過將會話標識符添加到URL來會話。若要禁用,請設置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:\\選課系統\\time.txt"DatasourceIPInitialcatalog:Persistsecurityinfo:表示數據庫登錄驗證模式。SQLServer支持用戶名登錄驗證和Windows驗證兩種模式。一般選用前一種,故這里Persistsecurityinfo的值署為Userid:表示登錄數據庫的用戶名。Packetsize:4096SqlConnectionSqlDataAdapter類、mandDataSet數據庫操作做了簡單的封裝—Db類。在Db類中有三個靜態函數ExecuteSelectSql、ExecuteSqlExecuteInsertSqlExecuteSelectSql函數用來執行查詢操作,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}在的編寫過程中經常會有很多公共函數調用,把它們都寫在一個工具類里:AlertpublicstaticstringMD5(string{stringresult= returnresult;}Alert靜態成員函數的功能是顯示一個提示框,在的運行過程中,經常需要publicstaticstringAlert(string{return"<script}為-2publicstaticstringBack(int{ }錯誤,為了便于統一,本系統定義的錯誤信息類和錯誤顯示頁面。在錯誤信息類URL法運用了ASP.NET的內置對象Session記錄用戶登錄信息,同樣也可以在里隨時判斷下面是選課系統的預覽,此處簡單介紹本系統的部分功能privatevoidbtnLogin_Click(objectsender,System.EventArgs{stringuser=txtUser.Text.Trim();stringkey="";stringsql="";DataSetds;switch(type){ 1:////驗證學生代 2:////驗證教師代 //驗證管理員代}}5-表中可以看到所有必修課程及課程的簡單信息,如授課教師、課程所占學分等。程的上間和地點。在頁面加載的時候從數據庫所有必修課信息,代碼如下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";}}設置開始選間段:選間段在項目 示開始時間,第二行表示結束時間。如圖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()+"')";}教師個人信息在Teacher.Aspx中在這里可以修改和添寫教師個人信息如圖5-從數據庫中教師個人信息顯示代碼如下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:從數據庫所有課程編號和課程名稱代碼如下stringsql="select amefromCourse";DataSetds=Db.ExecuteSelectSql(sql);if(ds!=null&&d

溫馨提示

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

評論

0/150

提交評論