electivecourseset.cpp
来自「B/S架构的软件项目实训;包括全部详细文档合源程序」· C++ 代码 · 共 69 行
CPP
69 行
// ElectiveCourseSet.cpp : implementation file
//
#include "stdafx.h"
#include "course.h"
#include "ElectiveCourseSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CElectiveCourseSet
IMPLEMENT_DYNAMIC(CElectiveCourseSet, CRecordset)
CElectiveCourseSet::CElectiveCourseSet(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CElectiveCourseSet)
m_courseName = _T("");
m_credit = 0;
m_studentNo = _T("");
m_nFields = 3;
//}}AFX_FIELD_INIT
m_nDefaultType = dynaset;
m_nParams=1;
}
CString CElectiveCourseSet::GetDefaultConnect()
{
return _T("ODBC;DSN=course");
}
CString CElectiveCourseSet::GetDefaultSQL()
{
return _T("[electiveCourse]");
}
void CElectiveCourseSet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CElectiveCourseSet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[courseName]"), m_courseName);
RFX_Long(pFX, _T("[credit]"), m_credit);
RFX_Text(pFX, _T("[studentNo]"), m_studentNo);
//}}AFX_FIELD_MAP
pFX->SetFieldType(CFieldExchange::param);
RFX_Text(pFX, _T("Param"), m_studentNoParam);
}
/////////////////////////////////////////////////////////////////////////////
// CElectiveCourseSet diagnostics
#ifdef _DEBUG
void CElectiveCourseSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CElectiveCourseSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?