91 lines
2.0 KiB
C++
91 lines
2.0 KiB
C++
// DLG_SmsLog_MO.cpp : 实现文件
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "CorpSms.h"
|
|
#include "DLG_SmsLog_MO.h"
|
|
#include "afxdialogex.h"
|
|
|
|
|
|
// DLG_SmsLog_MO 对话框
|
|
|
|
IMPLEMENT_DYNAMIC(DLG_SmsLog_MO, CDialogEx)
|
|
|
|
DLG_SmsLog_MO::DLG_SmsLog_MO(CWnd* pParent /*=NULL*/)
|
|
: CDialogEx(DLG_SmsLog_MO::IDD, pParent)
|
|
{
|
|
|
|
m_tBegin = COleDateTime::GetCurrentTime();
|
|
m_tBegin2 = COleDateTime::GetCurrentTime();
|
|
m_tEnd = COleDateTime::GetCurrentTime();
|
|
m_tEnd2 = COleDateTime::GetCurrentTime();
|
|
}
|
|
|
|
DLG_SmsLog_MO::~DLG_SmsLog_MO()
|
|
{
|
|
}
|
|
|
|
void DLG_SmsLog_MO::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialogEx::DoDataExchange(pDX);
|
|
DDX_DateTimeCtrl(pDX, IDD_SMSLOG_MO_BEGIN, m_tBegin);
|
|
DDX_DateTimeCtrl(pDX, IDD_SMSLOG_MO_BEGIN2, m_tBegin2);
|
|
DDX_DateTimeCtrl(pDX, IDD_SMSLOG_MO_END, m_tEnd);
|
|
DDX_DateTimeCtrl(pDX, IDD_SMSLOG_MO_END2, m_tEnd2);
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DLG_SmsLog_MO, CDialogEx)
|
|
ON_BN_CLICKED(IDOK, &DLG_SmsLog_MO::OnBnClickedOk)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
// DLG_SmsLog_MO 消息处理程序
|
|
|
|
|
|
void DLG_SmsLog_MO::OnBnClickedOk()
|
|
{
|
|
if ( !UpdateData(true) )
|
|
return ;
|
|
|
|
m_ttBegin.SetDateTime(m_tBegin.GetYear(),m_tBegin.GetMonth(),m_tBegin.GetDay(),m_tBegin2.GetHour(),m_tBegin2.GetMinute(),m_tBegin2.GetSecond());
|
|
m_ttEnd.SetDateTime(m_tEnd.GetYear(),m_tEnd.GetMonth(),m_tEnd.GetDay(),m_tEnd2.GetHour(),m_tEnd2.GetMinute(),m_tEnd2.GetSecond());
|
|
|
|
if ( m_ttBegin.GetStatus()!=COleDateTime::valid || m_ttEnd.GetStatus()!=COleDateTime::valid)
|
|
{
|
|
MessageBox(_T("起始时间或结束时间格式有误,请检查"),_T("错误") ,MB_ICONWARNING );
|
|
return ;
|
|
}
|
|
|
|
if ( m_ttBegin>m_ttEnd)
|
|
{
|
|
MessageBox(_T("起始时间不能大于结束时间,请检查"),_T("错误") ,MB_ICONWARNING );
|
|
return ;
|
|
}
|
|
|
|
|
|
CDialogEx::OnOK();
|
|
}
|
|
|
|
|
|
void DLG_SmsLog_MO::SetParam(COleDateTime tBegin,COleDateTime tEnd)
|
|
{
|
|
m_ttBegin = tBegin;
|
|
m_ttEnd = tEnd;
|
|
}
|
|
|
|
BOOL DLG_SmsLog_MO::OnInitDialog()
|
|
{
|
|
CDialogEx::OnInitDialog();
|
|
|
|
m_tBegin = m_ttBegin;
|
|
m_tBegin2 = m_ttBegin;
|
|
m_tEnd = m_ttEnd;
|
|
m_tEnd2 = m_ttEnd;
|
|
|
|
UpdateData(false);
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// 异常: OCX 属性页应返回 FALSE
|
|
}
|