Oracle數(shù)據(jù)庫課程設(shè)計報告學(xué)生成績管理系統(tǒng)樣本_第1頁
Oracle數(shù)據(jù)庫課程設(shè)計報告學(xué)生成績管理系統(tǒng)樣本_第2頁
Oracle數(shù)據(jù)庫課程設(shè)計報告學(xué)生成績管理系統(tǒng)樣本_第3頁
Oracle數(shù)據(jù)庫課程設(shè)計報告學(xué)生成績管理系統(tǒng)樣本_第4頁
Oracle數(shù)據(jù)庫課程設(shè)計報告學(xué)生成績管理系統(tǒng)樣本_第5頁
已閱讀5頁,還剩40頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

Oracle數(shù)據(jù)庫課程設(shè)計題目學(xué)生考試管理系統(tǒng)班級11網(wǎng)工2班姓名 馬路瑤 學(xué)號 指引教師 楊超峰 目錄前言…………………2需求分析……………3系統(tǒng)設(shè)計……………5數(shù)據(jù)庫設(shè)計…………7編程環(huán)節(jié)……………19 測試…………………25課程設(shè)計總結(jié)………33參照資料……………34附錄…………………34一、前言學(xué)生考試管理是一種學(xué)校必不可少某些,隨著計算機和計算機知識普及,學(xué)生考試管理系統(tǒng)得到了更大發(fā)展空間,通過對學(xué)生考試管理系統(tǒng)開發(fā),可以提高校務(wù)人員工作效率。學(xué)生成績管理是一種學(xué)校不可缺少某些,一種良好學(xué)生成績管理系統(tǒng)應(yīng)當(dāng)可覺得顧客提供充分信息和快捷查詢手段。學(xué)生考試管理系統(tǒng)對學(xué)校加強學(xué)生考試管理有著極其重要作用.由于各個大學(xué)都在持續(xù)擴招,學(xué)生數(shù)量日益龐大,對于如何管理如此龐大學(xué)生考試數(shù)據(jù)顯得更為復(fù)雜,老式手工成績管理不但工作量大,并且容易浮現(xiàn)問題,如:效率低、保密性差,此外時間一長,將產(chǎn)生大量文獻(xiàn)和數(shù)據(jù),這對于查找、更新和維護都帶來了不少困難。已不能適應(yīng)時代發(fā)展。隨著科學(xué)技術(shù)不斷提高,計算機科學(xué)日漸成熟,其強大功能已為人們深刻結(jié)識,它已進入人類社會各個領(lǐng)域并發(fā)揮著越來越重要作用。作為計算機應(yīng)用一某些,使用計算機對學(xué)生成績信息進行管理,具備手工管理所無法比擬長處。例:檢索迅速、查找以便、可靠性高、存儲量大、保密性好、壽命長、成本低等。這些長處可以極大地提高管理者管理效率,也是學(xué)校走向科學(xué)化、正規(guī)化管理,與世界接軌重要條件。因而,開發(fā)設(shè)計這樣一套學(xué)生成考試?yán)碥浖蔀楹苡斜匾虑?二、需求分析1.功能需求學(xué)生基本信息及所選科目成績錄入或?qū)搿;拘畔⒉樵儯ǚ窒?、班級;分科目)與修改。對每系或每班各科成績進行分析(即求單科平均成績、及格率和先進率);對所開課程成績分析(求其平均成績,最高分和最低分);對學(xué)生考試成績進行排名(單科按系別或班級進行排名,對每一種班級,同一學(xué)期學(xué)生總體成績進行排名,并顯示各科成績信息)不及格狀況記錄、導(dǎo)出、打印2.系統(tǒng)需求該學(xué)生成績管理系統(tǒng)采用java語言開發(fā)研制,JavaBean作為行為模型,servlet作為響應(yīng)服務(wù)器,DIV+CSS+javascript設(shè)計網(wǎng)頁,oracle作為數(shù)據(jù)存儲。在完畢顧客需求同步,完畢條件查詢等功能。針對學(xué)生成績及其數(shù)據(jù)特點,可以全面實現(xiàn)對學(xué)生成績插入、查詢、修改、刪除和輸出等功能計算機管理。它能使學(xué)生成績數(shù)據(jù)工作人員從繁重工作中解脫出來,大大減輕了工作量,減少人為工作失誤,全面提高學(xué)生成績管理效率,從而使學(xué)校對于學(xué)生成績管理水平和技術(shù)水平躍上一種新臺階。3.系統(tǒng)開發(fā)環(huán)境1.開發(fā)語言:java+jsp2.開發(fā)工具:IE8.0,Tomcat,jdk1.7,dreamweaver3.數(shù)據(jù)庫:Oracle10g4.文檔編寫工具:word5.服務(wù)器端運營環(huán)境:oracle10g,Tomcat,jdk1.76.客戶端運營環(huán)境:瀏覽器三、系統(tǒng)設(shè)計1.功能模塊學(xué)生學(xué)生考試管理系統(tǒng)信息錄入信息查詢信息修改信息刪除成績記錄分析班級信息錄入科目信息錄入學(xué)生信息錄入班級內(nèi)部排名按學(xué)號查詢按姓名查詢學(xué)生信息修改成績信息修改學(xué)生信息刪除成績信息刪除單科成績排名單科成績分析成績信息錄入不及格狀況記錄學(xué)生總成績排名2.系統(tǒng)流程圖開始開始登陸密碼對的?是否進入系統(tǒng)修改密碼控制面板退出系統(tǒng)?結(jié)束是否3.數(shù)據(jù)字典(1)數(shù)據(jù)存儲數(shù)據(jù)表:顧客表表構(gòu)成:顧客名,密碼數(shù)據(jù)項:顧客名數(shù)據(jù)類型:varchar數(shù)據(jù)長度:50數(shù)據(jù)項:密碼數(shù)據(jù)類型:varchar數(shù)據(jù)長度:50(2) 數(shù)據(jù)流定義:登陸名稱: 登陸簡述: 顧客登陸系統(tǒng)數(shù)據(jù)來源: 顧客數(shù)據(jù)去向:顧客表數(shù)據(jù)構(gòu)成:顧客名+密碼四、數(shù)據(jù)庫設(shè)計1.數(shù)據(jù)庫構(gòu)造設(shè)計院系表(cs)字段名數(shù)據(jù)類型與否為空闡明Cs_classVarchar2(50)Notnull班級名(主鍵)Cs_deptVarchar2(50)Notnull系別Cs_gradeVarchar2(50)Notnull年級成績表(gd)字段名數(shù)據(jù)類型與否為空闡明Gd_stu_noVarchar2(15)Notnull學(xué)號(聯(lián)合主鍵、外鍵)Gd_sub_subjectVarchar2(50)Notnull科目(聯(lián)合主鍵、外鍵)Gd_gradeNumber(3)Notnull成績科目表(sub)字段名數(shù)據(jù)類型與否為空闡明Sub_subjectVarchar2(50)Notnull科目名(主鍵)Sub_teacher_nameVarchar2(10)任課教師名學(xué)生表(student)字段名數(shù)據(jù)類型與否為空闡明Stu_noVarchar2(15)Notnull學(xué)號(主鍵)Stu_nameVarchar2(10)Notnull學(xué)生名Stu_cs_classVarchar2(50)班級名(外鍵)Stu_sexVarchar(4)Notnull性別(約束)Stu_birthdayVarchar2(50)出生日期Stu_phoneVarchar2(200)聯(lián)系電話顧客表(user_)字段名數(shù)據(jù)類型與否為空闡明nameVarchar2(50)Notnull顧客名(主鍵)PasswdVarchar2(50)notnull密碼2.實體聯(lián)系圖學(xué)生信息學(xué)生信息姓名出生日期性別學(xué)號聯(lián)系電話所在班級成績信息科目名學(xué)號成績教師顧客管理顧客名密碼班級信息班級名年級科目信息科目名任課教師系別管理管理管理3.數(shù)據(jù)庫源代碼selectuserenv('language')fromdual;

