home *** CD-ROM | disk | FTP | other *** search
- // EmployeePersonalSet.cpp : implementation file
- //
-
- #include "stdafx.h"
- #include "Employee.h"
- #include "EmployeePersonalSet.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CEmployeePersonalSet
-
- IMPLEMENT_DYNAMIC(CEmployeePersonalSet, CRecordset)
-
- CEmployeePersonalSet::CEmployeePersonalSet(CDatabase* pdb)
- : CRecordset(pdb)
- {
- //{{AFX_FIELD_INIT(CEmployeePersonalSet)
- m_Employee_Number = 0;
- m_Sex___Marital_Status = 0;
- m_Height = 0.0;
- m_Weight = 0.0;
- m_nFields = 5;
- //}}AFX_FIELD_INIT
-
- m_Birthdate.year = 0;
- m_Birthdate.month = 0;
- m_Birthdate.day = 0;
- m_Birthdate.hour = 0;
- m_Birthdate.minute = 0;
- m_Birthdate.second = 0;
- m_Birthdate.fraction = 0;
-
- m_nDefaultType = dynaset;
-
- m_strFilter = "[Employee Number] = ?"; //? == parameter placeholder
- m_nParams = 1;
- m_EmployeeNumberParam = 0;
- }
-
-
- CString CEmployeePersonalSet::GetDefaultConnect()
- {
- return _T("ODBC;DSN=Personal");
- }
-
- CString CEmployeePersonalSet::GetDefaultSQL()
- {
- return _T("[Employee Personal Info Table]");
- }
-
- void CEmployeePersonalSet::DoFieldExchange(CFieldExchange* pFX)
- {
- pFX->SetFieldType(CFieldExchange::param);
- RFX_Long(pFX, _T("[EmployeeNumberParam]"), m_EmployeeNumberParam);
- //{{AFX_FIELD_MAP(CEmployeePersonalSet)
- pFX->SetFieldType(CFieldExchange::outputColumn);
- RFX_Long(pFX, _T("[Employee Number]"), m_Employee_Number);
- RFX_Byte(pFX, _T("[Sex & Marital Status]"), m_Sex___Marital_Status);
- RFX_Double(pFX, _T("[Height]"), m_Height);
- RFX_Double(pFX, _T("[Weight]"), m_Weight);
- //}}AFX_FIELD_MAP
- RFX_Date(pFX, _T("[Birthdate]"), m_Birthdate);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CEmployeePersonalSet diagnostics
-
- #ifdef _DEBUG
- void CEmployeePersonalSet::AssertValid() const
- {
- CRecordset::AssertValid();
- }
-
- void CEmployeePersonalSet::Dump(CDumpContext& dc) const
- {
- CRecordset::Dump(dc);
- }
- #endif //_DEBUG
-