// DLG_CheckupSee.cpp : implementation file // #include "stdafx.h" #include "smsmanager.h" #include "DLG_CheckupSee.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_CheckupSee dialog DLG_CheckupSee::DLG_CheckupSee(CWnd* pParent /*=NULL*/) : CDialog(DLG_CheckupSee::IDD, pParent) { //{{AFX_DATA_INIT(DLG_CheckupSee) m_strCorpID = _T(""); m_strMsg = _T(""); m_strRecvNum = _T(""); m_strSender = _T(""); m_strSubTime = _T(""); //}}AFX_DATA_INIT memset( &m_Checkup , 0 , sizeof(m_Checkup)); memset(&m_Task, 0, sizeof(m_Task)); m_lCheckupType = 0; } void DLG_CheckupSee::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_CheckupSee) DDX_Text(pDX, IDC_CHECKUPSEE_CORPID, m_strCorpID); DDX_Text(pDX, IDC_CHECKUPSEE_MSG, m_strMsg); DDX_Text(pDX, IDC_CHECKUPSEE_RECVNUM, m_strRecvNum); DDX_Text(pDX, IDC_CHECKUPSEE_SENDER, m_strSender); DDX_Text(pDX, IDC_CHECKUPSEE_SUBTIME, m_strSubTime); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_CheckupSee, CDialog) //{{AFX_MSG_MAP(DLG_CheckupSee) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_CheckupSee message handlers BOOL DLG_CheckupSee::OnInitDialog() { CDialog::OnInitDialog(); if (m_lCheckupType == 1) { m_strCorpID.Format(_T("%d - %s"), m_Task.lCorpID, m_Task.szCorpName); m_strSender = m_Task.szCreateUser; m_strRecvNum.Format(_T("%d/%d"),m_Task.lYFMobileCount,m_Task.lMobileCount); m_strSubTime.Format(_T("%04d.%02d.%02d %02d:%02d"), m_Task.tCreateTime.wYear, m_Task.tCreateTime.wMonth, m_Task.tCreateTime.wDay, m_Task.tCreateTime.wHour, m_Task.tCreateTime.wMinute); m_strMsg = m_Task.szMsg; } else { m_strCorpID.Format(_T("%d"), m_Checkup.lCorpID); m_strSender = m_Checkup.szSender; m_strRecvNum = m_Checkup.szRecvNum; m_strSubTime.Format(_T("%04d.%02d.%02d %02d:%02d"), m_Checkup.tSubTime.wYear, m_Checkup.tSubTime.wMonth, m_Checkup.tSubTime.wDay, m_Checkup.tSubTime.wHour, m_Checkup.tSubTime.wMinute); m_strMsg = m_Checkup.szMsg; } UpdateData(false); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } void DLG_CheckupSee::SetParam(ANS_Checkup_SeeData checkup) { m_Checkup = checkup; m_lCheckupType = 0; } void DLG_CheckupSee::SetParam2(ANS_PLTaskSms_SeeData checkup) { m_Task = checkup; m_lCheckupType = 1; }