資源簡介
MFC_學生管理系統
MFC_學生管理系統
MFC_學生管理系統
MFC_學生管理系統
MFC_學生管理系統
MFC_學生管理系統

代碼片段和文件信息
//?ClassInfoDlg.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“CMyStudentSystem.h“
#include?“ClassInfoDlg.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CClassInfoDlg?dialog
CClassInfoDlg::CClassInfoDlg(CWnd*?pParent?/*=NULL*/)
:?CDialog(CClassInfoDlg::IDD?pParent)
{
//{{AFX_DATA_INIT(CClassInfoDlg)
m_classname?=?_T(““);
m_classteacher?=?_T(““);
//}}AFX_DATA_INIT
}
void?CClassInfoDlg::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CClassInfoDlg)
DDX_Text(pDX?IDC_EDIT_CLASS_NAME?m_classname);
DDX_Text(pDX?IDC_EDIT_CLASS_TEACHER?m_classteacher);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CClassInfoDlg?CDialog)
//{{AFX_MSG_MAP(CClassInfoDlg)
ON_BN_CLICKED(IDC_BUTTON_FIRST?OnButtonFirst)
ON_BN_CLICKED(IDC_BUTTON_PRE?OnButtonPre)
ON_BN_CLICKED(IDC_BUTTON_NEXT?OnButtonNext)
ON_BN_CLICKED(IDC_BUTTON_LAST?OnButtonLast)
ON_BN_CLICKED(IDC_BUTTON_ADD?OnButtonAdd)
ON_BN_CLICKED(IDC_BUTTON_SAVE?OnButtonSave)
ON_BN_CLICKED(IDC_BUTTON_DEL?OnButtonDel)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CClassInfoDlg?message?handlers
void?CClassInfoDlg::OnButtonFirst()?
{
//?TODO:?Add?your?control?notification?handler?code?here
if(!myclassinfoset->IsBOF())
{
myclassinfoset->MoveFirst();?//向前移動一條記錄
DisplayRecord();?????????????//更新窗口顯示
}
}
void?CClassInfoDlg::OnButtonPre()?
{
//?TODO:?Add?your?control?notification?handler?code?here
if(!myclassinfoset->IsBOF())
{
myclassinfoset->MovePrev();
DisplayRecord();
}
}
void?CClassInfoDlg::OnButtonNext()?
{
//?TODO:?Add?your?control?notification?handler?code?here
if(!myclassinfoset->IsEOF())?
{
myclassinfoset->MoveNext();
DisplayRecord();?
}
}
void?CClassInfoDlg::OnButtonLast()?
{
//?TODO:?Add?your?control?notification?handler?code?here
if(!myclassinfoset->IsEOF())
{
myclassinfoset->MoveLast();
DisplayRecord();?
}
}
void?CClassInfoDlg::OnButtonAdd()?
{
//?TODO:?Add?your?control?notification?handler?code?here
m_classname????=?““;
m_classteacher?=?““;
UpdateData(FALSE);
}
void?CClassInfoDlg::OnButtonSave()?
{
//?TODO:?Add?your?control?notification?handler?code?here
UpdateData(TRUE);
if(m_classname.IsEmpty()||m_classteacher.IsEmpty())
{
AfxMessageBox(“請輸入相應的數據!“);
return;
}
//調用添加記錄的函數處理
myclassinfoset->AddNew();
myclassinfoset->m_teacher???=?m_classteacher;?//對應變量更新
myclassinfoset->m_classname?=?m_classname;
try
{
myclassinfoset->Update();
myclassinfoset->Requery();
AfxMessageBox(“成功保存數據!“);
}
catch(?CDBException*?e?)
????{
????????AfxMessageBox(?e->m_strError?MB_ICONEXCLAMATION?);
????????e->Delete();
????}
DisplayRecord();?
}
void?CClassInfoDlg::OnButto
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????5537??2011-03-14?11:25??CMyStudentSystem\Subjectdlg.cpp
?????文件???????5178??2011-03-14?11:24??CMyStudentSystem\ExamKindDlg.cpp
?????文件??????55808??2011-03-14?13:36??CMyStudentSystem\CMyStudentSystem.opt
?????文件???????1637??2011-03-14?11:41??CMyStudentSystem\ExamInfoSubmarkDlg.h
?????文件???????4582??2011-03-14?11:23??CMyStudentSystem\ClassSubjectInfoDlg.cpp
?????文件???????1609??2011-03-14?02:26??CMyStudentSystem\ExamKindDlg.h
?????文件??????15348??2011-03-14?13:34??CMyStudentSystem\CMyStudentSystem.clw
?????文件???????3759??2011-03-13?22:57??CMyStudentSystem\ReadMe.txt
?????文件???????1348??2011-03-14?09:37??CMyStudentSystem\GradeLevelSet.h
?????文件???????4466??2011-03-14?13:31??CMyStudentSystem\Resource.h
?????文件????1747884??2011-03-14?13:31??CMyStudentSystem\CMyStudentSystem.aps
?????文件??????20036??2011-03-14?13:31??CMyStudentSystem\CMyStudentSystem.rc
?????文件???????1054??2011-03-13?22:57??CMyStudentSystem\StdAfx.h
?????文件????????218??2011-03-13?22:57??CMyStudentSystem\StdAfx.cpp
?????文件????????408??2011-03-13?22:57??CMyStudentSystem\res\CMyStudentSystem.rc2
?????文件???????1078??2011-03-13?22:57??CMyStudentSystem\res\CMyStudentSystem.ico
?????文件?????949482??2011-03-13?23:18??CMyStudentSystem\res\dd.bmp
?????文件?????210978??2011-03-14?11:13??CMyStudentSystem\res\77.bmp
?????文件?????296566??2011-03-14?11:20??CMyStudentSystem\res\bitmap3.bmp
?????文件?????243770??2011-03-14?11:20??CMyStudentSystem\res\22.bmp
?????文件???????4561??2011-03-14?11:25??CMyStudentSystem\Officeinfodlg.cpp
?????文件???????7919??2011-03-14?12:58??CMyStudentSystem\CMyStudentSystem.dsp
?????文件???????1355??2011-03-14?02:00??CMyStudentSystem\ClassSsubjectSet.h
?????文件???????1398??2011-03-14?02:00??CMyStudentSystem\ClassSsubjectSet.cpp
?????文件???????1631??2011-03-14?02:02??CMyStudentSystem\ClassSubjectInfoDlg.h
?????文件????????540??2011-03-13?22:57??CMyStudentSystem\CMyStudentSystem.dsw
?????文件???????1282??2011-03-14?02:15??CMyStudentSystem\ExamKindSet.h
?????文件?????173056??2011-03-14?13:36??CMyStudentSystem\CMyStudentSystem.ncb
?????文件????1710196??2011-03-14?13:34??CMyStudentSystem\Debug\CMyStudentSystem.res
?????文件?????271360??2011-03-14?13:34??CMyStudentSystem\Debug\vc60.idb
............此處省略83個文件信息
- 上一篇:C語言非常道
- 下一篇:Pt100溫度報警 電路圖程序
評論
共有 條評論