⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkinview.cpp

📁 一个简单的公司人员考勤系统的源代码,我已经编译运行过
💻 CPP
字号:
// CheckInView.cpp : implementation of the CCheckInView class
//

#include "stdafx.h"
#include "CheckIn.h"

#include "CheckInDoc.h"
#include "CheckInView.h"

#include "dlgCheckin.h"
#include "dlgConfigSet.h"
#include "dlgEmployee.h"
#include "dlgUser.h"
#include "dlgQueryCheck.h"
#include "dlgEditCheck.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

extern BOOL isSuper;
/////////////////////////////////////////////////////////////////////////////
// CCheckInView

IMPLEMENT_DYNCREATE(CCheckInView, CView)

BEGIN_MESSAGE_MAP(CCheckInView, CView)
	//{{AFX_MSG_MAP(CCheckInView)
	ON_COMMAND(ID_CHECKIN, OnCheckin)
	ON_COMMAND(ID_SYSTEM_CONFIG, OnSystemConfig)
	ON_COMMAND(ID_SYSTEM_EMPLOYEE, OnSystemEmployee)
	ON_COMMAND(ID_SYSTEM_USER, OnSystemUser)
	ON_COMMAND(ID_SEARCH_CHECKIN, OnSearchCheckin)
	ON_COMMAND(ID_MODIFY_CHECKIN, OnModifyCheckin)
	ON_UPDATE_COMMAND_UI(ID_SEARCH_CHECKIN, OnUpdateSearchCheckin)
	ON_UPDATE_COMMAND_UI(ID_MODIFY_CHECKIN, OnUpdateModifyCheckin)
	ON_UPDATE_COMMAND_UI(ID_SYSTEM_EMPLOYEE, OnUpdateSystemEmployee)
	ON_UPDATE_COMMAND_UI(ID_SYSTEM_USER, OnUpdateSystemUser)
	ON_UPDATE_COMMAND_UI(ID_SYSTEM_CONFIG, OnUpdateSystemConfig)
	//}}AFX_MSG_MAP
	// Standard printing commands
	ON_COMMAND(ID_FILE_PRINT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_DIRECT, CView::OnFilePrint)
	ON_COMMAND(ID_FILE_PRINT_PREVIEW, CView::OnFilePrintPreview)
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCheckInView construction/destruction

CCheckInView::CCheckInView()
{
	// TODO: add construction code here

}

CCheckInView::~CCheckInView()
{
}

BOOL CCheckInView::PreCreateWindow(CREATESTRUCT& cs)
{
	// TODO: Modify the Window class or styles here by modifying
	//  the CREATESTRUCT cs

	return CView::PreCreateWindow(cs);
}

/////////////////////////////////////////////////////////////////////////////
// CCheckInView drawing

void CCheckInView::OnDraw(CDC* pDC)
{
	CCheckInDoc* pDoc = GetDocument();
	ASSERT_VALID(pDoc);
	// TODO: add draw code for native data here
}

/////////////////////////////////////////////////////////////////////////////
// CCheckInView printing

BOOL CCheckInView::OnPreparePrinting(CPrintInfo* pInfo)
{
	// default preparation
	return DoPreparePrinting(pInfo);
}

void CCheckInView::OnBeginPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add extra initialization before printing
}

void CCheckInView::OnEndPrinting(CDC* /*pDC*/, CPrintInfo* /*pInfo*/)
{
	// TODO: add cleanup after printing
}

/////////////////////////////////////////////////////////////////////////////
// CCheckInView diagnostics

#ifdef _DEBUG
void CCheckInView::AssertValid() const
{
	CView::AssertValid();
}

void CCheckInView::Dump(CDumpContext& dc) const
{
	CView::Dump(dc);
}

CCheckInDoc* CCheckInView::GetDocument() // non-debug version is inline
{
	ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CCheckInDoc)));
	return (CCheckInDoc*)m_pDocument;
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CCheckInView message handlers

void CCheckInView::OnCheckin() 
{
	// TODO: Add your command handler code here
	CdlgCheckin dlg;
	dlg.DoModal();
}

void CCheckInView::OnSystemConfig() 
{
	// TODO: Add your command handler code here
	CdlgConfigSet dlg;
	dlg.DoModal();
}

void CCheckInView::OnSystemEmployee() 
{
	// TODO: Add your command handler code here
	CdlgEmployee dlg;
	dlg.DoModal();
}

void CCheckInView::OnSystemUser() 
{
	// TODO: Add your command handler code here
	CdlgUser dlgUser;
	dlgUser.DoModal();
}

void CCheckInView::OnSearchCheckin() 
{
	// TODO: Add your command handler code here
	CdlgQueryCheck dlgQueryCheck;
	dlgQueryCheck.DoModal();
}

void CCheckInView::OnModifyCheckin() 
{
	// TODO: Add your command handler code here
	CdlgEditCheck dlgEditCheck;
	dlgEditCheck.DoModal();
}

void CCheckInView::OnUpdateSearchCheckin(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	pCmdUI->Enable(isSuper);
}

void CCheckInView::OnUpdateModifyCheckin(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	pCmdUI->Enable(isSuper);
}

void CCheckInView::OnUpdateSystemEmployee(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	pCmdUI->Enable(isSuper);
}

void CCheckInView::OnUpdateSystemUser(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	pCmdUI->Enable(isSuper);
}

void CCheckInView::OnUpdateSystemConfig(CCmdUI* pCmdUI) 
{
	// TODO: Add your command update UI handler code here
	pCmdUI->Enable(isSuper);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -