serverdoc.cpp

来自「网吧管理系统VC源码」· C++ 代码 · 共 104 行

CPP
104
字号
// ServerDoc.cpp : implementation of the CServerDoc class
//

#include "stdafx.h"
#include "Server.h"

#include "ServerDoc.h"

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

/////////////////////////////////////////////////////////////////////////////
// CServerDoc

IMPLEMENT_DYNCREATE(CServerDoc, CDocument)

BEGIN_MESSAGE_MAP(CServerDoc, CDocument)
	//{{AFX_MSG_MAP(CServerDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CServerDoc construction/destruction

CServerDoc::CServerDoc()
{
	// TODO: add one-time construction code here
	m_daoRecord.Open();
	m_daoLeaguer.Open();
	m_daoRecMsg.Open();
	m_daoPayProperty.Open();
	m_daoPayProperty.MoveFirst();
	m_daoHistoryFree.Open();
	if(!(m_daoRecMsg.IsBOF() && m_daoRecMsg.IsEOF()))
	{
		m_daoRecMsg.MoveLast();
		int nCount = m_daoRecMsg.GetRecordCount();
		m_daoRecMsg.MoveFirst();
		for(int i = 0; i < nCount; i++)
			m_daoRecMsg.Delete();
	}
	m_daoRecMsg.Close();
}

CServerDoc::~CServerDoc()
{
	m_daoRecord.Close();
	m_daoLeaguer.Close();
	m_daoRecMsg.Close();
	m_daoPayProperty.Close();
	m_daoHistoryFree.Close();
}

BOOL CServerDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CServerDoc serialization

void CServerDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CServerDoc diagnostics

#ifdef _DEBUG
void CServerDoc::AssertValid() const
{
	CDocument::AssertValid();
}

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

/////////////////////////////////////////////////////////////////////////////
// CServerDoc commands

⌨️ 快捷键说明

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