studentset.cpp

来自「学生成绩管理系统」· C++ 代码 · 共 73 行

CPP
73
字号
// studentset.cpp : implementation file
//

#include "stdafx.h"
#include "mystudent.h"
#include "studentset.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// Cstudentset

IMPLEMENT_DYNAMIC(Cstudentset, CRecordset)

Cstudentset::Cstudentset(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(Cstudentset)
	m_stuname = _T("");
	m_stuno = _T("");
	m_xb = _T("");
	m_native = _T("");
	m_homeadd = _T("");
	m_classno = _T("");
	m_nFields = 7;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString Cstudentset::GetDefaultConnect()
{
	return _T("ODBC;DSN=student");
}

CString Cstudentset::GetDefaultSQL()
{
	return _T("[dbo].[student]");
}

void Cstudentset::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(Cstudentset)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[stuname]"), m_stuname);
	RFX_Text(pFX, _T("[stuno]"), m_stuno);
	RFX_Text(pFX, _T("[xb]"), m_xb);
	RFX_Date(pFX, _T("[birthday]"), m_birthday);
	RFX_Text(pFX, _T("[native]"), m_native);
	RFX_Text(pFX, _T("[homeadd]"), m_homeadd);
	RFX_Text(pFX, _T("[classno]"), m_classno);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// Cstudentset diagnostics

#ifdef _DEBUG
void Cstudentset::AssertValid() const
{
	CRecordset::AssertValid();
}

void Cstudentset::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?