培訓班學員信息管理系統(tǒng)_第1頁
培訓班學員信息管理系統(tǒng)_第2頁
培訓班學員信息管理系統(tǒng)_第3頁
培訓班學員信息管理系統(tǒng)_第4頁
培訓班學員信息管理系統(tǒng)_第5頁
已閱讀5頁,還剩43頁未讀, 繼續(xù)免費閱讀

下載本文檔

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

文檔簡介

西南大學網(wǎng)絡(luò)教育學院畢業(yè)設(shè)計西南大學網(wǎng)絡(luò)教育學院畢業(yè)設(shè)計共共46頁第#頁fMainForm.addcourseMenu.Enabled=FalsefMainForm.addresultMenu.Enabled=FalsefMainForm.addsinfoMenu.Enabled=FalsefMainForm.adduserMenu.Enabled=FalsefMainForm.modifycinfoMenu.Enabled=FalsefMainForm.modifycourseMenu.Enabled=FalsefMainForm.modifypwdMenu.Enabled=FalsefMainForm.modifyresultMenu.Enabled=FalsefMainForm.modifysinfo_Menu.Enabled=FalsefMainForm.gradecourseMenu.Enabled=FalsefMainForm.ShowEndIfEndSubPublicFunctionConnectString()_AsStringConnectString="Provider=Microsoft.Jet.OLEDB.4.0;DataSource=student.mdb;PersistSecurityInfo=False"EndFunctionPublicFunctionExecuteSQL(ByValSQLAsString,MsgStringAsString)AsADODB.RecordsetDimcnnAsADODB.ConnectionDimrstAsADODB.RecordsetDimsTokens()AsStringOnErrorGoToExecuteSQL_ErrorsTokens=Split(SQL)Setcnn=NewADODB.Connectioncnn.OpenConnectStringIfInStr("INSERT,DELETE,UPDATE",UCase$(sTokens(0)))Thencnn.ExecuteSQLMsgString=sTokens(0)&"querysuccessful"ElseSetrst=NewADODB.Recordsetrst.OpenTrim$(SQL),cnn,adOpenKeyset,adLockOptimisticSetExecuteSQL=rstMsgString="查詢到"&rst.RecordCount&"條記錄"EndIfExecuteSQL_Exit:Setrst=NothingSetcnn=NothingExitFunctionExecuteSQL_Error:MsgString="查詢錯誤:"&Err.DescriptionResumeExecuteSQL_ExitEndFunctionPublicFunctionTesttxt(txtAsString)AsBooleanIfTrim(txt)=""ThenTesttxt=FalseElseTesttxt=TrueEndIfEndFunction添加學籍信息原代碼:PrivateSubCommand1_Click()DimmrcAsADODB.RecordsetDimtxtSQLAsStringDimMsgTextAsStringIfNotTesttxt(txtSID.Text)ThenMsgBox"請輸入學號!",vbOKOnly+vbExclamation,"警告"txtSID.SetFocusExitSubEndIfIfNotTesttxt(txtName.Text)ThenMsgBox"請輸入姓名!",vbOKOnly+vbExclamation,"警告"txtName.SetFocusExitSubEndIfIfNotTesttxt(comboSex.Text)ThenMsgBox"請選擇性別!",vbOKOnly+vbExclamation,"警告"comboSex.SetFocusExitSubEndIfIfNotTesttxt(txtBorndate.Text)ThenMsgBox"請輸入出生日期!",vbOKOnly+vbExclamation,"警告"txtBorndate.SetFocusExitSubEndIfIfNotTesttxt(comboClassNo.Text)ThenMsgBox"請選擇班號!",vbOKOnly+vbExclamation,"警告"comboClassNo.SetFocusExitSubEndIfIfNotTesttxt(txtTel.Text)ThenMsgBox"請輸入聯(lián)系電話!",vbOKOnly+vbExclamation,"警告"txtTel.SetFocusExitSubEndIfIfNotTesttxt(txtRudate.Text)ThenMsgBox"請輸入入校日期!",vbOKOnly+vbExclamation,"警告"txtRudate.SetFocusExitSubEndIfIfNotTesttxt(txtAddress.Text)ThenMsgBox"請輸入家庭住址!",vbOKOnly+vbExclamation,"警告"txtAddress.SetFocusExitSubEndIfIfNotIsNumeric(Trim(txtSID.Text))ThenMsgBox"請輸入數(shù)字!",vbOKOnly+vbExclamation,"警告"ExitSubtxtSID.SetFocusEndIftxtSQL="select*fromstudent_Infowherestudent_ID="&Trim(txtSID.Text)'&"'"Setmrc=ExecuteSQL(txtSQL,MsgText)Ifmrc.RecordCount<>0ThenMsgBox"學號重復,請重新輸入!",vbOKOnly+vbExclamation,"警告"mrc.ClosetxtSID.SetFocusElsemrc.CloseIfNotIsDate(txtBorndate.Text)ThenMsgBox"出生時間應(yīng)輸入日期格式(yyyy-mm-dd)!",vbOKOnly+vbExclamation,"警告"txtBorndate.SetFocusElsetxtBorndate=Format(txtBorndate,"yyyy-mm-dd")IfNotIsDate(txtRudate.Text)ThenMsgBox"入校時間應(yīng)輸入日期格式(yyyy-mm-dd)!",vbOKOnly+vbExclamation,"警告"txtRudate.SetFocusElsetxtRudate=Format(txtRudate,"yyyy-mm-dd")txtSQL="select*fromstudent_Info"Setmrc=ExecuteSQL(txtSQL,MsgText)mrc.AddNewmrc.Fields(0)=Trim(txtSID.Text)mrc.Fields(1)=Trim(txtName.Text)mrc.Fields(2)=Trim(comboSex.Text)mrc.Fields(3)=Trim(txtBorndate.Text)mrc.Fields(4)=Trim(comboClassNo.Text)mrc.Fields(5)=Trim(txtTel.Text)mrc.Fields(6)=Trim(txtRudate.Text)mrc.Fields(7)=Trim(txtAddress.Text)mrc.Fields(8)=Trim(txtComment.Text)mrc.UpdateMsgBox"添加學籍信息成功!",vbOKOnly+vbExclamation,"警告〃mrc.CloseMe.HideEndIfEndIfEndIfEndSubPrivateSubCommand2_Click()UnloadMeEndSubPrivateSubForm_Load()DimmrcAsADODB.RecordsetDimtxtSQLAsStringDimMsgTextAsStringDimiAsIntegercomboSex.AddItem"男"comboSex.AddItem"女"txtSQL="select*fromclass_Info"Setmrc=ExecuteSQL(txtSQL,MsgText)Fori=1Tomrc.RecordCountcomboClassNo.AddItemmrc.Fields(0)mrc.MoveNextNe

溫馨提示

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

評論

0/150

提交評論