home *** CD-ROM | disk | FTP | other *** search
- // JoinView.cpp : implementation of the CJoinView class
- //
-
- #include "stdafx.h"
- #include "Join.h"
-
- #include "JoinSet.h"
- #include "JoinDoc.h"
- #include "JoinView.h"
-
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
-
- /////////////////////////////////////////////////////////////////////////////
- // CJoinView
-
- IMPLEMENT_DYNCREATE(CJoinView, CDaoRecordView)
-
- BEGIN_MESSAGE_MAP(CJoinView, CDaoRecordView)
- //{{AFX_MSG_MAP(CJoinView)
- // 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()
-
- /////////////////////////////////////////////////////////////////////////////
- // CJoinView construction/destruction
-
- CJoinView::CJoinView()
- : CDaoRecordView(CJoinView::IDD)
- {
- //{{AFX_DATA_INIT(CJoinView)
- m_pSet = NULL;
- //}}AFX_DATA_INIT
- // TODO: add construction code here
-
- }
-
- CJoinView::~CJoinView()
- {
- }
-
- void CJoinView::DoDataExchange(CDataExchange* pDX)
- {
- CDaoRecordView::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CJoinView)
- DDX_FieldText(pDX, IDC_FNAME, m_pSet->m_First_Name, m_pSet);
- DDX_FieldText(pDX, IDC_LNAME, m_pSet->m_Last_Name, m_pSet);
- DDX_FieldText(pDX, IDC_EMP_NO, m_pSet->m_Employee_Number, m_pSet);
- DDX_FieldText(pDX, IDC_DEPT, m_pSet->m_Department__, m_pSet);
- DDX_FieldText(pDX, IDC_PAY_TYPE, m_pSet->m_Employee_Pay_Type, m_pSet);
- DDX_FieldText(pDX, IDC_HOUR_RATE, m_pSet->m_Hourly_Rate, m_pSet);
- DDX_FieldText(pDX, IDC_BIRTH, m_pSet->m_Birthdate, m_pSet);
- DDX_FieldText(pDX, IDC_MARITAL_STATUS, m_pSet->m_Sex___Marital_Status, m_pSet);
- DDX_FieldText(pDX, IDC_HEIGHT, m_pSet->m_Height, m_pSet);
- DDX_FieldText(pDX, IDC_WEIGHT, m_pSet->m_Weight, m_pSet);
- //}}AFX_DATA_MAP
- }
-
- BOOL CJoinView::PreCreateWindow(CREATESTRUCT& cs)
- {
- // TODO: Modify the Window class or styles here by modifying
- // the CREATESTRUCT cs
-
- return CDaoRecordView::PreCreateWindow(cs);
- }
-
- void CJoinView::OnInitialUpdate()
- {
- m_pSet = &GetDocument()->m_joinSet;
- CDaoRecordView::OnInitialUpdate();
-
- GetParentFrame()->RecalcLayout();
- ResizeParentToFit(FALSE);
- }
-
- /////////////////////////////////////////////////////////////////////////////
- // CJoinView diagnostics
-
- #ifdef _DEBUG
- void CJoinView::AssertValid() const
- {
- CDaoRecordView::AssertValid();
- }
-
- void CJoinView::Dump(CDumpContext& dc) const
- {
- CDaoRecordView::Dump(dc);
- }
-
- CJoinDoc* CJoinView::GetDocument() // non-debug version is inline
- {
- ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CJoinDoc)));
- return (CJoinDoc*)m_pDocument;
- }
- #endif //_DEBUG
-
- /////////////////////////////////////////////////////////////////////////////
- // CJoinView database support
- CDaoRecordset* CJoinView::OnGetRecordset()
- {
- return m_pSet;
- }
-
-
- /////////////////////////////////////////////////////////////////////////////
- // CJoinView message handlers
-