collegeset.cpp
来自「这是一个学生管理系统 包含学生基本信息 选课信息 宿舍信息 教师信息 课程信息 」· C++ 代码 · 共 70 行
CPP
70 行
// CollegeSet.cpp : implementation file
//
#include "stdafx.h"
#include "Student.h"
#include "CollegeSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CCollegeSet
IMPLEMENT_DYNAMIC(CCollegeSet, CRecordset)
CCollegeSet::CCollegeSet(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CCollegeSet)
m_College_no = _T("");
m_Name = _T("");
m_Phone = _T("");
m_President = _T("");
m_Introduction = _T("");
m_nFields = 5;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CCollegeSet::GetDefaultConnect()
{
return _T("ODBC;DSN=student");
}
CString CCollegeSet::GetDefaultSQL()
{
return _T("[college]");
}
void CCollegeSet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CCollegeSet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[College_no]"), m_College_no);
RFX_Text(pFX, _T("[Name]"), m_Name);
RFX_Text(pFX, _T("[Phone]"), m_Phone);
RFX_Text(pFX, _T("[President]"), m_President);
RFX_Text(pFX, _T("[Introduction]"), m_Introduction);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CCollegeSet diagnostics
#ifdef _DEBUG
void CCollegeSet::AssertValid() const
{
CRecordset::AssertValid();
}
void CCollegeSet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?