📄 guesthouseview.cpp
字号:
// GuesthouseView.cpp : implementation of the CGuesthouseView class
//
#include "stdafx.h"
#include "Guesthouse.h"
#include "GuesthouseDoc.h"
#include "GuesthouseView.h"
#include "StdroomDlg.h"
#include "UpdateStdroom.h"
#include "Amputate.h"
#include "roominfoDlg.h"
#include "UpdateRoomDlg.h"
#include "DeleteroomDlg.h"
#include "checkRoomDlg.h"
#include "remainDlg.h"
#include "bookroomDlg.h"
#include "UpdelRoomDlg.h"
#include "checkBookroomDlg.h"
#include "bookOutDlg.h"
#include "dateOutDlg.h"
#include "checkBookOutDlg.h"
#include "LoginDlg.h"
#include "AddUserDlg.h"
#include "usrset.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CGuesthouseView
IMPLEMENT_DYNCREATE(CGuesthouseView, CView)
BEGIN_MESSAGE_MAP(CGuesthouseView, CView)
//{{AFX_MSG_MAP(CGuesthouseView)
ON_COMMAND(ID_MENU_ADDSTDROOM, OnMenuAddstdroom)
ON_COMMAND(ID_MENU_ALTERSTDROOM, OnMenuAlterstdroom)
ON_COMMAND(ID_MENU_DELSTDROOM, OnMenuDelstdroom)
ON_COMMAND(ID_MENU_ADDROOM, OnMenuAddroom)
ON_COMMAND(ID_MENU_ALTERROOM, OnMenuAlterroom)
ON_COMMAND(ID_MENU_DELROOM, OnMenuDelroom)
ON_COMMAND(ID_MENU_CHECKROOM, OnMenuCheckroom)
ON_COMMAND(ID_MENU_CHECKREMAIN, OnMenuCheckremain)
ON_COMMAND(ID_MENU_ADDBOOKROOM, OnMenuAddbookroom)
ON_COMMAND(ID_MENU_ALTERBOOKROOM, OnMenuAlterbookroom)
ON_COMMAND(ID_MENU_SEARCHBOOKROOM, OnMenuSearchbookroom)
ON_COMMAND(ID_MENU_ADDCHECKOUT, OnMenuAddcheckout)
ON_COMMAND(ID_MENU_ALTERCHECKOUT, OnMenuAltercheckout)
ON_COMMAND(ID_MENU_SEARCHCHECKOUT, OnMenuSearchcheckout)
ON_COMMAND(ID_MAINMENU_CHANGEPWD, OnMainmenuChangepwd)
ON_COMMAND(ID_MAINMENU_APPENDACCOUNT, OnMainmenuAppendaccount)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CGuesthouseView construction/destruction
CGuesthouseView::CGuesthouseView()
{
// TODO: add construction code here
}
CGuesthouseView::~CGuesthouseView()
{
}
BOOL CGuesthouseView::PreCreateWindow(CREATESTRUCT& cs)
{
// TODO: Modify the Window class or styles here by modifying
// the CREATESTRUCT cs
return CView::PreCreateWindow(cs);
}
/////////////////////////////////////////////////////////////////////////////
// CGuesthouseView drawing
void CGuesthouseView::OnDraw(CDC* pDC)
{
CGuesthouseDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
CBitmap m_bmp;
m_bmp.LoadBitmap(IDB_BITMAP1);
BITMAP bm;
m_bmp.GetObject(sizeof(BITMAP),&bm);
CDC dcMem;
dcMem.CreateCompatibleDC(pDC);
CBitmap *pOldbmp = dcMem.SelectObject(&m_bmp);
pDC->BitBlt(0,0,bm.bmWidth,bm.bmHeight,&dcMem,0,0,SRCCOPY);
dcMem.SelectObject(pOldbmp);
// TODO: add draw code for native data here
}
/////////////////////////////////////////////////////////////////////////////
// CGuesthouseView diagnostics
#ifdef _DEBUG
void CGuesthouseView::AssertValid() const
{
CView::AssertValid();
}
void CGuesthouseView::Dump(CDumpContext& dc) const
{
CView::Dump(dc);
}
CGuesthouseDoc* CGuesthouseView::GetDocument() // non-debug version is inline
{
ASSERT(m_pDocument->IsKindOf(RUNTIME_CLASS(CGuesthouseDoc)));
return (CGuesthouseDoc*)m_pDocument;
}
#endif //_DEBUG
/////////////////////////////////////////////////////////////////////////////
// CGuesthouseView message handlers
void CGuesthouseView::OnMenuAddstdroom()
{
// TODO: Add your command handler code here
CStdroomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAlterstdroom()
{
// TODO: Add your command handler code here
CUpdateStdroom dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuDelstdroom()
{
// TODO: Add your command handler code here
CAmputate dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAddroom()
{
// TODO: Add your command handler code here
CroominfoDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAlterroom()
{
// TODO: Add your command handler code here
CUpdateRoomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuDelroom()
{
// TODO: Add your command handler code here
CDeleteroomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuCheckroom()
{
// TODO: Add your command handler code here
CcheckRoomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuCheckremain()
{
// TODO: Add your command handler code here
CremainDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAddbookroom()
{
// TODO: Add your command handler code here
CbookroomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAlterbookroom()
{
// TODO: Add your command handler code here
UpdelRoomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuSearchbookroom()
{
// TODO: Add your command handler code here
CcheckBookroomDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAddcheckout()
{
// TODO: Add your command handler code here
CbookOutDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuAltercheckout()
{
// TODO: Add your command handler code here
CdateOutDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMenuSearchcheckout()
{
// TODO: Add your command handler code here
CcheckBookOutDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
void CGuesthouseView::OnMainmenuChangepwd()
{
// TODO: Add your command handler code here
CLoginDlg dlg;
dlg.DoModal();
}
void CGuesthouseView::OnMainmenuAppendaccount()
{
// TODO: Add your command handler code here
CAddUserDlg dlg;
if (dlg.DoModal()!=IDOK)
{
return;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -