AgentManager/DLG_Other_Add.cpp
2025-01-22 15:45:17 +08:00

83 lines
1.7 KiB
C++

// DLG_Other_Add.cpp : implementation file
//
#include "stdafx.h"
#include "smsmanager.h"
#include "DLG_Other_Add.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DLG_Other_Add dialog
DLG_Other_Add::DLG_Other_Add(CWnd* pParent /*=NULL*/)
: CDialog(DLG_Other_Add::IDD, pParent)
{
//{{AFX_DATA_INIT(DLG_Other_Add)
m_strMobile = _T("");
m_strName = _T("");
//}}AFX_DATA_INIT
}
void DLG_Other_Add::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DLG_Other_Add)
DDX_Text(pDX, IDC_OHTER_ADD_MOBILE, m_strMobile);
DDV_MaxChars(pDX, m_strMobile, 24);
DDX_Text(pDX, IDC_OHTER_ADD_NAME, m_strName);
DDV_MaxChars(pDX, m_strName, 24);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_Other_Add, CDialog)
//{{AFX_MSG_MAP(DLG_Other_Add)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_Other_Add message handlers
BOOL DLG_Other_Add::OnInitDialog()
{
CDialog::OnInitDialog();
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DLG_Other_Add::OnOK()
{
if (!UpdateData(true))
return ;
if ( m_strName.GetLength()<=0 )
{
MessageBox( _T("管理员姓名不能为空,请输入!"),_T("错误"),MB_ICONWARNING);
return;
}
if ( m_strMobile.GetLength()<=0 )
{
MessageBox( _T("管理员手机号码不能为空,请输入!"),_T("错误"),MB_ICONWARNING);
return;
}
CDialog::OnOK();
}
void DLG_Other_Add::SetParam(CString strName, CString strMobile)
{
m_strName = strName;
m_strMobile = strMobile;
}