140 lines
3.2 KiB
C++
140 lines
3.2 KiB
C++
|
// DLG_Commend_My.cpp : implementation file
|
|||
|
//
|
|||
|
|
|||
|
#include "stdafx.h"
|
|||
|
#include "corpsms.h"
|
|||
|
#include "DLG_Commend_My.h"
|
|||
|
|
|||
|
#ifdef _DEBUG
|
|||
|
#define new DEBUG_NEW
|
|||
|
#undef THIS_FILE
|
|||
|
static char THIS_FILE[] = __FILE__;
|
|||
|
#endif
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_Commend_My dialog
|
|||
|
|
|||
|
|
|||
|
DLG_Commend_My::DLG_Commend_My(CWnd* pParent /*=NULL*/)
|
|||
|
: CDialog(DLG_Commend_My::IDD, pParent)
|
|||
|
{
|
|||
|
//{{AFX_DATA_INIT(DLG_Commend_My)
|
|||
|
// NOTE: the ClassWizard will add member initialization here
|
|||
|
//}}AFX_DATA_INIT
|
|||
|
|
|||
|
m_pCommend = NULL;
|
|||
|
m_pCommendData = NULL;
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
void DLG_Commend_My::DoDataExchange(CDataExchange* pDX)
|
|||
|
{
|
|||
|
CDialog::DoDataExchange(pDX);
|
|||
|
//{{AFX_DATA_MAP(DLG_Commend_My)
|
|||
|
DDX_Control(pDX, IDC_COMMEND_MY_LIST, m_wndList);
|
|||
|
DDX_Control(pDX, IDC_COMMEND_MY_VIPINT, m_E_VipInt);
|
|||
|
//}}AFX_DATA_MAP
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
BEGIN_MESSAGE_MAP(DLG_Commend_My, CDialog)
|
|||
|
//{{AFX_MSG_MAP(DLG_Commend_My)
|
|||
|
//}}AFX_MSG_MAP
|
|||
|
END_MESSAGE_MAP()
|
|||
|
|
|||
|
/////////////////////////////////////////////////////////////////////////////
|
|||
|
// DLG_Commend_My message handlers
|
|||
|
|
|||
|
void DLG_Commend_My::SetParam(ANS_GetCommend *pCommend, ANS_GetCommendData *pData)
|
|||
|
{
|
|||
|
m_pCommend=pCommend;
|
|||
|
m_pCommendData=pData;
|
|||
|
}
|
|||
|
|
|||
|
BOOL DLG_Commend_My::OnInitDialog()
|
|||
|
{
|
|||
|
CDialog::OnInitDialog();
|
|||
|
|
|||
|
// TODO: Add extra initialization here
|
|||
|
|
|||
|
//<2F><>ʼ<EFBFBD><CABC><EFBFBD>б<EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>б<EFBFBD>
|
|||
|
m_Image.Create( 20 , 20 , ILC_COLOR32|ILC_MASK , 5 , 1);
|
|||
|
CBitmap bmp;
|
|||
|
bmp.LoadBitmap( IDB_L_USER_NOR );
|
|||
|
m_Image.Add( &bmp , RGB(193,193,193) ); //<2F><><EFBFBD><EFBFBD>
|
|||
|
//<2F><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>б<EFBFBD>
|
|||
|
m_wndList.SetImageList(&m_Image,LVSIL_SMALL);
|
|||
|
m_wndList.SetBkColor( RGB(237,238,188) );
|
|||
|
m_wndList.SetTextBkColor( RGB(237,238,188) );
|
|||
|
|
|||
|
m_wndList.SubClassWindow2();
|
|||
|
m_wndList.SetHeadings(_T(" <20><><EFBFBD><EFBFBD>,50; <20><> <20><>,70; ״̬,70; <20><><EFBFBD><EFBFBD>,50;<3B>ύʱ<E1BDBB><CAB1>,90; <20>¼<EFBFBD>,250;"));
|
|||
|
m_wndList.SetGridLines(true);
|
|||
|
|
|||
|
|
|||
|
RefreshList();
|
|||
|
|
|||
|
return TRUE; // return TRUE unless you set the focus to a control
|
|||
|
// EXCEPTION: OCX Property Pages should return FALSE
|
|||
|
}
|
|||
|
|
|||
|
void DLG_Commend_My::RefreshList()
|
|||
|
{
|
|||
|
//m_wndList.SetHeadings(_T(" <20><><EFBFBD><EFBFBD>,60; <20><> <20><>,80; ״̬,80; <20><><EFBFBD><EFBFBD>,80; <20>¼<EFBFBD>,150;"));
|
|||
|
if ( !m_pCommend )
|
|||
|
return;
|
|||
|
if ( !m_pCommendData )
|
|||
|
return;
|
|||
|
|
|||
|
|
|||
|
CString str;
|
|||
|
|
|||
|
str.Format( _T("%d") , m_pCommend->lVipInt);
|
|||
|
m_E_VipInt.SetWindowText(str);
|
|||
|
|
|||
|
for ( int i=0 ; i<m_pCommend->lCount ; i++)
|
|||
|
{
|
|||
|
str.Format( _T("%d") , i+1 );
|
|||
|
m_wndList.InsertItem(i , str , 0 );
|
|||
|
|
|||
|
long lTemp11=1;
|
|||
|
switch(m_pCommendData[i].lCommendType)
|
|||
|
{
|
|||
|
case 1:
|
|||
|
str =_T("<EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>Ʒ");
|
|||
|
break;
|
|||
|
default:
|
|||
|
str =_T("<EFBFBD>Ƽ<EFBFBD><EFBFBD>û<EFBFBD>");
|
|||
|
break;
|
|||
|
}
|
|||
|
m_wndList.SetItemText(i, lTemp11++ , str);
|
|||
|
switch(m_pCommendData[i].lStatus)
|
|||
|
{
|
|||
|
case 0:
|
|||
|
default:
|
|||
|
str =_T("<EFBFBD>ύ<EFBFBD>ɹ<EFBFBD>");
|
|||
|
break;
|
|||
|
case 1:
|
|||
|
str =_T("<EFBFBD><EFBFBD><EFBFBD>ڴ<EFBFBD><EFBFBD><EFBFBD>");
|
|||
|
break;
|
|||
|
case 2:
|
|||
|
str =_T("<EFBFBD>ѳɽ<EFBFBD>");
|
|||
|
break;
|
|||
|
case 3:
|
|||
|
str =_T("<EFBFBD><EFBFBD><EFBFBD>ɽ<EFBFBD>");
|
|||
|
break;
|
|||
|
}
|
|||
|
m_wndList.SetItemText(i, lTemp11++ , str);
|
|||
|
|
|||
|
str.Format( _T("%d") , m_pCommendData[i].lVipInt );
|
|||
|
m_wndList.SetItemText(i, lTemp11++ , str);
|
|||
|
str.Format( _T("%04d.%02d.%02d") , m_pCommendData[i].tCreateTime.wYear,m_pCommendData[i].tCreateTime.wMonth,m_pCommendData[i].tCreateTime.wDay );
|
|||
|
m_wndList.SetItemText(i, lTemp11++ , str);
|
|||
|
|
|||
|
m_wndList.SetItemText(i, lTemp11++ , m_pCommendData[i].szTJ_CorpName);
|
|||
|
|
|||
|
|
|||
|
}
|
|||
|
}
|