AgentManager/DLG_YJ.cpp

89 lines
1.8 KiB
C++
Raw Normal View History

2025-01-22 15:45:17 +08:00
// DLG_YJ.cpp : implementation file
//
#include "stdafx.h"
#include "SmsManager.h"
#include "DLG_YJ.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// DLG_YJ dialog
DLG_YJ::DLG_YJ(CWnd* pParent /*=NULL*/)
: CDialog(DLG_YJ::IDD, pParent)
{
//{{AFX_DATA_INIT(DLG_YJ)
m_strBZ = _T("");
m_strEmail = _T("");
m_strName = _T("");
m_strTel = _T("");
m_strType = _T("");
//}}AFX_DATA_INIT
}
void DLG_YJ::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(DLG_YJ)
DDX_Text(pDX, IDC_YJ_BZ, m_strBZ);
DDV_MaxChars(pDX, m_strBZ, 510);
DDX_Text(pDX, IDC_YJ_EMAIL, m_strEmail);
DDV_MaxChars(pDX, m_strEmail, 62);
DDX_Text(pDX, IDC_YJ_NAME, m_strName);
DDV_MaxChars(pDX, m_strName, 30);
DDX_Text(pDX, IDC_YJ_TEL, m_strTel);
DDV_MaxChars(pDX, m_strTel, 30);
DDX_CBString(pDX, IDC_YJ_TYPE, m_strType);
DDV_MaxChars(pDX, m_strType, 14);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_YJ, CDialog)
//{{AFX_MSG_MAP(DLG_YJ)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_YJ message handlers
void DLG_YJ::OnOK()
{
if ( !UpdateData(true) )
return ;
if ( m_strBZ.GetLength()<=0 )
{
MessageBox( _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݺ<EFBFBD><EFBFBD>ٰ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") , _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") ,MB_ICONWARNING );
return ;
}
CDialog::OnOK();
}
BOOL DLG_YJ::OnInitDialog()
{
CDialog::OnInitDialog();
m_strType = m_strType2;
m_strBZ = m_strBZ2;
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DLG_YJ::SetBZ(const TCHAR * pType , const TCHAR *pBZ)
{
m_strType2 = pType;
m_strBZ2 = pBZ;
}