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

📄 dbuilding.cpp

📁 学生住宿管理系统 本程序用于交流方面,仅共学习交流,用于其他方面 功能欠缺
💻 CPP
字号:
// Dbuilding.cpp : implementation file
//

#include "stdafx.h"
#include "Dormitory.h"
#include "Dbuilding.h"
#include "building.h"
#include "objectset.h"
#include "floor.h"
#include <stdlib.h>
#include "Afxdisp.h"
#include <stdio.h>
#include "BuildingCreate.h"
#include "Dorsystem.h"

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

/////////////////////////////////////////////////////////////////////////////
// Dbuilding dialog


Dbuilding::Dbuilding(CWnd* pParent /*=NULL*/)
	: CDialog(Dbuilding::IDD, pParent)
{
	//{{AFX_DATA_INIT(Dbuilding)
	m_floor = _T("");
	m_manager = _T("");
	m_no = _T("");
	m_room = _T("");
	m_tel = _T("");
	m_size = _T("");
	m_balcony = FALSE;
	m_toilet = FALSE;
	//}}AFX_DATA_INIT
}


void Dbuilding::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(Dbuilding)
	DDX_Text(pDX, IDC_EDIT_floor, m_floor);
	DDX_Text(pDX, IDC_EDIT_manager, m_manager);
	DDX_Text(pDX, IDC_EDIT_no, m_no);
	DDX_Text(pDX, IDC_EDIT_room, m_room);
	DDX_Text(pDX, IDC_EDIT_tel, m_tel);
	DDX_Text(pDX, IDC_EDITsize, m_size);
	DDX_Check(pDX, IDC_CHECKbal, m_balcony);
	DDX_Check(pDX, IDC_CHECKtoilet, m_toilet);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(Dbuilding, CDialog)
	//{{AFX_MSG_MAP(Dbuilding)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// Dbuilding message handlers
extern CDormitoryApp theApp;
BOOL Dbuilding::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	UpdateData();

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void Dbuilding::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();

    Dorsystem dor;//宿舍管理系统对象
	CString bal;
	CString tol;
    BuildingCreate *bc;
	if(m_balcony)
       bal="有阳台";
	else
	   bal="无阳台";
	if(m_toilet)
		tol="有厕所";
	else
		tol="无厕所";
	bc=dor.CreateBC();//创建宿舍楼信息输入对象
	if(bc->input(m_no,m_floor,m_room,m_manager,m_tel,bal,tol,m_size))
	{ //读入信息
	 Cbuilding *bd;
	 bd=bc->create();//创建宿舍楼对象,并保存在对象集合中
	}
    else
		return;
	m_no="";	
	m_floor="";	
	m_room="";
	m_manager="";
	m_tel="";
	m_size="";
	m_balcony=false;
	m_toilet=false;
    UpdateData(false);
}

void Dbuilding::OnCancel() 
{
	// TODO: Add extra cleanup here
	
	CDialog::OnCancel();
}

⌨️ 快捷键说明

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