88 lines
1.5 KiB
C++
88 lines
1.5 KiB
C++
#include "stdafx.h"
|
|
#include "GZCLDlg.h"
|
|
|
|
IMPLEMENT_DYNAMIC(CGZCLDlg, CDialog)
|
|
|
|
CGZCLDlg::CGZCLDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CGZCLDlg::IDD, pParent)
|
|
, m_nDN(75)
|
|
, m_dOD(82)
|
|
, m_dt(5)
|
|
, m_sMat(_T("PVC管材"))
|
|
, m_dWe(0.5)
|
|
, m_sMatCode(_T("PVC-CN1999"))
|
|
, m_sSCode(_T(""))
|
|
, m_sODSN(_T("A"))
|
|
, m_sStd(_T(""))
|
|
{
|
|
}
|
|
|
|
CGZCLDlg::~CGZCLDlg()
|
|
{
|
|
}
|
|
|
|
void CGZCLDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
DDX_Text(pDX, IDC_EDIT1, m_nDN);
|
|
DDX_Text(pDX, IDC_EDIT2, m_dOD);
|
|
DDX_Text(pDX, IDC_EDIT3, m_dt);
|
|
DDX_Text(pDX, IDC_EDIT4, m_sMat);
|
|
DDX_Text(pDX, IDC_EDIT5, m_dWe);
|
|
DDX_Text(pDX, IDC_EDIT6, m_sMatCode);
|
|
DDX_Text(pDX, IDC_EDIT9, m_sSCode);
|
|
DDX_Text(pDX, IDC_EDIT10, m_sODSN);
|
|
DDX_Text(pDX, IDC_EDIT7, m_sStd);
|
|
}
|
|
|
|
BEGIN_MESSAGE_MAP(CGZCLDlg, CDialog)
|
|
ON_BN_CLICKED(IDOK, &CGZCLDlg::OnBnClickedOk)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
BOOL CGZCLDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
UpdateData(FALSE);
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CGZCLDlg::OnBnClickedOk()
|
|
{
|
|
UpdateData();
|
|
|
|
if (m_nDN < 1)
|
|
{
|
|
AfxMessageBox(_T("公称直径太小!"));
|
|
return;
|
|
}
|
|
|
|
if (m_dOD < m_nDN)
|
|
{
|
|
AfxMessageBox(_T("外径太小!至少大于等于公称直径"));
|
|
return;
|
|
}
|
|
|
|
if (m_dt < 1.0 )
|
|
{
|
|
AfxMessageBox(_T("壁厚太小!至少大于1毫米"));
|
|
return;
|
|
}
|
|
|
|
if (m_sSCode.IsEmpty() || m_sODSN.IsEmpty())
|
|
{
|
|
AfxMessageBox(_T("表号外径系列不能为空!"));
|
|
return;
|
|
}
|
|
|
|
if (m_sStd.IsEmpty())
|
|
{
|
|
AfxMessageBox(_T("执行标准不能为空!"));
|
|
return;
|
|
}
|
|
|
|
OnOK();
|
|
}
|