219 lines
5.3 KiB
C++
219 lines
5.3 KiB
C++
|
// DLG_C_MonPay_See.cpp : implementation file
|
|||
|
//
|
|||
|
|
|||
|
#include "stdafx.h"
|
|||
|
#include "smsmanager.h"
|
|||
|
#include "DLG_C_MonPay_See.h"
|
|||
|
|
|||
|
#ifdef _DEBUG
|
|||
|
#define new DEBUG_NEW
|
|||
|
#undef THIS_FILE
|
|||
|
static char THIS_FILE[] = __FILE__;
|
|||
|
#endif
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_C_MonPay_See dialog
|
|||
|
|
|||
|
|
|||
|
DLG_C_MonPay_See::DLG_C_MonPay_See(CWnd* pParent /*=NULL*/)
|
|||
|
: CDialog(DLG_C_MonPay_See::IDD, pParent)
|
|||
|
{
|
|||
|
//{{AFX_DATA_INIT(DLG_C_MonPay_See)
|
|||
|
m_strMsg = _T("");
|
|||
|
m_strName = _T("");
|
|||
|
m_strPayTime = _T("");
|
|||
|
m_strPrice = _T("");
|
|||
|
m_strPriceOne = _T("");
|
|||
|
m_strSmsCount = _T("");
|
|||
|
//}}AFX_DATA_INIT
|
|||
|
|
|||
|
memset(&m_Pay,0,sizeof(m_Pay));
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void DLG_C_MonPay_See::DoDataExchange(CDataExchange* pDX)
|
|||
|
{
|
|||
|
CDialog::DoDataExchange(pDX);
|
|||
|
//{{AFX_DATA_MAP(DLG_C_MonPay_See)
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_MSG, m_strMsg);
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_NAME, m_strName);
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_PAYTIME, m_strPayTime);
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_PRICE, m_strPrice);
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_PRICEONE, m_strPriceOne);
|
|||
|
DDX_Text(pDX, IDD_C_MONPAY_SEE_SMSCOUNT, m_strSmsCount);
|
|||
|
//}}AFX_DATA_MAP
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
BEGIN_MESSAGE_MAP(DLG_C_MonPay_See, CDialog)
|
|||
|
//{{AFX_MSG_MAP(DLG_C_MonPay_See)
|
|||
|
ON_BN_CLICKED(IDD_C_MONPAY_SEE_COPY, OnCMonpaySeeCopy)
|
|||
|
//}}AFX_MSG_MAP
|
|||
|
END_MESSAGE_MAP()
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_C_MonPay_See message handlers
|
|||
|
|
|||
|
void DLG_C_MonPay_See::SetParam(ANS_Corp_MonPayData pay)
|
|||
|
{
|
|||
|
m_Pay = pay;
|
|||
|
}
|
|||
|
|
|||
|
BOOL DLG_C_MonPay_See::OnInitDialog()
|
|||
|
{
|
|||
|
CDialog::OnInitDialog();
|
|||
|
|
|||
|
m_strName.Format( _T("%d-%s") , m_Pay.lCorpID , m_Pay.szCorpName );
|
|||
|
m_strPayTime.Format( _T("%04d.%02d") , m_Pay.tPayTime.wYear , m_Pay.tPayTime.wMonth );
|
|||
|
|
|||
|
m_strPrice.Format( _T("%.2f") , m_Pay.fPrice );
|
|||
|
m_strPriceOne.Format( _T("%.4f") , m_Pay.fPriceOne );
|
|||
|
m_strSmsCount.Format( _T("%d") , m_Pay.lSMSCount );
|
|||
|
|
|||
|
|
|||
|
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʵ<EFBFBD>
|
|||
|
|
|||
|
|
|||
|
CString strTemp,strTemp2;
|
|||
|
CString strHead;
|
|||
|
CString strJCB;
|
|||
|
strHead += _T(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB>ʵ<EFBFBD>\r\n\r\n\r\n");
|
|||
|
strTemp.Format( _T(" <20><>ҵID:%d\r\n") , m_Pay.lCorpID );
|
|||
|
strHead += strTemp;
|
|||
|
strTemp.Format( _T(" <20><>ҵ<EFBFBD><D2B5><EFBFBD><EFBFBD>:%s\r\n") , m_Pay.szCorpName );
|
|||
|
strHead += strTemp;
|
|||
|
strTemp.Format( _T(" <20>ʵ<EFBFBD><CAB5>·<EFBFBD>:%04d.%02d\r\n"),m_Pay.tPayTime.wYear,m_Pay.tPayTime.wMonth);
|
|||
|
strHead += strTemp;
|
|||
|
strTemp.Format( _T(" <20><><EFBFBD>ŵ<EFBFBD><C5B5><EFBFBD>:%.4f\r\n"),m_Pay.fPriceOne);
|
|||
|
strHead += strTemp;
|
|||
|
strTemp.Format( _T(" <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:%04d\r\n"),m_Pay.lSMSCount);
|
|||
|
strHead += strTemp;
|
|||
|
strTemp.Format( _T(" <20>ʵ<EFBFBD><CAB5><EFBFBD><EFBFBD><EFBFBD>:%.2f\r\n"),m_Pay.fPrice);
|
|||
|
strHead += strTemp;
|
|||
|
//<2F><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ϸ
|
|||
|
long lSmsCount = 0;
|
|||
|
long lSmsSFCount = 0;
|
|||
|
CString strTab=_T("\r\n\r\n <20><> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ʒ<EFBFBD><C6B7><EFBFBD><EFBFBD><EFBFBD>\r\n");
|
|||
|
strTab+=_T(" =========================================\r\n");
|
|||
|
for ( int i=0;i<9;i++)
|
|||
|
{
|
|||
|
|
|||
|
strTemp=_T("δ֪");
|
|||
|
switch( i )
|
|||
|
{
|
|||
|
case SMSTYPE_SEND:
|
|||
|
strTemp=_T("<EFBFBD><EFBFBD> <20><>");
|
|||
|
break;
|
|||
|
case SMSTYPE_ZF:
|
|||
|
strTemp=_T("ת <20><>");
|
|||
|
break;
|
|||
|
case SMSTYPE_ALARM:
|
|||
|
strTemp=_T("<EFBFBD>ճ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
break;
|
|||
|
case SMSTYPE_EMAIL:
|
|||
|
strTemp=_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʲ<EFBFBD>");
|
|||
|
break;
|
|||
|
case SMSTYPE_RECV:
|
|||
|
strTemp=_T("<EFBFBD><EFBFBD> <20><>");
|
|||
|
break;
|
|||
|
case SMSTYPE_SP:
|
|||
|
strTemp=_T("ʵ<EFBFBD>ö<EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
break;
|
|||
|
case SMSTYPE_SWT:
|
|||
|
strTemp=_T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ͨ");
|
|||
|
break;
|
|||
|
default:
|
|||
|
continue;
|
|||
|
break;
|
|||
|
}
|
|||
|
|
|||
|
strTemp2.Format( _T("%15s") , strTemp );
|
|||
|
strTemp= strTemp2;
|
|||
|
strTemp2.Format( _T(" %11d") , m_Pay.KF[i].lSend );
|
|||
|
strTemp+= strTemp2;
|
|||
|
strTemp2.Format( _T(" %11d") , m_Pay.KF[i].lKF );
|
|||
|
strTemp+= strTemp2;
|
|||
|
strTemp+=_T("\r\n");
|
|||
|
|
|||
|
strTab += strTemp;
|
|||
|
|
|||
|
lSmsCount += m_Pay.KF[i].lSend;
|
|||
|
lSmsSFCount += m_Pay.KF[i].lKF;
|
|||
|
}
|
|||
|
strTab+=_T(" -----------------------------------------\r\n");
|
|||
|
strTemp2.Format( _T("%15s") , _T("<EFBFBD><EFBFBD>") );
|
|||
|
strTemp= strTemp2;
|
|||
|
strTemp2.Format( _T(" %11d") , lSmsCount );
|
|||
|
strTemp+= strTemp2;
|
|||
|
strTemp2.Format( _T(" %11d") , lSmsSFCount );
|
|||
|
strTemp+= strTemp2;
|
|||
|
strTemp+=_T("\r\n\r\n");
|
|||
|
strTab += strTemp;
|
|||
|
|
|||
|
strHead += strTab;
|
|||
|
/*
|
|||
|
strTemp.Format( _T("%13s") , _T("<EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD>:"));
|
|||
|
strJCB+= strTemp;
|
|||
|
strTemp.Format( _T("%8d" , pBill->jcb.lOldCount);
|
|||
|
strJCB+= strTemp;
|
|||
|
|
|||
|
strTemp.Format( _T("%17s") , _T("<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>:"));
|
|||
|
strJCB+= strTemp;
|
|||
|
strTemp.Format( _T("%8d") , pBill->jcb.lAddCount);
|
|||
|
strJCB+= strTemp;
|
|||
|
|
|||
|
strTemp.Format( _T("\r\n%13s") , _T("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:"));
|
|||
|
strJCB+= strTemp;
|
|||
|
strTemp.Format( _T("%8d" , pBill->jcb.lPresentCount);
|
|||
|
strJCB+= strTemp;
|
|||
|
|
|||
|
strTemp.Format( _T("%17s") , _T("<EFBFBD><EFBFBD><EFBFBD>ڽ<EFBFBD><EFBFBD><EFBFBD>:"));
|
|||
|
strJCB+= strTemp;
|
|||
|
strTemp.Format( _T("%8d") , pBill->jcb.lUseCount);
|
|||
|
strJCB+= strTemp;
|
|||
|
|
|||
|
strHead += strJCB;
|
|||
|
*/
|
|||
|
strTab = _T("");
|
|||
|
|
|||
|
|
|||
|
strHead += strTab;
|
|||
|
|
|||
|
m_strMsg=strHead;
|
|||
|
|
|||
|
|
|||
|
|
|||
|
|
|||
|
UpdateData(false);
|
|||
|
|
|||
|
return TRUE; // return TRUE unless you set the focus to a control
|
|||
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|||
|
}
|
|||
|
|
|||
|
void DLG_C_MonPay_See::OnCMonpaySeeCopy()
|
|||
|
{
|
|||
|
HGLOBAL hglbCopy;
|
|||
|
TCHAR * lptstrCopy;
|
|||
|
if (!OpenClipboard())
|
|||
|
return;
|
|||
|
EmptyClipboard();
|
|||
|
|
|||
|
hglbCopy = GlobalAlloc(GMEM_MOVEABLE, (m_strMsg.GetLength()+1)*sizeof(TCHAR));
|
|||
|
if (hglbCopy == NULL)
|
|||
|
{
|
|||
|
CloseClipboard();
|
|||
|
return;
|
|||
|
}
|
|||
|
lptstrCopy = (TCHAR*)GlobalLock(hglbCopy);
|
|||
|
_tcscpy(lptstrCopy,m_strMsg);
|
|||
|
GlobalUnlock(hglbCopy);
|
|||
|
#ifdef _UNICODE
|
|||
|
SetClipboardData(CF_UNICODETEXT, hglbCopy);
|
|||
|
#else
|
|||
|
::SetClipboardData(CF_TEXT, hglbCopy);
|
|||
|
#endif
|
|||
|
|
|||
|
CloseClipboard();
|
|||
|
|
|||
|
}
|