www.pudn.com > ImageServU.rar > Zcategories.cpp
// Zcategories.cpp : implementation file
//
#include "stdafx.h"
#include "Zcategories.h"
#include "bompdmcomm.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CZcategories
IMPLEMENT_DYNAMIC(CZcategories, CRecordset)
CZcategories::CZcategories(CDatabase* pdb)
: CRecordset(pdb)
{
//{{AFX_FIELD_INIT(CZcategories)
m_cat_id = 0;
m_cat_name = _T("");
m_cat_description = _T("");
m_cat_parent_id = 0;
m_cat_hits = 0;
m_cat_order = 0;
m_auth_viewcat = 0;
m_auth_viewimage = 0;
m_auth_download = 0;
m_auth_upload = 0;
m_auth_directupload = 0;
m_auth_vote = 0;
m_auth_sendpostcard = 0;
m_auth_readcomment = 0;
m_auth_postcomment = 0;
m_nFields = 15;
//}}AFX_FIELD_INIT
m_nDefaultType = snapshot;
}
CString CZcategories::GetDefaultConnect()
{
CString sDsn;
sDsn.Format("ODBC;%s",PDMDSN);
return sDsn;
}
CString CZcategories::GetDefaultSQL()
{
return _T("[4images_categories]");
}
void CZcategories::DoFieldExchange(CFieldExchange* pFX)
{
//{{AFX_FIELD_MAP(CZcategories)
pFX->SetFieldType(CFieldExchange::outputColumn);
RFX_Long(pFX, _T("[cat_id]"), m_cat_id);
RFX_Text(pFX, _T("[cat_name]"), m_cat_name);
RFX_Text(pFX, _T("[cat_description]"), m_cat_description);
RFX_Long(pFX, _T("[cat_parent_id]"), m_cat_parent_id);
RFX_Long(pFX, _T("[cat_hits]"), m_cat_hits);
RFX_Long(pFX, _T("[cat_order]"), m_cat_order);
RFX_Long(pFX, _T("[auth_viewcat]"), m_auth_viewcat);
RFX_Long(pFX, _T("[auth_viewimage]"), m_auth_viewimage);
RFX_Long(pFX, _T("[auth_download]"), m_auth_download);
RFX_Long(pFX, _T("[auth_upload]"), m_auth_upload);
RFX_Long(pFX, _T("[auth_directupload]"), m_auth_directupload);
RFX_Long(pFX, _T("[auth_vote]"), m_auth_vote);
RFX_Long(pFX, _T("[auth_sendpostcard]"), m_auth_sendpostcard);
RFX_Long(pFX, _T("[auth_readcomment]"), m_auth_readcomment);
RFX_Long(pFX, _T("[auth_postcomment]"), m_auth_postcomment);
//}}AFX_FIELD_MAP
}
/////////////////////////////////////////////////////////////////////////////
// CZcategories diagnostics
#ifdef _DEBUG
void CZcategories::AssertValid() const
{
CRecordset::AssertValid();
}
void CZcategories::Dump(CDumpContext& dc) const
{
CRecordset::Dump(dc);
}
#endif //_DEBUG