📄 dept.cpp
字号:
// Dept.cpp : implementation file
//
#include "stdafx.h"
#include "student2.h"
#include "Dept.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CDept
IMPLEMENT_DYNAMIC(CDept, CRecordset)
CDept::CDept(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CDept)
m_deptno = 0;
m_deptname = _T("");
m_collegeno = 0;
m_nFields = 3;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CDept::GetDefaultConnect()
{
return _T("ODBC;DSN=studentsn");
}
CString CDept::GetDefaultSQL()
{
return _T("[dept]");
}
void CDept::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CDept)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Long(pFX, _T("[deptno]"), m_deptno);
RFX_Text(pFX, _T("[deptname]"), m_deptname);
RFX_Long(pFX, _T("[collegeno]"), m_collegeno);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CDept diagnostics
#ifdef _DEBUG
void CDept::AssertValid() const
{
CRecordset::AssertValid();
}
void CDept::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -