dept.cpp
来自「是自己做的一个小的学生管理系统.希望对大家有用」· C++ 代码 · 共 66 行
CPP
66 行
// 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 + =
减小字号Ctrl + -
显示快捷键?