大二下12c個人項目_第1頁
大二下12c個人項目_第2頁
大二下12c個人項目_第3頁
大二下12c個人項目_第4頁
大二下12c個人項目_第5頁
已閱讀5頁,還剩35頁未讀 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

目錄緒 目錄緒 課題背 課題研究現(xiàn) 課題研究的意 文檔的內(nèi) 需求分 需求陳 業(yè)務(wù)流 系統(tǒng)設(shè) 系統(tǒng)功能設(shè) 數(shù)據(jù)庫設(shè) 系統(tǒng)實 登陸界 選擇考試界 計算機考試界 后臺管理界 試題管理界 結(jié) 11Interent的模擬考試系統(tǒng)1996美國的NTU、英國的OPENCOLLEGE都是當(dāng)時十分典型的網(wǎng)絡(luò)教育示22333-11233-11234表3-312345671234512345表3-3123456712345123453-43-53-612123456712343-43-53-6121234567123456744在線考試namespace{publicpartialclassfrmLogin:{public{}privatevoidbtnReturn_Click(objectsender,EventArgs{{publicpartialclassfrmLogin:{public{}privatevoidbtnReturn_Click(objectsender,EventArgs{}privatevoidbtnLogin_Click(objectsender,EventArgs{if(txtUserName.Text.Trim()=={}if(txtUserPwd.Text.Trim()=={}DBHelperdb=newstringQuery="select*fromexamUserInfowhere+"examUserName='"++"'andexamUserPwd='"+txtUserPwd.Text+"'";SqlDataReaderdr=db.MyQuery(Query);if{stringQuery1="selectexamUserRightfromexamUserInfo"+"examUserName='"+txtUserName.Text+"'";SqlDataReaderdr1=db.MyQuery(Query1);if{if(dr1["examUserRight"].ToString().Trim(){frmUserMainfUserMain=newfrmUserMain();fUserMain.UserName=txtUserName.Text;fUserMain.UserPwd=txtUserPwd.Text;}elseif(dr1["examUserRight"].ToString().Trim(){frmManageMainfUserMain.UserPwd=txtUserPwd.Text;}elseif(dr1["examUserRight"].ToString().Trim(){frmManageMainfManageMain=newfrmManageMain();fManageMain.UserName=txtUserName.Text;fManageMain.UserPwd=txtUserPwd.Text;}}}{}}privatevoidbtnAdd_Click(objectsender,{frmRegisterfRegister=newfrmRegister();}}}namespace{publicpartialclassfrmUserMain:{publicstringstring{}EventArgse){frmUpdatePwdpublicstringstring{}EventArgse){frmUpdatePwdfUpdate=newfrmUpdatePwd();fUpdate.UserName=this.UserName;fUpdate.UserPwd=this.UserPwd;}EventArgse){frmCompTestfCompTest=newfrmCompTest();fCompTest.UserName=this.UserName;}{frmQueryfQuery=new}privatevoidEToolStripMenuItem_Click(objectsender,EventArgs{}privatevoidEToolStripMenuItem_Click(objectsender,EventArgs{}{=}}namespace{publicpartialclass{:namespace{publicpartialclass{:{CNO=newContent=newKeyA====newuserAnswer=newintNumber=0;intScore=0;string}publicinttime=privatevoidbutton1_Click(objectsender,EventArgs{txtTimer.Text=GetTime(time);button1.Enabled=false;DBHelperdb=newDBHelper();stringdelTest="deletefromexamTestprivatevoidbutton1_Click(objectsender,EventArgs{txtTimer.Text=GetTime(time);button1.Enabled=false;DBHelperdb=newDBHelper();stringdelTest="deletefromexamTest";stringdelAnswer="deletefromexamUserAnswerselecttop*stringaddTest="insertintoexamTestexamEngRadioInfoorderbyNEWID()"; examTest.CNO,nullfromexamTeststringQueryTest="select*fromexamTestSqlDataReaderdr=db.MyQuery(QueryTest);inti=0;while{CNO[i]=dr["CNO"].ToString();Content[i]=dr["Content"].ToString();=====}i=}privatevoidtimer1_Tick(objectsender,{time-=txtTimer.Text=(time=={for(inti=0;i<=19;privatevoidtimer1_Tick(objectsender,{time-=txtTimer.Text=(time=={for(inti=0;i<=19;{if(userAnswer[i]=={Score+=}{}}DBHelperdb=newstringnow==examUserScore(examUserName,examType,examUserScore,examUserTime)"valuesUserNameScore+frmUserMainfUserMain=newfrmUserMain();}}publicstringGetTime(int{stringmm,intm/%=<intif{mm=0}{mm=}intm/%=<intif{mm=0}{mm=}if(s<{=0+}{=}mm+":"+}publicvoidShowChoose(inti)//{rrtbContent.Text=rbtnKeyA.Text===}privatevoid{sender,EventArgstxtName.Text=}privatevoidbtnFirst_Click(objectsender,EventArgs{Number=0;}privatevoidbtnLast_Click(objectsender,EventArgstxtName.Text=}privatevoidbtnFirst_Click(objectsender,EventArgs{Number=0;}privatevoidbtnLast_Click(objectsender,EventArgs{Number=19;}sender,EventArgsprivatevoid{if(Number=={}{}}sender,EventArgsprivatevoid{if(Number=={}{}}privatevoid{userAnswer[Number]="A";DBHelperdb=new}{}}privatevoid{userAnswer[Number]="A";DBHelperdb=newDBHelper();sender,EventArgs"stringupdate="updateexamUserAnswerset+"whereCNO='"+CNO[Number]+"'";}privatevoidrbtnKeyB_Click(objectsender,EventArgs{userAnswer[Number]="B";DBHelperdb=newDBHelper();stringupdate="updateexamUserAnswerset+"whereCNO='"+CNO[Number]+"'";}"privatevoidrbtnKeyC_Click(objectsender,EventArgs{userAnswer[Number]="C";DBHelperdb=newDBHelper();stringupdate="updateexamUserAnswerset"+"whereCNO='"+CNO[Number]+}privatevoidrbtnKeyD_Click(objectsender,EventArgs{userAnswer[Number]="D";DBHelperdb=newDBHelper();stringupdate="updateexamUserAnswerset+"whereCNO='"+"whereCNO='"+CNO[Number]+}privatevoidrbtnKeyD_Click(objectsender,EventArgs{userAnswer[Number]="D";DBHelperdb=newDBHelper();stringupdate="updateexamUserAnswerset+"whereCNO='"+CNO[Number]+"'";}"voidbtnSubmit_Click(object{{(inti=0;i<=19;if(userAnswer[i]=={Score+=}{}}DBHelperdb=newstringnow==examUserScore(examUserName,examType,examUserScore,examUserTime)+"values('"+UserName+"','英語',"+ScorefrmUserMainfUserMain=new+now}}}}}}usingusingnamespace{publicpartialclassfrmManageMain:{usingusingnamespace{publicpartialclassfrmManageMain:{{stringUserName;stringUserPwd;}privatevoid{}sender,EventArgsEventArgse){frmAddManagefAddManage=new}{frmDeleteUserfDeleteUser=newfrmDeleteUser();}{frmQueryUserfQueryUser=new{frmQueryUserfQueryUser=newfrmQueryUser();}privatevoidsender,{frmUpdatePwdfUpdatePwd=newfrmUpdatePwd();fUpdatePwd.UserName=this.UserName;fUpdatePwd.UserPwd=this.UserPwd;}EventArgsprivatevoidtoolStripMenuItem1_Click(object{frmManageRadiofManageRadio=newfrmManageRadio();}}}namespacenamespace{publicpartialclassfrmManageRadio:{public{}privatevoidfrmManageRadio_Load(objectsender,EventArgs{if(cbbSubject.Text{SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,"+"KeyAas選項A,KeyBas選項B,KeyCas選項C,KeyDas選項D,Answeras答案from"+"examCompRadioInfo",conn);DataSetds=newDataSet();dataGridView1.DataSource=}elseif(cbbSubject.Text{SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,"+"KeyAas選項A,KeyBas選項B,KeyCas選項C,KeyDas選項D,Answeras答案from"+"examEngRadioInfo",conn);DataSetds=newDataSet();dataGridView1.DataSource=}}DataGridViewCellEventArgs{=======}privatevoidbtnReturn_Click(objectsender,{frmManageMainfManageMain}DataGridViewCellEventArgs{=======}privatevoidbtnReturn_Click(objectsender,{frmManageMainfManageMain=newfrmManageMain();}privatevoidbtnAdd_Click(objectsender,EventArgs{(txtCNO.Text.Trim()=={}if(txtAnswer.Text.Trim()=={}{(rtbContent.Text.Trim()==}{(rtbKeyA.Text.Trim()==}{(rtbKeyB.Text.Trim()==}{(rtbKeyC.Text.Trim()==}{(rtbKeyA.Text.Trim()==}{(rtbKeyB.Text.Trim()==}{(rtbKeyC.Text.Trim()==}{(rtbKeyD.Text.Trim()==}{(cbbSubject.TextDBHelperdb=newstringQueryCno="select*fromexamCompRadioInfoSqlDataReaderdr=db.MyQuery(QueryCno);if(dr.Read()){}{where+txtCNO.TextstringQueryContent="Select*fromexamCompRadioInfowhereContent='"+rtbContent.Text+"'";dr=db.MyQuery(QueryContent);if(dr.Read()){DialogResultresultMessageBox.Show("已存在相同內(nèi)容試題,是否仍要添加試題?","提示",MessageBoxButtons.YesNo,if(result=={stringaddTest="insertinto++"','"+if(result=={stringaddTest="insertinto++"','"++"','"+rtbKeyA.Text+"','"++"','"rtbKeyC.Text+"','"+rtbKeyD.Text+"','"+txtAnswer.Text+"')";frmManageRadio_Load(sender,}{}}{string= ++"','"++"','"+rtbKeyA.Text+"','"+rtbKeyB.Text"','"+rtbKeyC.Text+"','"+rtbKeyD.Text+"','"+txtAnswer.Text+}}}elseif(cbbSubject.Text{DBHelperdb=newwherestringQueryCno="select*fromexamEngRadioInfoSqlDataReaderdr=db.MyQuery(QueryCno);if(dr.Read()){}{+txtCNO.TextstringQueryContent="Select*fromexamEngRadioInfowhereContent='"+rtbContent.Text+"'";dr=db.MyQuery(QueryContent);if(dr.Read()){DialogResultresultMessageBox.Show("已存在相同內(nèi)容試題,是否仍要添加試題?","提示",MessageBoxButtons.YesNo,if(result=={stringaddTest=dr=db.MyQuery(QueryContent);if(dr.Read()){DialogResultresultMessageBox.Show("已存在相同內(nèi)容試題,是否仍要添加試題?","提示",MessageBoxButtons.YesNo,if(result=={stringaddTest="insertinto++"','"++"','"+rtbKeyA.Text+"','"++"','"rtbKeyC.Text+"','"+rtbKeyD.Text+"','"+txtAnswer.Text+"')";frmManageRadio_Load(sender,}{}}{ = ++"','"++"','"+rtbKeyA.Text"','"+rtbKeyB.Text"','"+rtbKeyC.Text+"','"+rtbKeyD.Text+"','"+txtAnswer.Text+}}}}privatevoidcbbSubject_SelectedValueChanged(objectsender,{if(cbbSubject.Text{SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=new號,Contentas題目內(nèi)容,"+"KeyAas選項A,KeyBasD,AnswerasfromexamCompRadioInfoDataSetds=newSqlDataAdapter("selectSqlDataAdapterda=new號,Contentas題目內(nèi)容,"+"KeyAas選項A,KeyBasD,AnswerasfromexamCompRadioInfoDataSetds=newSqlDataAdapter("selectCNOas選項B,KeyCas選項C,KeyDas選項da.Fill(ds,"examCompRadioInfo");dataGridView1.DataSource=ds.Tables[0];}elseif(cbbSubject.Text{SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,"+"KeyAas選項A,KeyBas選項B,KeyCas選項C,KeyDas選項D,Answeras答案fromexamEngRadioInfo",conn);DataSetds=newDataSet();dataGridView1.DataSource=}}privatevoidbtnQuery_Click(objectsender,EventArgs{if(cbbSubject.Text{if(txtQueryStr.Text.Trim()=={SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=new號,Contentas題目內(nèi)容,""KeyAasA,KeyBasD,Answeras答案from"+"examCompRadioInfoSqlDataAdapter("selectCNOas題選項B,KeyCas選項C,KeyDasDataSetds=newDataSet();dataGridView1.DataSource=}{SqlConnectionconn=newconn.ConnectionString=conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,""KeyAasA,KeyBasB,KeyCasC,KeyDasD,Answeras答案from"+"examCompRadioInfowhereCNO='"+txtQueryStr.Text+DataSetds=newDataSet();dataGridView1.DataSource=}}elseif(cbbSubject.Text{if(txtQueryStr.Text.Trim()=={SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,""KeyAasA,KeyBasB,KeyCasC,KeyDasD,Answeras答案from"+"examEngRadioInfo",conn);DataSetds=newDataSet();dataGridView1.DataSource=}{SqlConnectionconn=newSqlConnection();conn.ConnectionString=DBHelper.getConnectionString();SqlDataAdapterda=newSqlDataAdapter("selectCNOas題號,Contentas題目內(nèi)容,""KeyAasA,KeyBasB,KeyCasC,KeyDasD,Answeras答案from"+"examEngRadioInfowhereCNO='"+txtQueryStr.Text+DataSetds=newDataSet();dataGridView1.DataSource=}}privatevoidbtnDel_Click(objectsender,EventArgs{if(txtCNO.Text.Trim()=={}if(cbbSubject.Text{}}privatevoidbtnDel_Click(objectsender,EventArgs{if(txtCNO.Text.Trim()=={}if(cbbSubject.Text{DBHelperdb=newstringQuery="select*fromexamCompRadioInfowhere+txtCNO.Text+SqlDataReaderdr=db.MyQuery(Query);if(dr.Read()){DialogResultresultMessageBox.Show("是否刪除該條記錄的"提示",MessageBoxButtons.YesNo,if(result=={stringnonQuery="deletefrom+txtCNO.Text+"'";txtQueryStr.Text="";frmManageRadioLoad(sender,e);}{}}{}}elseif(cbbSubject.Text{DBHelperdb=newstringQuery="select*fromexamEngRadioInfowhere+txtCNO.Text+SqlDataReaderdr={DBHelperdb=newstringQuery="select*fromexamEngRadioInfowhere+txtCNO.Text+SqlDataReaderdr=db.MyQuery(Query);if(dr.Read()){DialogResultresultMessageBox.Show("是否刪除該條記錄的"提示",MessageBoxButtons.YesNo,if(result=={stringnonQuery="deletefrom+txtCNO.Text+"'";txtQueryStr.Text="";frmManageRadio_Load(sender,e);}{}}{}}}voidbtnUpdate_Click(objectsender,{if(txtCNO.Text.Trim()=={}if(txtAnswer.Text.Trim()=={}{(rtbContent.Text.Trim()==}{(rtbKeyA.Text.Trim()==}{}{(rtbContent.Text.Trim()==}{(rtbKeyA.Text.Trim()==}{(rtbKeyB.Text.Trim()==}{(cbbSubject.TextDBHelperdb=newstringQueryCno="select*fromexamCompRadioInfowhere+txtCNO.Text+SqlDataReaderdr=db.MyQuery(QueryCno);if(!dr.Read()){}{DialogResultresultMessageBox.Show("確認(rèn)修改試題?","提示",MessageBoxButtons.YesNo,==if{updateContent="updatesetContent='"+rtbContent.Text+"'whereCNO='"+txtCNO.Text+stringupdateKeyA="updateexamCompRadioInfosetKeyA='"+rtbKeyA.Text+"'whereCNO='"+txtCNO.Text+"'";stringupdateKeyB="updateexamCompRadioInfowhereCNO='"+txtCNO.Text+"'";stringupdateKeyC="updateexamCompRadioInfowhereCNO='"+txtCNO.Te

溫馨提示

  • 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

提交評論