83 lines
1.8 KiB
C++
83 lines
1.8 KiB
C++
// DLG_Setup_SZGJ_CD.cpp : implementation file
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "corpsms.h"
|
|
#include "DLG_Setup_SZGJ_CD.h"
|
|
|
|
#ifdef _DEBUG
|
|
#define new DEBUG_NEW
|
|
#undef THIS_FILE
|
|
static char THIS_FILE[] = __FILE__;
|
|
#endif
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_Setup_SZGJ_CD dialog
|
|
|
|
|
|
DLG_Setup_SZGJ_CD::DLG_Setup_SZGJ_CD(CWnd* pParent /*=NULL*/)
|
|
: CDialog(DLG_Setup_SZGJ_CD::IDD, pParent)
|
|
{
|
|
//{{AFX_DATA_INIT(DLG_Setup_SZGJ_CD)
|
|
m_strName = _T("");
|
|
m_strMaster = _T("");
|
|
m_strMobile = _T("");
|
|
//}}AFX_DATA_INIT
|
|
}
|
|
|
|
|
|
void DLG_Setup_SZGJ_CD::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialog::DoDataExchange(pDX);
|
|
//{{AFX_DATA_MAP(DLG_Setup_SZGJ_CD)
|
|
DDX_Text(pDX, IDC_SYSSETUP_SZGJ_CDNAME, m_strName);
|
|
DDV_MaxChars(pDX, m_strName, 58);
|
|
DDX_Text(pDX, IDC_SYSSETUP_SZGJ_CDMASTER, m_strMaster);
|
|
DDV_MaxChars(pDX, m_strMaster, 30);
|
|
DDX_Text(pDX, IDC_SYSSETUP_SZGJ_CDMOBILE, m_strMobile);
|
|
DDV_MaxChars(pDX, m_strMobile, 11);
|
|
//}}AFX_DATA_MAP
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DLG_Setup_SZGJ_CD, CDialog)
|
|
//{{AFX_MSG_MAP(DLG_Setup_SZGJ_CD)
|
|
//}}AFX_MSG_MAP
|
|
END_MESSAGE_MAP()
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// DLG_Setup_SZGJ_CD message handlers
|
|
|
|
BOOL DLG_Setup_SZGJ_CD::OnInitDialog()
|
|
{
|
|
CDialog::OnInitDialog();
|
|
|
|
m_strName = m_strCD;
|
|
UpdateData(false);
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|
}
|
|
|
|
void DLG_Setup_SZGJ_CD::OnOK()
|
|
{
|
|
if ( !UpdateData(true) )
|
|
return ;
|
|
|
|
if ( m_strName.GetLength()<=0 )
|
|
{
|
|
MessageBox( _T("车队名称不能为空,请输入车队名称!"),_T("错误"),MB_ICONWARNING );
|
|
return ;
|
|
}
|
|
|
|
if ( m_strMobile.GetLength()!=11 )
|
|
{
|
|
MessageBox( _T("车队手机号码位数不同车队名称不能为空,请输入车队名称!"),_T("错误"),MB_ICONWARNING );
|
|
return ;
|
|
}
|
|
|
|
m_strCD = m_strName;
|
|
CDialog::OnOK();
|
|
|
|
}
|