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
ticketset.cpp
Package: 火车票预定.rar [view]
Upload User: syx6615
Upload Date: 2007-06-17
Package Size: 99k
Code Size: 2k
Category:
transportation applications
Development Platform:
Visual C++
- // ticketset.cpp : implementation file
- //
- #include "stdafx.h"
- #include "ticketbook.h"
- #include "ticketset.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // ticketset
- IMPLEMENT_DYNAMIC(ticketset, CRecordset)
- ticketset::ticketset(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(ticketset)
- m_trainNO = _T("");
- m_stop1 = _T("");
- m_stop2 = _T("");
- m_stop3 = _T("");
- m_stop4 = _T("");
- m_stop5 = _T("");
- m_stop6 = _T("");
- m_ISsell = 0;
- m_sitclass = 0;
- m_sitNO = _T("");
- m_nFields = 11;
- //}}AFX_FIELD_INIT
- m_nDefaultType = dynaset;
- }
- CString ticketset::GetDefaultConnect()
- {
- return _T("ODBC;DSN=ticketbook");
- }
- CString ticketset::GetDefaultSQL()
- {
- return _T("[traininfo]");
- }
- void ticketset::DoFieldExchange(CFieldExchange* pFX)
- {
- //{{AFX_FIELD_MAP(ticketset)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Text(pFX, _T("[trainNO]"), m_trainNO);
- RFX_Text(pFX, _T("[stop1]"), m_stop1);
- RFX_Text(pFX, _T("[stop2]"), m_stop2);
- RFX_Text(pFX, _T("[stop3]"), m_stop3);
- RFX_Text(pFX, _T("[stop4]"), m_stop4);
- RFX_Text(pFX, _T("[stop5]"), m_stop5);
- RFX_Text(pFX, _T("[stop6]"), m_stop6);
- RFX_Date(pFX, _T("[traintime]"), m_traintime);
- RFX_Int(pFX, _T("[ISsell]"), m_ISsell);
- RFX_Int(pFX, _T("[sitclass]"), m_sitclass);
- RFX_Text(pFX, _T("[sitNO]"), m_sitNO);
- //}}AFX_FIELD_MAP
- }
- /////////////////////////////////////////////////////////////////////////////
- // ticketset diagnostics
- #ifdef _DEBUG
- void ticketset::AssertValid() const
- {
- CRecordset::AssertValid();
- }
- void ticketset::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- long ticketset::MyGetRecordCount()
- {
- long iTmp;
- if(!this->IsBOF())
- this->MoveFirst();
- while(!this->IsEOF ())
- {
- this->MoveNext ();
- }
- iTmp = this->GetRecordCount();
- return iTmp;}
- #endif //_DEBUG