www.pudn.com > 个人考勤软件开发实例配套代码.zip > attendanceDlg.h


// attendanceDlg.h : header file 
// 
 
#if !defined(AFX_ATTENDANCEDLG_H__73D292AA_166B_11D6_A6F0_8B41FD006B51__INCLUDED_) 
#define AFX_ATTENDANCEDLG_H__73D292AA_166B_11D6_A6F0_8B41FD006B51__INCLUDED_ 
 
#if _MSC_VER > 1000 
#pragma once 
#endif // _MSC_VER > 1000 
#include  
#include "resource.h"		// main symbols 
#include "ChildFrame.h"	// Added by ClassView 
 
//class CAttendanceDlgAutoProxy; 
 
struct Attend{ 
	//int	iDate;//0:日期 
	//int iWeek;//星期 
	CTime tAmOnDuty;//1:上午上班时间 
	CTime tAmOffDuty;//2:上午下班时间 
	CTime tPmOnDuty;//1:下午上班时间 
	CTime tPmOffDuty;//2:下午下班时间 
	CTime tNinOnDuty;//1:晚间上班时间 
	CTime tNinOffDuty;//2:晚间下班时间 
	CTimeSpan tWork;//3:日工时 
	};//日考勤 
  
struct Total{ 
	int	iMonth;//0:月份 
	int	iWorkDays;//1:法定工作日 
	int	iPay;//2:满勤工资 
	double dDayPay;//2:日均工资额 
	double dFactWorks;//1:实际工作日 
	int	iObtain;//2:应发工资 
	};//按月汇总 
 
struct YearTotal{ 
	int iPay; 
	int	iFactPay; 
	int iHoliday; 
    long ArrayHoliday[15]; 
	int iDayItems; 
	struct Attend sAttend[31]; 
	}; 
 
/*#define ID_FILE_OPEN	WM_USER + 100  
#define ID_FILE_SAVEAS	WM_USER + 101  
#define ID_PRINT		WM_USER + 102  
*/ 
///////////////////////////////////////////////////////////////////////////// 
// CAttendanceDlg dialog 
 
class CAttendanceDlg : public CDialog 
{ 
	DECLARE_DYNAMIC(CAttendanceDlg); 
	friend class CAttendanceDlgAutoProxy; 
 
// Construction 
public: 
	int m_iCurItem; 
	int	m_iPrtSel; 
	int	m_iBottom; 
	int	m_iLeft; 
	int	m_iRight; 
	int	m_iTop; 
	int m_iTotalSel; 
	int m_iMonths; 
	int m_iHoliday; 
    CArray  m_ArrayHoliday; 
	CTime m_Time; 
	int m_iMaxDate; 
	int m_iCurDate; 
	CAttendanceDlg(CWnd* pParent = NULL);	// standard constructor 
	virtual ~CAttendanceDlg(); 
	struct Attend sAttend[31]; 
	struct Attend sDuty; 
	struct Total sTotal[12]; 
	struct YearTotal sYearTotal[12]; 
	LV_ITEM lvitem; 
 
// Dialog Data 
//	CChildFrame m_Frame; 
	//{{AFX_DATA(CAttendanceDlg) 
	enum { IDD = IDD_ATTENDANCE_DIALOG }; 
	CButton	m_BtnOk; 
	CEdit	m_EdtFactPay; 
	CButton	m_cYear; 
	CButton	m_cMonth; 
	CEdit	m_EdtWorkDays; 
	CEdit	m_EdtPay; 
	CEdit	m_EdtObtain; 
	CEdit	m_EDtFactWorks; 
	CEdit	m_EdtDayPay; 
	CListCtrl	m_ListDuty; 
	CListCtrl	m_ListTotal; 
	CListCtrl	m_ListAttend; 
	CString	m_sYearMonth; 
	double	m_dDayPay; 
	int		m_iObtain; 
	int		m_iPay; 
	int		m_iWorkDays; 
	double	m_dFactWorks; 
	int		m_iFactPay; 
	//}}AFX_DATA 
	 
private: 
	CToolBarCtrl *m_toolbarCtrl ; 
	TBBUTTON btn[6]; 
	BOOL NotifyFunction( UINT id, NMHDR * pTTTStruct, LRESULT * pResult ); 
	void SetToolBarPosition(int pos); 
 
	// ClassWizard generated virtual function overrides 
	//{{AFX_VIRTUAL(CAttendanceDlg) 
	protected: 
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support 
	//}}AFX_VIRTUAL 
 
// Implementation 
protected: 
	CAttendanceDlgAutoProxy* m_pAutoProxy; 
	HICON m_hIcon; 
 
	BOOL CanExit(); 
 
	// Generated message map functions 
	//{{AFX_MSG(CAttendanceDlg) 
	virtual BOOL OnInitDialog(); 
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam); 
	afx_msg void OnPaint(); 
	afx_msg HCURSOR OnQueryDragIcon(); 
	afx_msg void OnClose(); 
	virtual void OnOK(); 
	virtual void OnCancel(); 
	afx_msg void OnColumnclickDuty(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnHoliday(); 
	afx_msg void OnUpdatePay(); 
	afx_msg void OnDelete(); 
	afx_msg void OnItemchangedTotal(NMHDR* pNMHDR, LRESULT* pResult); 
	afx_msg void OnFileOpen(); 
	afx_msg void OnFileSaveas(); 
	afx_msg void OnPrintPreview(); 
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct); 
	afx_msg void OnPrint(); 
	afx_msg void OnPgsetup(); 
	afx_msg void OnUpdateFactpay(); 
	afx_msg void OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags); 
	afx_msg void OnAbout(); 
	//}}AFX_MSG 
	DECLARE_MESSAGE_MAP() 
private: 
	CChildFrame* m_pChildFrame; 
	bool m_bFirst; 
	void GetYearData(); 
	void GetDutyData(); 
	CString m_sFileExt; 
	void Serialize(CArchive& ar); 
	CString m_sAttendFile; 
	CString m_sSavePath; 
	CString m_sOpenPath; 
	void GetTableData(); 
}; 
 
//{{AFX_INSERT_LOCATION}} 
// Microsoft Visual C++ will insert additional declarations immediately before the previous line. 
 
#endif // !defined(AFX_ATTENDANCEDLG_H__73D292AA_166B_11D6_A6F0_8B41FD006B51__INCLUDED_)