shutdownimmediate

startupmountALTERSYSTEMENABLERESTRICTEDSESSION;ALTERSYSTEMSETJOB_QUEUE_PROCESSES=0;ALTERSYSTEMSETAQ_TM_PROCESSES=0;ALTERDATABASEOPEN;alterdatabasecharactersetINTERNAL_USEUTF8;shutdownimmediatestartupcreateuserxzidentifiedbyxz/grantdbatoxz/connxz/xz/ setserveroutputon/createtableuser_(namevarchar(50)primarykey,passwdvarchar(50)notnull)/insertintouser_values('xz','xz');/Commit/createtablecs(cs_classvarchar(50)primarykey,cs_deptvarchar(50)notnull,cs_gradevarchar(50)notnull)/createtablestudent(stu_novarchar(15)primarykey,stu_namevarchar(10)notnull,stu_sexvarchar(4)notnullcheck(stu_sex='男'orstu_sex='女'),stu_birthdayvarchar(50),stu_phonevarchar(50),stu_cs_classvarchar(50),constraintclass_fkforeignkey(stu_cs_class)referencescs(cs_class)ondeletecascade)/createtablesub(sub_subjectvarchar(50)primarykey,sub_teacher_namevarchar(10))/createtablegd(gd_stu_novarchar(15),gd_sub_subjectvarchar(50),gd_gradenumber(3)notnull,primarykey(gd_stu_no,gd_sub_subject),constraintfk_gd_stu_noforeignkey(gd_stu_no)referencesstudent(stu_no),constraintfk_gd_sub_subjectforeignkey(gd_sub_subject)referencessub(sub_subject))/createorreplaceprocedurep_insert_stu(p_stu_noinstudent.stu_no%type,p_stu_nameinstudent.stu_name%type,p_stu_sexinstudent.stu_sex%type,p_stu_birthdayinstudent.stu_birthday%type,p_stu_phoneinstudent.stu_phone%type,p_stu_cs_classinstudent.stu_cs_class%type,s_state_valuesoutnumber)asbegin insertintostudent (stu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class) values(p_stu_no,p_stu_name,p_stu_sex,p_stu_birthday,p_stu_phone,p_stu_cs_class);ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;commit;end;/createorreplaceprocedurec_insert_stu(c_stu_noinstudent.stu_no%type,c_state_valuesoutnumber)asbeginselectcount(*)intoc_state_valuesfromstudentwherestu_no=c_stu_no;end;/createorreplaceprocedurec_insert_stu_fk(c_cs_classincs.cs_class%type,c_state_values_fkoutnumber)asbeginselectcount(*)intoc_state_values_fkfromcswherecs_class=c_cs_class;end;/createorreplaceprocedurep_insert_cs(p_cs_deptincs.cs_dept%type,p_cs_gradeincs.cs_grade%type,p_cs_classincs.cs_class%type,s_state_valuesoutnumber)asbegininsertintocs(cs_dept,cs_grade,cs_class)values(p_cs_dept,p_cs_grade,p_cs_class);ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;commit;end;/createorreplaceprocedurec_insert_cs(c_cs_classincs.cs_class%type,c_state_valuesoutnumber)asbeginselectcount(*)intoc_state_valuesfromcswherecs_class=c_cs_class;end;/createorreplaceprocedurep_insert_sub(p_sub_subjectinsub.sub_subject%type,p_sub_teacher_nameinsub.sub_teacher_name%type,s_state_valuesoutnumber)asbegininsertintosub(sub_subject,sub_teacher_name)values(p_sub_subject,p_sub_teacher_name);ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;commit;end;/createorreplaceprocedurec_insert_sub(c_sub_subjectinsub.sub_subject%type,c_state_valuesoutnumber)asbeginselectcount(*)intoc_state_valuesfromsubwheresub_subject=c_sub_subject;end;/createorreplaceprocedurep_insert_gd(p_gd_stu_noingd.gd_stu_no%type,p_gd_sub_subjectingd.gd_sub_subject%type,p_gd_gradeingd.gd_grade%type,s_state_valuesoutnumber)asbegininsertintogd(gd_stu_no,gd_sub_subject,gd_grade)values(p_gd_stu_no,p_gd_sub_subject,p_gd_grade);ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;ifp_gd_grade=nullthens_state_values:=2;endif;commit;end;/createorreplaceprocedurec_insert_gd(p_gd_stu_noingd.gd_stu_no%type,p_gd_sub_subjectingd.gd_sub_subject%type,c_state_valuesoutnumber)asbeginselectcount(*)intoc_state_valuesfrom(selectgd_stu_nofromgdwheregd_sub_subject=p_gd_sub_subject)wheregd_stu_no=p_gd_stu_no;end;/createorreplaceprocedurec_insert_gd_fk1(c_stu_noinstudent.stu_no%type,c_state_values_fk1outnumber)asbeginselectcount(*)intoc_state_values_fk1fromstudentwherestu_no=c_stu_no;end;/createorreplaceprocedurec_insert_gd_fk2(c_sub_subjectinsub.sub_subject%type,c_state_values_fk2outnumber)asbeginselectcount(*)intoc_state_values_fk2fromsubwheresub_subject=c_sub_subject;end;/createorreplaceprocedurep_select_stu_no_info(p_stu_noinoutstudent.stu_no%type,p_stu_nameoutstudent.stu_name%type,p_stu_sexoutstudent.stu_sex%type,p_stu_birthdayoutstudent.stu_birthday%type,p_stu_phoneoutstudent.stu_phone%type,p_stu_cs_classoutstudent.stu_cs_class%type,p_cs_deptoutcs.cs_dept%type,p_cs_gradeoutcs.cs_grade%type,c_state_valuesoutnumber)asbeginc_state_values:=0;selectstu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class,cs_dept,cs_gradeintop_stu_no,p_stu_name,p_stu_sex,p_stu_birthday,p_stu_phone,p_stu_cs_class,p_cs_dept,p_cs_gradefromstudent,cswherestu_cs_class=cs_classandstu_no=p_stu_no;exceptionwhenNO_DATA_FOUNDthenc_state_values:=1;whenothersthenc_state_values:=2;end;/createorreplaceprocedurep_select_stu_no_gd(p_stu_noinstudent.stu_no%type,cursor_gdoutsys_refcursor)asbeginopencursor_gdforselectgd_sub_subject,gd_gradefromgdwheregd_stu_no=p_stu_no;end;/createorreplaceprocedurep_select_stu_name(p_stu_nameinstudent.stu_name%type,cursor_stuoutsys_refcursor,c_state_valuesoutnumber)asbeginc_state_values:=0;opencursor_stuforselectstu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class,cs_dept,cs_gradefromstudent,cswherestu_name=p_stu_nameandstu_cs_class=cs_class;exceptionwhenothersthenc_state_values:=2;end;/createorreplaceprocedurep_pm_sum(cursor_gd_sumoutsys_refcursor)asbeginopencursor_gd_sumforselectdistinctsno,stu_name,sumfromstudent,(selectgd_stu_noassno,sum(gd_grade)assumfromgdgroupbygd_stu_no)wherestu_no=snoorderbysumdesc;end;/createorreplaceprocedurep_pm_sub(p_gd_sub_subjectingd.gd_sub_subject%type,cursor_gd_suboutsys_refcursor)asbeginopencursor_gd_subforselectgd_stu_no,stu_name,gd_gradefromgd,studentwheregd_sub_subject=p_gd_sub_subjectandstu_no=gd_stu_noorderbygd_gradedesc;end;/createorreplaceprocedurep_pm_class(p_stu_cs_classinstudent.stu_cs_class%type,cursor_gd_classoutsys_refcursor)asbeginopencursor_gd_classforselectdistinctsno,stu_name,sumfromstudent,(selectgd_stu_noassno,sum(gd_grade)assumfromgdgroupbygd_stu_no)wherestu_no=snoandstu_cs_class=p_stu_cs_classorderbysumdesc;end;/createorreplaceprocedurep_fx(cursor_fxoutsys_refcursor)asbeginopencursor_fxforselectgd_sub_subject,max(gd_grade)aszuigao,min(gd_grade)aszuidi,avg(gd_grade)aspingjun,SUM(CASEWHENgd_grade>=60THEN1ELSE0END)/COUNT(*)*100ASjigelv,SUM(CASEWHENgd_grade>=80THEN1ELSE0END)/COUNT(*)*100ASyouxiulvfromgdgroupbygd_sub_subject;end;/createorreplaceprocedurep_bujige(cursor_bujigeoutsys_refcursor)asbeginopencursor_bujigeforselectgd_stu_no,gd_sub_subject,gd_gradefromgdwheregd_grade<60;end;/createorreplaceprocedurep_update_stu(p_stu_noinstudent.stu_no%type,p_stu_nameinstudent.stu_name%type,p_stu_sexinstudent.stu_sex%type,p_stu_birthdayinstudent.stu_birthday%type,p_stu_phoneinstudent.stu_phone%type,p_stu_cs_classinstudent.stu_cs_class%type,s_state_valuesoutnumber)asbegin updatestudent setstu_name=p_stu_name,stu_sex=p_stu_sex,stu_birthday=p_stu_birthday,stu_phone=p_stu_phone,stu_cs_class=p_stu_cs_classwherestu_no=p_stu_no; ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;commit;end;/createorreplaceprocedurep_delete_stu(p_stu_noinstudent.stu_no%type,s_state_valuesoutnumber)asbegindeletefromgdwheregd_stu_no=p_stu_no;deletefromstudentwherestu_no=p_stu_no;s_state_values:=0;exception whenothersthens_state_values:=1;rollback;commit;end;/createorreplaceprocedurep_update_gd(p_gd_stu_noingd.gd_stu_no%type,p_gd_sub_subjectingd.gd_sub_subject%type,p_gd_gradeingd.gd_grade%type,s_state_valuesoutnumber)asbeginupdategdsetgd_stu_no=p_gd_stu_no,gd_sub_subject=p_gd_sub_subject,gd_grade=p_gd_gradewheregd_stu_no=p_gd_stu_noandgd_sub_subject=p_gd_sub_subject;ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;rollback;commit;end;/createorreplaceprocedurep_delete_gd(p_gd_stu_noingd.gd_stu_no%type,p_gd_sub_subjectingd.gd_sub_subject%type,s_state_valuesoutnumber)asbegindeletefromgdwheregd_stu_no=p_gd_stu_noandgd_sub_subject=p_gd_sub_subject;ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;rollback;commit;end;/createorreplaceprocedurep_denglu(p_nameinuser_.name%type,p_passwdinuser_.passwd%type,s_state_valuesoutnumber)asbeginselectcount(*)intos_state_valuesfromuser_wherename=p_nameandpasswd=p_passwd;end;/createorreplaceprocedurep_update_passwd(p_nameinuser_.name%type,p_passwdinuser_.passwd%type,s_state_valuesoutnumber)asbeginupdateuser_setpasswd=p_passwdwherename=p_name;ifsql%rowcount=1thens_state_values:=0;endif;exception whenothersthens_state_values:=1;rollback;commit;end;/createorreplaceprocedurep_select_no(cursor_stu_nooutsys_refcursor)asbeginopencursor_stu_noforselectstu_nofromstudentorderbystu_no;end;/createorreplaceprocedurep_select_all(cursor_alloutsys_refcursor)asbeginopencursor_allforselectstu_no,stu_name,stu_sex,stu_birthday,stu_phone,stu_cs_class,cs_dept,cs_gradefromstudent,cswherestu_cs_class=cs_classorderbystu_no;end;/createorreplaceprocedurep_select_count(myrowcountoutnumber)asbeginselectcount(*)intomyrowcountfromstudent;end;/五、編程環(huán)節(jié)1.連接數(shù)據(jù)庫javabean由于在本系統(tǒng)各種JSP頁面中都需要訪問數(shù)據(jù)庫,因而使用一種JavaBean來專門完畢數(shù)據(jù)庫連接。把數(shù)據(jù)庫連接封裝在一種類中,每次需要訪問數(shù)據(jù)庫是只需實例化這個類并運用類里面提供共有辦法來完畢連接即可。這樣,既可以節(jié)約編碼時間,也提高了代碼運用率。1.1模塊描述負(fù)責(zé)完畢與數(shù)據(jù)庫連接1.2.類設(shè)計與實現(xiàn)(1)名稱:jdbc.java(2)功能:負(fù)責(zé)完畢與數(shù)據(jù)庫連接。1.3構(gòu)造辦法設(shè)計1.3.1①辦法定義:publicjdbc()②IPO圖輸入:無。解決:加載驅(qū)動程序,若加載中浮現(xiàn)異常,則顯示異常描述信息。輸出:無。③程序清單:publicclassjdbc{ privatestaticfinalStringDB_NAME="xz"; privatestaticfinalStringDB_PASSWORD="xz"; privatestaticfinalStringDB_URL="jdbc:oracle:thin:@localhost:1521:orcl"; static{ try{ Class.forName("oracle.jdbc.driver.OracleDriver"); }catch(ClassNotFoundExceptione){ e.printStackTrace(); System.out.println("classnotfound!!"); } }1.3.2 ①辦法定義:publicgetConnection()②IPO圖輸入:無。解決:創(chuàng)立驅(qū)動程序和指定數(shù)據(jù)庫間連接對象,建立語句對象輸出:無。③程序清單: publicstaticConnectiongetConnection(){ try{ returnDriverManager.getConnection(DB_URL,DB_NAME,DB_PASSWORD); }catch(SQLExceptione){ e.printStackTrace(); } returnnull; }2.登陸模塊 2.1.模塊描述 提供顧客登錄、退出、修改密碼功能。 2.2.原文獻(xiàn)定義 (1)denglu.jsp名稱:登陸頁面。功能:系統(tǒng)登錄頁面,獲取顧客登錄系統(tǒng)時顧客名和密碼。(2)cl-denglu.jsp名稱:登錄解決頁面。功能:重要負(fù)責(zé)讀取顧客在登錄頁面輸入顧客名、密碼,判斷與否為合法顧客。若是合法顧客,則將該顧客顧客名寫入到session中,并重定向到系統(tǒng)內(nèi)部功能頁面;否則,重定向到denglu.jsp,制止該顧客進入系統(tǒng)。 輸入:顧客在登錄頁面輸入信息(顧客名和密碼)。解決:連接數(shù)據(jù)庫,調(diào)用存儲過程p_denglu,傳入?yún)?shù)name、password,接受存儲過程返回值s_state_values,如果返回值為1則為合法顧客,將該顧客顧客名寫入到session中,并重定向到系統(tǒng)主頁面index.jsp;否則,彈出錯誤警告顧客名密碼錯誤,重定向到denglu.jsp,制止該顧客進入系統(tǒng)。 輸出:依照驗證成果重定向到不同頁面。 程序清單:<%Connectionconn=jdbc.getConnection();Stringj_name=request.getParameter("j_name");Stringj_passwd=request.getParameter("j_passwd");CallableStatementcstmt1=conn.prepareCall("{callp_denglu(?,?,?)}"); cstmt1.setString(1,j_name); cstmt1.setString(2,j_passwd); cstmt1.registerOutParameter(3,java.sql.Types.INTEGER);cstmt1.execute();ints_state_values=(cstmt1.getInt(3));if(s_state_values==1){session.setAttribute("user_name",j_name);response.sendRedirect("index.jsp");}elseif(s_state_values==0)out.println("<script>alert(\"顧客名密碼錯誤!\");location.href=\"denglu.jsp\"</script>");cstmt1.close();conn.close();%>(3)tuichu.jsp名稱:顧客退出頁面功能:重要負(fù)責(zé)登錄顧客退出功能,將退出系統(tǒng)顧客信息從session中清除掉。 輸入:無。 解決:清晰session中存儲一切信息輸出:重定向到登錄也頁面。程序清單:<%session.invalidate();response.sendRedirect("denglu.jsp");%>(4)xg-mm.jsp名稱:修改密碼頁面功能:重要負(fù)責(zé)登錄顧客修改密碼,將顧客密碼傳給cl-xgmm.jsp。(5)cl-xg-mm.jsp名稱:解決修改密碼頁面功能:重要負(fù)責(zé)登錄顧客修改密碼功能,一方面驗證兩次輸入新密碼與否一致,然后調(diào)用存儲過程p_denglu驗證原密碼與否對的,最后調(diào)用存儲過程p_update_passwd修改密碼。程序清單:<%Connectionconn=jdbc.getConnection();Stringj_name=request.getParameter("j_name");Stringj_passwd=request.getParameter("j_passwd");Stringj_passwd_new1=request.getParameter("j_passwd_new1");Stringj_passwd_new2=request.getParameter("j_passwd_new2");if(j_passwd_new1.equals(j_passwd_new2)){CallableStatementcstmt1=conn.prepareCall("{callp_denglu(?,?,?)}"); cstmt1.setString(1,j_name); cstmt1.setString(2,j_passwd); cstmt1.registerOutParameter(3,java.sql.Types.INTEGER);cstmt1.execute();ints_state_values=(cstmt1.getInt(3));if(s_state_values==1){CallableStatementcstmt2=conn.prepareCall("{callp_update_passwd(?,?,?)}"); cstmt2.setString(1,j_name); cstmt2.setString(2,j_passwd_new1); cstmt2.registerOutParameter(3,java.sql.Types.INTEGER);cstmt2.execute();ints_state_values2=(cstmt2.getInt(3));if(s_state_values2==0){out.print("恭喜你,密碼修改成功!");}else{out.print("密碼修改失?。?);}}elseif(s_state_values==0)out.print(" 原名密碼錯誤!請重新填寫");cstmt1.close();cstmt2.close();conn.close();}else{out.print("兩次輸入密碼不一致,請重新輸入!");}%>3.控制面板模塊3.1.模塊描述 提供信息錄入、查詢、修改、刪除、成績記錄分析功能。 3.2.原文獻(xiàn)定義源代碼詳見附件(1)lr-cs.jsp名稱:錄入班級信息頁面。功能:錄入班級信息。(2)cl-lr-cs.jsp名稱:解決錄入班級信息頁面。功能:錄入班級信息。(3)lr-sub.jsp名稱:錄入科目信息頁面。功能:錄入科目信息。(4)cl-lr-sub.jsp名稱:解決錄入科目信息頁面。功能:錄入科目信息。(5)lr-stu.jsp名稱:錄入學(xué)生信息頁面。功能:錄入學(xué)生信息。(6)cl-lr-stu.jsp名稱:解決錄入學(xué)生信息頁面。功能:錄入學(xué)生信息。(7)lr-gd-sub.jsp名稱:錄入成績信息選取科目頁面。功能:錄入成績信息。(8)lr-gd.jsp名稱:錄入成績信息頁面。功能:錄入成績信息。(9)cl-lr-stu.jsp名稱:解決錄入成績

溫馨提示

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

最新文檔

評論

0/150

提交評論