48 lines
842 B
C++
48 lines
842 B
C++
#include "stdafx.h"
|
|
#include "TJJZDlg.h"
|
|
|
|
IMPLEMENT_DYNAMIC(CTJJZDlg, CDialog)
|
|
|
|
CTJJZDlg::CTJJZDlg(CWnd* pParent /*=NULL*/)
|
|
: CDialog(CTJJZDlg::IDD, pParent)
|
|
, m_sMedia(_T(""))
|
|
, m_sDesc(_T(""))
|
|
{
|
|
|
|
}
|
|
|
|
CTJJZDlg::~CTJJZDlg()
|
|
{
|
|
}
|
|
|
|
void CTJJZDlg::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
DDX_Text(pDX, IDC_EDIT1, m_sMedia);
|
|
DDX_Text(pDX, IDC_EDIT2, m_sDesc);
|
|
}
|
|
|
|
BEGIN_MESSAGE_MAP(CTJJZDlg, CDialog)
|
|
ON_BN_CLICKED(IDOK, &CTJJZDlg::OnBnClickedOk)
|
|
END_MESSAGE_MAP()
|
|
|
|
BOOL CTJJZDlg::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
return TRUE;
|
|
}
|
|
|
|
void CTJJZDlg::OnBnClickedOk()
|
|
{
|
|
UpdateData();
|
|
|
|
m_sMedia.TrimRight();m_sMedia.TrimLeft();
|
|
m_sDesc.TrimRight();m_sDesc.TrimLeft();
|
|
if (m_sMedia.IsEmpty() || m_sDesc.IsEmpty())
|
|
{
|
|
AfxMessageBox(_T("介质代号和介质描述不能为空!"));
|
|
return;
|
|
}
|
|
OnOK();
|
|
} |