CorpSms/DLG_YJ.cpp
2025-02-27 16:58:16 +08:00

129 lines
3.1 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// DLG_YJ.cpp : implementation file
//
#include "stdafx.h"
#include "corpsms.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,const TCHAR * pType /*=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("");
m_strS1 = _T("");
//}}AFX_DATA_INIT
m_strType2 = pType;
}
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, 60);
DDX_Text(pDX, IDC_YJ_S1, m_strS1);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(DLG_YJ, CDialog)
//{{AFX_MSG_MAP(DLG_YJ)
ON_CBN_SELCHANGE(IDC_YJ_TYPE, OnSelchangeYjType)
//}}AFX_MSG_MAP
ON_BN_CLICKED(IDOK, &DLG_YJ::OnBnClickedOk)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// DLG_YJ message handlers
BOOL DLG_YJ::OnInitDialog()
{
CDialog::OnInitDialog();
#ifdef MOBSET_OEM
m_strS1 = _T(" 为了此软件的更好发展,如果你对本软件有任何意见、建议或投诉都可直接填写以下表格!\r\n\r\n 请尽量将问题描述清晰,我们收到此表格后,会尽快处理并及时回复!\r\n\r\n");
#else
m_strS1 = _T(" 为了此软件的更好发展,如果你对本软件有任何意见、建议或投诉都可直接填写以下表格!\r\n\r\n 请尽量将问题描述清晰,我们收到此表格后,会尽快处理并及时回复!\r\n\r\n 客服电话400-111-0168。");
#endif
UpdateData(false);
OnSelchangeYjType();
m_strType = m_strType2;
UpdateData(false);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void DLG_YJ::OnSelchangeYjType()
{
if ( !UpdateData(true) )
return ;
CString strTemp;
if ( m_strType == _T("充值") )
{
MessageBox( _T("你选择了\"充值\"项,需要在\"说明\"一栏里填入指定的信息!") , _T("提示") , MB_ICONINFORMATION );
strTemp = _T("汇入银行:\r\n汇入帐号:\r\n汇入金额:\r\n");
}
if ( m_strType == _T("申请改发送设置") )
{
MessageBox( _T("你选择了\"申请改发送设置\"项,需要在\"说明\"一栏里填入指定的信息!") , _T("提示"), MB_ICONINFORMATION );
strTemp = _T("提交速度改为:\r\n是否需要自动重发:\r\n");
}
if ( m_strType == _T("申请改签名") )
{
MessageBox( _T("你选择了\"申请改签名\"项,需要在\"说明\"一栏里填入指定的信息!") , _T("提示") , MB_ICONINFORMATION );
strTemp = _T("新的签名为:\r\n\r\n(签名格式:地区+企业简称)");
}
//if ( strTemp.GetLength()>0 )
{
m_strBZ = strTemp;
}
UpdateData(false);
}
void DLG_YJ::OnBnClickedOk()
{
if ( !UpdateData(true) )
return ;
if ( m_strBZ.GetLength()<=0 )
{
MessageBox( _T("请先输入内容后再按提交!") , _T("错误") ,MB_ICONWARNING );
return ;
}
UpdateData(false);
CDialog::OnOK();
}