第一范文网 - 专业文章范例文档资料分享平台

C++MFC课程设计交作业管理系统设计实践报告

来源:用户分享 时间:2025/5/17 8:41:33 本文由loading 分享 下载这篇文档手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:xxxxxxx或QQ:xxxxxx 处理(尽可能给您提供完整文档),感谢您的支持与谅解。

计算机程序设计实践报告

图5 学生界面

4.2 模块详细设计

4.2.1教师模块设计

1) “查看任务”按钮对应函数:

void CDlg_Teacher::OnOK() { // TODO: Add extra validation here

??

_variant_t theValue;

theValue=m_pRecordset->GetCollect(\课程名称\if(theValue.vt!=VT_NULL)

m_Kecheng=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_kecheng)->SetWindowText(m_Kecheng); theValue=m_pRecordset->GetCollect(\开始时间\if(theValue.vt!=VT_NULL)

m_Kaishi=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_kaishi)->SetWindowText(m_Kaishi); theValue=m_pRecordset->GetCollect(\结束时间\

6

计算机程序设计实践报告

}

if(theValue.vt!=VT_NULL)

m_Jieshu=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_jieshu)->SetWindowText(m_Jieshu); theValue=m_pRecordset->GetCollect(\任务描述\if(theValue.vt!=VT_NULL)

m_Miaoshu=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_miaoshu)->SetWindowText(m_Miaoshu);

2) “查看所有任务”按钮对应函数:

void CDlg_Teacher::OnButton1() { // TODO: Add your control notification handler code here CDlg_Bianji Bian; Bian.DoModal(); }

3) “添加任务”按钮对应函数:

void CDlg_Teacher::OnPreButton2() { // TODO: Add your control notification handler code here try {

??

m_pRecordset->AddNew();

m_pRecordset->Fields->GetItem(\课程名称\m_pRecordset->Fields->GetItem(\开始时间\m_pRecordset->Fields->GetItem(\结束时间\m_pRecordset->Fields->GetItem(\任务描述\

m_pRecordset->Update(); m_pRecordset->Close();

AfxMessageBox(\任务已经成功添加!\}

catch(_com_error e) {

AfxMessageBox(e.ErrorMessage()); } }

4) “下一条”按钮对应函数:

void CDlg_Teacher::OnNextButton3()

7

计算机程序设计实践报告

{ }

// TODO: Add your control notification handler code here m_pRecordset->MoveNext(); if(m_pRecordset->adoEOF) {

AfxMessageBox(\当前为最新任务\m_pRecordset->MoveFirst(); } ??

5) “删除当前任务”按钮对应函数:

void CDlg_Teacher::OnDeleteButton4() { // TODO: Add your control notification handler code here try {

??

m_pRecordset->Delete(adAffectCurrent); m_pRecordset->Update();

??

}

catch(_com_error e) {

AfxMessageBox(e.ErrorMessage()); } }

6) “查看作业“按钮对应函数:

void CDlg_Teacher::OnchankanButton5() { // TODO: Add your control notification handler code here CDlg_xiazai xia; xia.DoModal(); }

7) “退出系统“按钮对应函数:

void CDlg_Teacher::OnCancel() {

8

计算机程序设计实践报告

}

// TODO: Add extra cleanup here CDlg_Exit1 exit; exit.DoModal(); CDialog::OnCancel();

8) “注销登陆”按钮对应函数:

void CDlg_Teacher::OnzhuxiaoButton6() { // TODO: Add your control notification handler code here CDlg_zhuxiao zhu; zhu.DoModal(); }

教师界面具有的功能 跳转到查看所有任务界面的功能 跳转到下载作业界面的功能 逐条查看任务功能 删除任务功能 添加任务功能 注销系统功能 退出系统功能

图6教师界面功能图

4.2.2学生模块设计

1) “查看任务”按钮对应函数:

void CDlg_Student::OnOK() { // TODO: Add extra validation here ?? m_pRecordset->MoveFirst(); _variant_t theValue; theValue=m_pRecordset->GetCollect(\课程名称\ if(theValue.vt!=VT_NULL)

9

计算机程序设计实践报告

}

m_Kecheng=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_kecheng)->SetWindowText(m_Kecheng); theValue=m_pRecordset->GetCollect(\开始时间\if(theValue.vt!=VT_NULL)

m_Kaishi=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_kaishi)->SetWindowText(m_Kaishi); theValue=m_pRecordset->GetCollect(\结束时间\if(theValue.vt!=VT_NULL)

m_Jieshu=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_jieshu)->SetWindowText(m_Jieshu); theValue=m_pRecordset->GetCollect(\任务描述\if(theValue.vt!=VT_NULL)

m_Miaoshu=(char*)_bstr_t(theValue);

GetDlgItem(IDC_EDIT_miaoshu)->SetWindowText(m_Miaoshu);

2) “查看所有任务”按钮对应函数:

void CDlg_Student::OnButton1() { // TODO: Add your control notification handler code here CDlg_Chakan Cha; Cha.DoModal(); }

3)“下一条”按钮对应函数:

void CDlg_Student::OnNextButton2() { // TODO: Add your control notification handler code here m_pRecordset->MoveNext(); if(m_pRecordset->adoEOF) { AfxMessageBox(\当前为最新任务\ m_pRecordset->MoveFirst(); } }

??

4)“上交作业”按钮对应函数:

void CDlg_Student::OnshangjiaoButton3() { // TODO: Add your control notification handler code here CDlg_shangchuan shang;

10

C++MFC课程设计交作业管理系统设计实践报告.doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.diyifanwen.net/c6rr497om770flug9bayx_2.html(转载请注明文章来源)
热门推荐
Copyright © 2012-2023 第一范文网 版权所有 免责声明 | 联系我们
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:xxxxxx 邮箱:xxxxxx@qq.com
渝ICP备2023013149号
Top