教师管理系统:1.1课题概况
通过数据库和教师管理系统的连接
源代码在线查看: tee.cpp
// tee.cpp : implementation file
//
#include "stdafx.h"
#include "teacher.h"
#include "tee.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// tee
IMPLEMENT_DYNAMIC(tee, CRecordset)
tee::tee(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(tee)
m_name = _T("");
m_sex = _T("");
m_date = _T("");
m_age = _T("");
m_jiguan = _T("");
m_zhengzhi = _T("");
m_danwei = _T("");
m_zhicheng = _T("");
m_zhiwu = _T("");
m_xuewei = _T("");
m_biye = _T("");
m_dianhua = _T("");
m_lvli = _T("");
m_nFields = 13;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString tee::GetDefaultConnect()
{
return _T("ODBC;DSN=tea");
}
CString tee::GetDefaultSQL()
{
return _T("[teach]");
}
void tee::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(tee)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[name]"), m_name);
RFX_Text(pFX, _T("[sex]"), m_sex);
RFX_Text(pFX, _T("[date]"), m_date);
RFX_Text(pFX, _T("[age]"), m_age);
RFX_Text(pFX, _T("[jiguan]"), m_jiguan);
RFX_Text(pFX, _T("[zhengzhi]"), m_zhengzhi);
RFX_Text(pFX, _T("[danwei]"), m_danwei);
RFX_Text(pFX, _T("[zhicheng]"), m_zhicheng);
RFX_Text(pFX, _T("[zhiwu]"), m_zhiwu);
RFX_Text(pFX, _T("[xuewei]"), m_xuewei);
RFX_Text(pFX, _T("[biye]"), m_biye);
RFX_Text(pFX, _T("[dianhua]"), m_dianhua);
RFX_Text(pFX, _T("[lvli]"), m_lvli);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// tee diagnostics
#ifdef _DEBUG
void tee::AssertValid() const
{
CRecordset::AssertValid();
}
void tee::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG