Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
EmpList.cpp
Package: EasyReport.rar [view]
Upload User: jimmy1212
Upload Date: 2020-11-02
Package Size: 40k
Code Size: 2k
Category:
Static control
Development Platform:
Visual C++
- // EmpList.cpp : implementation file
- //
- #include "stdafx.h"
- #include "EmpList.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CEmpList
- IMPLEMENT_DYNAMIC(CEmpList, CDaoRecordset)
- CEmpList::CEmpList(CDaoDatabase* pdb)
- : CDaoRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CEmpList)
- m_FirstName = _T("");
- m_LastName = _T("");
- m_DeptName = _T("");
- m_DeptID = 0;
- m_Salary = 0.0;
- m_nFields = 5;
- //}}AFX_FIELD_INIT
- m_nDefaultType = dbOpenSnapshot;
- }
- // Return the path to the database. This should be in the executable....
- // directory
- CString CEmpList::GetDefaultDBName()
- {
- char aExePath[_MAX_PATH];
- char aDrive[_MAX_DRIVE];
- char aDir[_MAX_DIR];
- char *end;
- ::GetModuleFileName( AfxGetApp()->m_hInstance, aExePath,sizeof(aExePath));
- _splitpath(aExePath,aDrive,aDir,NULL,NULL);
- end = strrchr(aDir,'\');
- if(end)
- *end = '';
- end = strrchr(aDir,'\');
- if(end)
- *end = '';
- _makepath(aExePath,aDrive, aDir, "Test",".mdb");
- CString aPath( aExePath );
- return aPath;
- //return _T("D:\user\Reports\SampleReport\Test.mdb");
- }
- CString CEmpList::GetDefaultSQL()
- {
- return _T("[ByDept]");
- }
- void CEmpList::DoFieldExchange(CDaoFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(CEmpList)
- pFX->SetFieldType(CDaoFieldExchange::outputColumn);
- DFX_Text(pFX, _T("[FirstName]"), m_FirstName);
- DFX_Text(pFX, _T("[LastName]"), m_LastName);
- DFX_Text(pFX, _T("[DeptName]"), m_DeptName);
- DFX_Short(pFX, _T("[DeptID]"), m_DeptID);
- DFX_Double(pFX, _T("[Salary]"), m_Salary);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // CEmpList diagnostics
- #ifdef _DEBUG
- void CEmpList::AssertValid() const
- {
- CDaoRecordset::AssertValid();
- }
- void CEmpList::Dump(CDumpContext& dc) const
- {
- CDaoRecordset::Dump(dc);
- }
- #endif //_DEBUG