124 lines
2.8 KiB
C++
124 lines
2.8 KiB
C++
|
// DLG_Corp_TS_Modify.cpp : implementation file
|
|||
|
//
|
|||
|
|
|||
|
#include "stdafx.h"
|
|||
|
#include "smsmanager.h"
|
|||
|
#include "DLG_Corp_TS_Modify.h"
|
|||
|
|
|||
|
#ifdef _DEBUG
|
|||
|
#define new DEBUG_NEW
|
|||
|
#undef THIS_FILE
|
|||
|
static char THIS_FILE[] = __FILE__;
|
|||
|
#endif
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_Corp_TS_Modify dialog
|
|||
|
|
|||
|
|
|||
|
DLG_Corp_TS_Modify::DLG_Corp_TS_Modify(CWnd* pParent /*=NULL*/)
|
|||
|
: CDialog(DLG_Corp_TS_Modify::IDD, pParent)
|
|||
|
{
|
|||
|
//{{AFX_DATA_INIT(DLG_Corp_TS_Modify)
|
|||
|
m_strOperName = _T("");
|
|||
|
m_strProcess = _T("");
|
|||
|
m_strTSMsg = _T("");
|
|||
|
m_tTSTime = COleDateTime::GetCurrentTime();
|
|||
|
m_strTSType = _T("");
|
|||
|
//}}AFX_DATA_INIT
|
|||
|
|
|||
|
|
|||
|
m_pTSDlg = (DLG_Corp_TS *)pParent;
|
|||
|
memset( &m_TS,0,sizeof(m_TS));
|
|||
|
m_Pos = 0;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void DLG_Corp_TS_Modify::DoDataExchange(CDataExchange* pDX)
|
|||
|
{
|
|||
|
CDialog::DoDataExchange(pDX);
|
|||
|
//{{AFX_DATA_MAP(DLG_Corp_TS_Modify)
|
|||
|
DDX_Text(pDX, IDC_CORP_TSMODIFY_OPERNAME, m_strOperName);
|
|||
|
DDV_MaxChars(pDX, m_strOperName, 30);
|
|||
|
DDX_Text(pDX, IDC_CORP_TSRMODIFY_PROCESS, m_strProcess);
|
|||
|
DDV_MaxChars(pDX, m_strProcess, 250);
|
|||
|
DDX_Text(pDX, IDC_CORP_TSRMODIFY_TSMSG, m_strTSMsg);
|
|||
|
DDV_MaxChars(pDX, m_strTSMsg, 250);
|
|||
|
DDX_DateTimeCtrl(pDX, IDC_CORP_TSMODIFY_TSTIME, m_tTSTime);
|
|||
|
DDX_CBString(pDX, IDC_CORP_TSRMODIFY_TSTYPE, m_strTSType);
|
|||
|
DDV_MaxChars(pDX, m_strTSType, 30);
|
|||
|
//}}AFX_DATA_MAP
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
BEGIN_MESSAGE_MAP(DLG_Corp_TS_Modify, CDialog)
|
|||
|
//{{AFX_MSG_MAP(DLG_Corp_TS_Modify)
|
|||
|
//}}AFX_MSG_MAP
|
|||
|
END_MESSAGE_MAP()
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_Corp_TS_Modify message handlers
|
|||
|
|
|||
|
BOOL DLG_Corp_TS_Modify::OnInitDialog()
|
|||
|
{
|
|||
|
CDialog::OnInitDialog();
|
|||
|
|
|||
|
|
|||
|
m_strTSType = m_TS.szTSType;
|
|||
|
m_strOperName = m_TS.szOperName;
|
|||
|
m_strTSMsg = m_TS.szTSMsg;
|
|||
|
m_strProcess = m_TS.szTSProcess;
|
|||
|
COleDateTime t(m_TS.tTSTime);
|
|||
|
if ( t.GetStatus() != 0 )
|
|||
|
{
|
|||
|
m_tTSTime = COleDateTime::GetCurrentTime();
|
|||
|
}
|
|||
|
else
|
|||
|
{
|
|||
|
m_tTSTime = t;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
|
|||
|
this->UpdateData(false);
|
|||
|
|
|||
|
return TRUE; // return TRUE unless you set the focus to a control
|
|||
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|||
|
}
|
|||
|
|
|||
|
void DLG_Corp_TS_Modify::SetParam(ANS_Corp_TSData TS, POSITION pos)
|
|||
|
{
|
|||
|
m_TS = TS;
|
|||
|
m_Pos = pos;
|
|||
|
}
|
|||
|
|
|||
|
void DLG_Corp_TS_Modify::OnOK()
|
|||
|
{
|
|||
|
|
|||
|
UpdateData(true);
|
|||
|
if ( m_strOperName.GetLength() <= 0 )
|
|||
|
{
|
|||
|
MessageBox( _T("û<EFBFBD>в<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>!") , _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") , MB_ICONWARNING );
|
|||
|
GetDlgItem( IDC_CORP_TSMODIFY_OPERNAME )->SetFocus();
|
|||
|
return ;
|
|||
|
}
|
|||
|
|
|||
|
_tcscpy( m_TS.szTSType , m_strTSType );
|
|||
|
_tcscpy( m_TS.szOperName , m_strOperName );
|
|||
|
_tcscpy( m_TS.szTSMsg , m_strTSMsg );
|
|||
|
_tcscpy( m_TS.szTSProcess , m_strProcess );
|
|||
|
|
|||
|
if ( m_tTSTime.GetStatus() == 0 )
|
|||
|
m_tTSTime.GetAsSystemTime( m_TS.tTSTime );
|
|||
|
else
|
|||
|
memset(&m_TS.tTSTime,0,sizeof(m_TS.tTSTime));
|
|||
|
|
|||
|
|
|||
|
CDialog::OnOK();
|
|||
|
}
|
|||
|
|
|||
|
ANS_Corp_TSData DLG_Corp_TS_Modify::GetParam()
|
|||
|
{
|
|||
|
|
|||
|
return m_TS;
|
|||
|
}
|