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

📄 gastypeinfodlg.cpp

📁 这是一个加油站管理系统
💻 CPP
字号:
// GasTypeInfoDlg.cpp : implementation file
//

#include "stdafx.h"
#include "gasstation.h"
#include "GasTypeInfoDlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CGasTypeInfoDlg dialog


CGasTypeInfoDlg::CGasTypeInfoDlg(CWnd* pParent /*=NULL*/)
	: CDialog(CGasTypeInfoDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CGasTypeInfoDlg)
	m_strName = _T("");
	m_nNumber = 0;
	m_fPrice = 0.0f;
	//}}AFX_DATA_INIT
}


void CGasTypeInfoDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CGasTypeInfoDlg)
	DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
	DDX_Text(pDX, IDC_EDIT_NUMBER, m_nNumber);
	DDX_Text(pDX, IDC_EDIT_PRICE, m_fPrice);
	//}}AFX_DATA_MAP
}


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

/////////////////////////////////////////////////////////////////////////////
// CGasTypeInfoDlg message handlers

void CGasTypeInfoDlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData();
	
	if (m_strName.IsEmpty() ||
		m_fPrice <= 0 ) 
	{
		MB_ERROR("邮品信息错误,请重新输入!");
		return ;
	}
	
	CDialog::OnOK();
}

⌨️ 快捷键说明

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