📄 libraryset.cpp
字号:
// LibrarySet.cpp : implementation of the CLibrarySet class
//
#include "stdafx.h"
#include "Library.h"
#include "LibrarySet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CLibrarySet implementation
IMPLEMENT_DYNAMIC(CLibrarySet, CRecordset)
CLibrarySet::CLibrarySet(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CLibrarySet)
m_BOOK_ISBN = _T("");
m_Bname = _T("");
m_Bauthor = _T("");
m_Btran = _T("");
m_Bpublisher = 0.0;
m_Bprice = 0;
m_B_total_count = 0;
m_B_borrow_count = 0;
m_B_left_count = 0;
m_BORROW_Sid = 0;
m_BORROW_ISBN = _T("");
m_Borrowtime = _T("");
m_nFields = 16;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CLibrarySet::GetDefaultConnect()
{
return _T("ODBC;DSN=library");
}
CString CLibrarySet::GetDefaultSQL()
{
return _T("[dbo].[BOOK],[dbo].[BORROW],[dbo].[STUDENT]");
}
void CLibrarySet::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CLibrarySet)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Text(pFX, _T("[Bname]"), m_BOOK_ISBN);
RFX_Text(pFX, _T("[Bauthor]"), m_Bname);
RFX_Text(pFX, _T("[Btran]"), m_Bauthor);
RFX_Text(pFX, _T("[Bpublisher]"), m_Btran);
RFX_Double(pFX, _T("[Bprice]"), m_Bpublisher);
RFX_Long(pFX, _T("[B_total_count]"), m_Bprice);
RFX_Long(pFX, _T("[B_borrow_count]"), m_B_total_count);
RFX_Long(pFX, _T("[B_left_count]"), m_B_borrow_count);
RFX_Date(pFX, _T("[Borrowtime]"), m_B_left_count);
RFX_Date(pFX, _T("[Senttime]"), m_BORROW_Sid);
RFX_Text(pFX, _T("[Sname]"), m_BORROW_ISBN);
RFX_Text(pFX, _T("[Sprofession]"), m_Borrowtime);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CLibrarySet diagnostics
#ifdef _DEBUG
void CLibrarySet::AssertValid() const
{
CRecordset::AssertValid();
}
void CLibrarySet::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -