// DLG_C_CMCCCJ_Pay.cpp : implementation file // #include "stdafx.h" #include "smsmanager.h" #include "DLG_C_CMCCCJ_Pay.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_C_CMCCCJ_Pay dialog DLG_C_CMCCCJ_Pay::DLG_C_CMCCCJ_Pay(CWnd* pParent /*=NULL*/) : CDialog(DLG_C_CMCCCJ_Pay::IDD, pParent) { //{{AFX_DATA_INIT(DLG_C_CMCCCJ_Pay) m_strBZ = _T(""); m_tTime = COleDateTime::GetCurrentTime(); m_fPayTotal = 0.0f; //}}AFX_DATA_INIT } void DLG_C_CMCCCJ_Pay::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_C_CMCCCJ_Pay) DDX_Text(pDX, IDD_C_AGENTCJ_PAY_BZ, m_strBZ); DDV_MaxChars(pDX, m_strBZ, 120); DDX_DateTimeCtrl(pDX, IDD_C_AGENTCJ_PAY_TIME, m_tTime); DDX_Text(pDX, IDD_C_AGENTCJ_PAY_PRICE, m_fPayTotal); DDV_MinMaxFloat(pDX, m_fPayTotal, 0.f, 1.e+007f); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_C_CMCCCJ_Pay, CDialog) //{{AFX_MSG_MAP(DLG_C_CMCCCJ_Pay) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_C_CMCCCJ_Pay message handlers void DLG_C_CMCCCJ_Pay::OnOK() { if(!UpdateData(true) ) return ; if (m_fPayTotal<=0.0f) { MessageBox( _T("请先输入实收金额!") , _T("错误") , MB_ICONWARNING ); GetDlgItem(IDD_C_AGENTCJ_PAY_PRICE)->SetFocus(); return; } CDialog::OnOK(); }