freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

vc學(xué)生成績(jī)管理系統(tǒng)實(shí)驗(yàn)報(bào)告-資料下載頁(yè)

2024-12-16 14:13本頁(yè)面

【導(dǎo)讀】{ "error_code": 17, "error_msg": "Open api daily request limit reached" }

  

【正文】 lse (select * from score,course where student_no in (select student_no from student where student_name=39。%s39。) and = and score%s%s and =39。Y39。,m_name,m_filter,m_score)。 //清空 list數(shù)據(jù) (1)。 (0)。 ()。 (0,課程名 )。 (1,學(xué)生成績(jī) )。 //設(shè)置 header的寬度 RECT rectList。 (amp。rectList)。 int wid=。 for(int i=0。i2。i++) (i,wid/2)。 (LVS_EX_FULLROWSELECT)。 //打開(kāi)記錄集 (CRecordset::forwardOnly,strSQL)。 //將記錄集顯示到 CList中 for(int j=0。j()。j++){ CString temp。 (course_name,temp)。 (j,temp)。 (score,temp)。 (j,1,temp)。 ()。 } //將關(guān)閉記錄集 ()。 } } if(sortBy==2)//選中按課程單選按鈕 { //獲得控件并賦值 CEdit* pCourse=(CEdit*) thisGetDlgItem(IDC_QUERY_COURSE)。 CString m_course。 pCourseGetWindowText(m_course)。 //如果課程名為空,提示信息 if(m_course==) { MessageBox(請(qǐng)輸入課程名稱 )。 } else { //組織查詢語(yǔ)句 CString strSQL。 (select * from student,score where = and course_no in (select course_no from course where course_name=39。%s39。) and =39。Y39。,m_course)。 //清空 list數(shù)據(jù) (1)。 (0)。 ()。 (0, 學(xué)生名 )。 (1,學(xué)生成績(jī) )。 //設(shè)置 header的寬度 RECT rectList。 (amp。rectList)。 int wid=。 for(int i=0。i2。i++) (i,wid/2)。 (LVS_EX_FULLROWSELECT)。 //打開(kāi)記錄集 (CRecordset::forwardOnly,strSQL)。 //將記錄集顯示到 CList中 for(int j=0。j()。j++){ CString temp。 (student_name,temp)。 (j,temp)。 (score,temp)。 (j,1,temp)。 ()。 } //關(guān)閉記錄集 ()。 } } } 添加下拉框值改變事件。 void CQueryTeachDlg::OnSelchangeComboBy() { // TODO: Add your control notification handler code here CListBox* m_value=(CListBox*) thisGetDlgItem(IDC_LIST_VALUE)。 //清除 listBox數(shù)據(jù) for(int j=m_valueGetCount()。j=0。j) m_valueDeleteString(j)。 CString type。 (type)。 if(type==教師名 ) type=course。 else type=teacher。 //構(gòu)造查詢語(yǔ)句 CString strSQL。 (select * from %s where active_status=39。Y39。,type)。 type=type+_name。 //打開(kāi)記錄集 (CRecordset::forwardOnly,strSQL)。 //將 數(shù)據(jù)顯示在 ClistBox里 for(int k=0。k()。k++){ CString temp。 (type,temp)。 m_valueAddString(temp)。 ()。 } //關(guān)閉數(shù)據(jù)庫(kù) ()。 } 添加查詢按鈕事件 CQueryTeachDlg::OnOK()。 void CQueryTeachDlg::OnOK() { // TODO: Add extra validation here //獲得控件并賦值給字符串 CComboBox* m_type=(CComboBox*) thisGetDlgItem(IDC_COMBO_BY)。 CListBox* m_value=(CListBox*) thisGetDlgItem(IDC_LIST_VALUE)。 CString value,type。 int i=m_valueGetCurSel()。 m_valueGetText(i,value)。 m_typeGetWindowText(type)。 //判斷類型 if(type==教師名 ) type=teacher。 else type=course。 BOOL bSuccess=true。 if(value==)//如果查詢值為空 { MessageBox(請(qǐng)選擇查詢值! )。 bSuccess=false。 } if(bSuccess) { //構(gòu)造查詢語(yǔ)句 CString strSQL。 if(type==teacher) (select * from teach,course where teacher_no in(select teacher_no from teacher where teacher_name=39。%s39。) and =39。Y39。 and =,value)。 else (select * from teach,teacher where course_no in(select course_no from course where course_name=39。%s39。) and =39。Y39。 and =,value)。 //打開(kāi)記錄集 (CRecordset::forwardOnly,strSQL)。 //將記錄集顯示到 CListBox中 for(int k=()。k=0。k) (k)。 for(int j=0。j()。j++){ CString temp。 if(type==teacher) (course_name,temp)。 else (teacher_name,temp)。 (temp)。 ()。 } //關(guān)閉記錄集 ()。 } // CDialog::OnOK()。 } 6 總結(jié) 通過(guò)本次課程設(shè)計(jì), 初步了解了數(shù)據(jù)庫(kù)的設(shè)計(jì)方法和 vc如何訪問(wèn)數(shù)據(jù)庫(kù)并進(jìn)行數(shù)據(jù)庫(kù)的后臺(tái)編程 。同時(shí), 對(duì)編程的思想有了更深一次的掌握 。 學(xué)會(huì)了如何打開(kāi)數(shù)據(jù)庫(kù)記錄,如何運(yùn)用 List Control 控件等,經(jīng)過(guò)多次運(yùn)用后, 對(duì)它們都有所深入的了解,掌握如何運(yùn)用他們。 此次設(shè)計(jì)的學(xué)生成績(jī)管理系統(tǒng)功能還很有限,都是些基本功能,還有很多改進(jìn)完善的地方。比如計(jì)算學(xué)生總分,平均分以及排名等。雖然完成的功能很有限,但感覺(jué)收獲很大。 本次編程,又一次認(rèn)識(shí)到 VC++很龐大, 還有許多東西需要去學(xué) 。寫(xiě)代碼時(shí)應(yīng) 集中精力,細(xì)心。 比如 BOOL CStudentScoreApp::InitInstance()中忘了加最后的 “ }” ,導(dǎo)致很多錯(cuò)誤 。編譯中 (select * from userinfo where user_name=39。%s39。 and user_password=39。%s39。 and \n\ active_status=39。Y39。,username,password)。一直編譯不過(guò),后來(lái)加上 \n\,運(yùn)行通過(guò) 調(diào)試程序的時(shí)候有簡(jiǎn)單到復(fù)雜。程序調(diào)試出錯(cuò)時(shí),可以先把一些程序注釋掉 ,直流很少的一部分,確保程序的正確運(yùn)行,然后再逐段的釋放代碼,很容易發(fā)現(xiàn)問(wèn)題所在。 參考文獻(xiàn) .Visual C++數(shù)據(jù)庫(kù)通用模塊及典型系統(tǒng)開(kāi)發(fā)實(shí)例導(dǎo)航 . 人民郵電出版社 ,2021,212~257 ,薩師煊。數(shù)據(jù)庫(kù)系統(tǒng)概論( 第 4版),高等教育出版社, 2021
點(diǎn)擊復(fù)制文檔內(nèi)容
畢業(yè)設(shè)計(jì)相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1