reservationset.cpp

来自「一个课程作业」· C++ 代码 · 共 66 行

CPP
66
字号
// ReservationSet.cpp : implementation file
//

#include "stdafx.h"
#include "order.h"
#include "ReservationSet.h"

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

/////////////////////////////////////////////////////////////////////////////
// CReservationSet

IMPLEMENT_DYNAMIC(CReservationSet, CRecordset)

CReservationSet::CReservationSet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CReservationSet)
	m_custName = _T("");
	m_resvType = 0;
	m_resvKey = _T("");
	m_nFields = 3;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}


CString CReservationSet::GetDefaultConnect()
{
	return _T("ODBC;DSN=mydb");
}

CString CReservationSet::GetDefaultSQL()
{
	return _T("[dbo].[RESERVATIONS]");
}

void CReservationSet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CReservationSet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[custName]"), m_custName);
	RFX_Long(pFX, _T("[resvType]"), m_resvType);
	RFX_Text(pFX, _T("[resvKey]"), m_resvKey);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CReservationSet diagnostics

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

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

⌨️ 快捷键说明

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