|
#if !defined(AFX_INVOICEVIEW_H__BA25E9FF_29F8_44C2_8305_B8772D5BA446__INCLUDED_)
#define AFX_INVOICEVIEW_H__BA25E9FF_29F8_44C2_8305_B8772D5BA446__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include "InvoiceSet.h"
#include "HeaderCtrlEx.h"
#include "StaticEx.h"
class CInvoiceView : public CRecordView
{
protected: // create from serialization only
CInvoiceView();
DECLARE_DYNCREATE(CInvoiceView)
public:
//{{AFX_DATA(CInvoiceView)
enum { IDD = IDD_INVOICE_FORM };
CStaticEx m_lblShipTo;
CStaticEx m_lblBillTo;
CStatic m_lblBillCityStZip;
CStatic m_lblBillName;
CStatic m_lblBillCountry;
CStatic m_lblBillAddress;
CStatic m_lblShipCountry;
CStatic m_lblShipCityStZip;
CStatic m_lblShipAddress;
CStatic m_lblShipName;
CListCtrl m_lcDetails;
CListCtrl m_lcFooter;
CListCtrl m_lcHeader;
//}}AFX_DATA
CHeaderCtrlEx m_ctrlHeader;
// Attributes
public:
CInvoiceDoc* GetDocument();
// Operations
public:
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CInvoiceView)
public:
virtual CRecordset* OnGetRecordset();
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual void OnInitialUpdate(); // called first time after construct
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CInvoiceView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CInvoiceView)
//}}AFX_MSG
afx_msg BOOL OnMove(UINT nIDMoveCommand);
DECLARE_MESSAGE_MAP()
private:
COrderSet *m_pOrderSet;
CInvoiceSet m_InvoiceSet;
bool FormatLocaleDate( const CTime date, CString &strDate );
bool FormatLocaleCurrency( const double dAmount, CString &strAmount );
void UpdateAddress( void );
void UpdateHeader( void );
void UpdateDetails( double &dSubtotal );
void UpdateFooter( const double &dSubtotal );
};
#ifndef _DEBUG // debug version in InvoiceView.cpp
inline CInvoiceDoc* CInvoiceView::GetDocument()
{ return (CInvoiceDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_INVOICEVIEW_H__BA25E9FF_29F8_44C2_8305_B8772D5BA446__INCLUDED_)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.