




免費(fèi)預(yù)覽已結(jié)束,剩余34頁可下載查看
下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報或認(rèn)領(lǐng)
文檔簡介
數(shù)據(jù)庫課程設(shè)計課程名:學(xué)分管理系統(tǒng) 姓名:XXX 專業(yè)班級:XXXX年級:XXXX指導(dǎo)老師:XXXX設(shè)計時間:XXXXX一課設(shè)題目:學(xué)分管理系統(tǒng)1.使用的開發(fā)工具:visual studio2010系統(tǒng), sql server2005 ,windows xp sp3操作系統(tǒng).2.開發(fā)語言:C#面向?qū)ο笳Z言二系統(tǒng)開發(fā)步驟:1.系統(tǒng)功能設(shè)計(軟件結(jié)構(gòu)設(shè)計)步驟:(1)系統(tǒng)總體功能模塊圖設(shè)計 系統(tǒng)總控模塊編輯數(shù)據(jù)查詢數(shù)據(jù)統(tǒng)計數(shù)據(jù)系統(tǒng)維護(hù)退出添加,刪除學(xué)生信息添加課程信息編輯學(xué)生分?jǐn)?shù)按課程號查按班級號查查不及格名單查應(yīng)留級名單按姓名查(按姓名)按班級統(tǒng)計不及格人數(shù)及比例按班級統(tǒng)計各分?jǐn)?shù)段人數(shù)及比例各科的平均分?jǐn)?shù)密碼的設(shè)置與修改數(shù)據(jù)庫數(shù)據(jù)轉(zhuǎn)儲代碼庫的維護(hù)幫助 (2)系統(tǒng)詳細(xì)功能設(shè)計將總體功能模塊圖中的每個模塊進(jìn)行邏輯過程的設(shè)計。a.系統(tǒng)封面設(shè)計:畫出封面的顯示圖b.系統(tǒng)總控模塊設(shè)計(菜單):畫出菜單的顯示圖2.數(shù)據(jù)庫結(jié)構(gòu)的設(shè)計 a.數(shù)據(jù)庫表格: Student(Sno,Sclass,Ssex,Sdept,Sname,Spsw), Course(Cno,Cname), SC(Sno, Cno,Grade), denglu(us_id,us_name,us_psw), b. ER圖:學(xué)生姓名性別班級學(xué)號登錄密碼專業(yè)課程選課課程名稱課程編號管理員登錄密 碼編號登陸名3.系統(tǒng)的功能實現(xiàn)界面 1登錄界面:(用戶角色:學(xué)生和管理員) 學(xué)生登錄界面: 管理員登錄界面: 2學(xué)生模塊:(查詢個人的課程信息,個人信息,查詢各科的成績,修改登錄密碼,退出系統(tǒng)) 3管理員模塊:(編輯數(shù)據(jù),查詢數(shù)據(jù),統(tǒng)計數(shù)據(jù),密碼的設(shè)置與修改) 修改用戶密碼 編輯學(xué)生分?jǐn)?shù) 編輯分?jǐn)?shù)界面 各科平均分?jǐn)?shù)及比例 各學(xué)生的平均分?jǐn)?shù)4.系統(tǒng)的代碼(前臺和后臺)1學(xué)生界面的母版頁: 學(xué)分管理系統(tǒng)學(xué)生 .style1 .style2 height: 462px; width: 812px; .style4 width: 130px; .style5 width: 988px; height: 133px; #body background-color:White; border-bottom:0; width: 990px; height:135px; 張友愛 080104021130 計算機(jī)科學(xué)與技術(shù) 2班 2011年9月16日 2管理員界面的母版頁: 學(xué)分管理系統(tǒng)管理員 .style1 .style2 height: 462px; width: 812px; .style4 width: 130px; .style5 width: 988px; height: 133px; #body background-color:White; border-bottom:0; width: 990px; height:135px; 張友愛 080104021130 計算機(jī)科學(xué)與技術(shù) 2班 2011年9月16日 3登錄界面的關(guān)鍵代碼:public partial class _Default : System.Web.UI.Page protected void Page_Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e)/登錄按鈕觸發(fā)的事件 string type = userType.SelectedValue.ToString(); string user = userName.Text; string password = FormsAuthentication.HashPasswordForStoringInConfigFile(pwd.Text, MD5); string sel = ; switch (type) case 1: sel = select Sno from student where Sname= + user + and Spswd= + password + ; break; case 2: sel = select us_id from denglu where us_name= + user + and us_psw= + password + ; break; object body = dbConnection.MyExecuteScalar(sel); if (body = null) Page.ClientScript.RegisterStartupScript(this.GetType(), , alert(用戶名或密碼錯誤!);location.href=Default.aspx); else SessionuserID = body.ToString(); switch (type) case 1: Response.Redirect(student/student_index.aspx); break; case 2: Response.Redirect(admin/admin_index.aspx); break; protected void Button2_Click(object sender, EventArgs e)/重置按鈕觸發(fā)的事件 userName.Text = ; pwd.Text = ; 4學(xué)生修改個人密碼的后臺代碼: protected void tijiao_Click(object sender, EventArgs e)/提交按鈕觸發(fā)的事件 string pwd = FormsAuthentication.HashPasswordForStoringInConfigFile(this.txtoldpwd.Text, md5); /修改密碼 if (txtnewpwd2.Text.Trim() = txtnewpwd.Text.Trim() string newpwd = FormsAuthentication.HashPasswordForStoringInConfigFile(txtnewpwd.Text, md5); string sele = select count(Sno) from Student where Sno= + Convert.ToInt32(SessionuserID.ToString() + and Spswd= + pwd + ; int num = Convert.ToInt32(dbConnection.MyExecuteScalar(sele).ToString(); if (num 0) string chang = update Student set Spswd= + newpwd + where Sno= + Convert.ToInt32(SessionuserID.ToString(); if (dbConnection.insert(chang) Response.Write(alert(密碼修改成功!);); else Response.Write(alert(密碼修改失??!);); else Response.Write(alert(原始密碼不正確,請重新輸入!);); else Response.Write(alert(兩次密碼不匹配,請重新輸入!);); protected void btcancel_Click(object sender, EventArgs e)/取消修改 txtoldpwd.Text = ; txtnewpwd.Text = ; txtnewpwd2.Text = ; 5學(xué)生查看個人信息的后臺代碼:public partial class student_student_info : System.Web.UI.Page if (!IsPostBack) student stu = new student(); DataTable dt = new DataTable(); dt = CreateAdapter.getAdapter(select Sno,Sclass,Sdept,Ssex,Sname from Student where Sno= + Convert.ToInt32(SessionuserID.ToString(); stu.setSclass(dt.Rows01.ToString(); stu.setSdept(dt.Rows02.ToString(); stu.setSname(dt.Rows04.ToString(); stu.setSno(dt.Rows00.ToString(); stu.setSsex(dt.Rows03.ToString(); Session.Add(stu, stu); Sno.Text=stu.getSno(); Sclass.Text=stu.getSclass(); Ssex.Text=stu.getSsex(); Sname.Text=stu.getSname(); dept.Text=stu.getSdept(); 6學(xué)生查看課程的后臺代碼: protected void Page_Load(object sender, EventArgs e) string sql = select Cname,Course.Cno from Student,Course,SC where Student.Sno=SC.Sno and Course.Cno=SC.Cno and Student.Sno= + Convert.ToInt32(SessionuserID.ToString(); DataTable dt = new DataTable(); dt = CreateAdapter.getAdapter(sql); grid_course.DataSource = dt; grid_course.DataBind(); 7學(xué)生查看分?jǐn)?shù)的后臺代碼: protected void Page_Load(object sender, EventArgs e) string sql = select Cname,Grade from Student,Course,SC where Student.Sno=SC.Sno and Course.Cno=SC.Cno and Student.Sno=+Convert.ToInt32(SessionuserID.ToString(); DataTable dt = new DataTable(); dt = CreateAdapter.getAdapter(sql); grid_Sname.DataSource = dt; grid_Sname.DataBind(); 8管理員添加學(xué)生課程: protected void submit_Click(object sender, EventArgs e)/提交按鈕觸發(fā)的事件 string sql = insert into Course(Cno,Cname) + values(Cno,Cname); List parmeters = new List(); parmeters.Add(new SqlParameter(Cno, Cnumber.Text); parmeters.Add(new SqlParameter(Cname, Cname.Text); /dbConnection.MyExecuteScalar(sql); if (Boolean.Parse(dbConnection.insert(sql, parmeters).ToString() Response.Write(alert(添加成功);); else Response.Write(alert(添加失敗);); protected void Button1_Click(object sender, EventArgs e)/給新課添加學(xué)生按鈕觸發(fā)的事件 string sql = select Sno from Student; DataTable dt = CreateAdapter.getAdapter(sql); for (int i = 0; i dt.Rows.Count; i+) string sql1 = insert into SC(Sno,Cno,Grade) values(Sno,Cno,); List parmeters1 = new List(); parmeters1.Add(new SqlParameter(Cno, Cnumber.Text); parmeters1.Add(new SqlParameter(Sno, dt.Rowsi0); if (Boolean.Parse(dbConnection.insert(sql1, parmeters1).ToString() Response.Write(alert(添加成功);); else Response.Write(alert(添加失敗);); 9管理員添加學(xué)生: protected void add_Click(object sender, EventArgs e)/添加學(xué)生 string sql = insert into Student(Sno,Sname,Ssex,Sdept,Sclass,Spswd) + values(Sno,Sname,Ssex,Sdept,Sclass,Spswd); /string sql1=insert into SC() List parmeters = new List(); parmeters.Add(new SqlParameter(Sno, Snumber.Text); parmeters.Add(new SqlParameter(Sname, Sname.Text); parmeters.Add(new SqlParameter(Ssex, sex.Text); parmeters.Add(new SqlParameter(Sdept, dept.SelectedValue); parmeters.Add(new SqlParameter(Sclass, S_class.Text); parmeters.Add(new SqlParameter(Spswd, FormsAuthentication.HashPasswordForStoringInConfigFile(123, md5); if (Boolean.Parse(dbConnection.insert(sql, parmeters).ToString() Response.Write(alert(添加成功);); else Response.Write(alert(該學(xué)號已使用,添加失敗!請重新添加!);); protected void again_Click(object sender, EventArgs e)/重置按鈕觸發(fā)的事件 Snumber.T
溫馨提示
- 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)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025-2030中國智能炒菜機(jī)行業(yè)市場現(xiàn)狀供需分析及市場深度研究發(fā)展前景及規(guī)劃可行性分析研究報告
- 2025-2030中國時裝西服行業(yè)市場發(fā)展現(xiàn)狀及發(fā)展趨勢與投資方向研究報告
- 2025-2030中國數(shù)字銀行平臺(DBP)行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略研究報告
- 2025-2030中國戶外印花紡織品行業(yè)市場現(xiàn)狀分析及競爭格局與投資發(fā)展研究報告
- 2025-2030中國心理測試儀器行業(yè)發(fā)展分析及投資風(fēng)險預(yù)測研究報告
- 2025-2030中國尼龍襯里手套行業(yè)市場現(xiàn)狀分析及競爭格局與投資發(fā)展研究報告
- 2025年執(zhí)業(yè)藥師之中藥學(xué)綜合知識與技能全真模擬考試試卷A卷含答案
- 衛(wèi)生人力資源開發(fā)-洞察闡釋
- 2025-2030中國家用懷孕和排卵測試套件行業(yè)市場發(fā)展趨勢與前景展望戰(zhàn)略研究報告
- 2025-2030中國定量包裝機(jī)行業(yè)發(fā)展分析及投資前景預(yù)測研究報告
- 系統(tǒng)解剖學(xué)-肝臟、胰腺
- 2023年第四屆北京市大學(xué)生模擬法庭競賽第一輪賽題A
- GB/T 6109.1-2008漆包圓繞組線第1部分:一般規(guī)定
- GB/T 20721-2006自動導(dǎo)引車通用技術(shù)條件
- GB/T 12704.2-2009紡織品織物透濕性試驗方法第2部分:蒸發(fā)法
- 公眾責(zé)任險、財產(chǎn)一切險培訓(xùn)課件
- 2022山東高考語文答題卡(新高考I卷)word版3
- lovo操作手冊中文翻譯版-professorgong
- 有限空間作業(yè)氣體檢測記錄表
- 重力式降落救生艇的降落和釋放裝置課件
- 土地集約利用教學(xué)課件
評論
0/150
提交評論