87 lines
2.0 KiB
C++
87 lines
2.0 KiB
C++
// DLG_Corp_HLH.cpp : 实现文件
|
|
//
|
|
|
|
#include "stdafx.h"
|
|
#include "SmsManager.h"
|
|
#include "DLG_Corp_HLH.h"
|
|
#include "afxdialogex.h"
|
|
|
|
|
|
// DLG_Corp_HLH 对话框
|
|
|
|
IMPLEMENT_DYNAMIC(DLG_Corp_HLH, CDialogEx)
|
|
|
|
DLG_Corp_HLH::DLG_Corp_HLH(CWnd* pParent /*=NULL*/)
|
|
: CDialogEx(DLG_Corp_HLH::IDD, pParent)
|
|
{
|
|
|
|
m_strCorpName = _T("");
|
|
|
|
memset( &m_HLHReq , 0 , sizeof(m_HLHReq) );
|
|
m_pHLHData = NULL;
|
|
|
|
}
|
|
|
|
DLG_Corp_HLH::~DLG_Corp_HLH()
|
|
{
|
|
}
|
|
|
|
void DLG_Corp_HLH::DoDataExchange(CDataExchange* pDX)
|
|
{
|
|
CDialogEx::DoDataExchange(pDX);
|
|
DDX_Text(pDX, IDC_CORP_HLH_CORPNAME, m_strCorpName);
|
|
DDV_MaxChars(pDX, m_strCorpName, 50);
|
|
DDX_Control(pDX, IDC_CORP_HLH_LIST, m_wndList);
|
|
}
|
|
|
|
|
|
BEGIN_MESSAGE_MAP(DLG_Corp_HLH, CDialogEx)
|
|
END_MESSAGE_MAP()
|
|
|
|
|
|
// DLG_Corp_HLH 消息处理程序
|
|
|
|
|
|
BOOL DLG_Corp_HLH::OnInitDialog()
|
|
{
|
|
CDialogEx::OnInitDialog();
|
|
|
|
m_strCorpName = m_HLHReq.szCorpName;
|
|
|
|
this->UpdateData(false);
|
|
|
|
//初始化List
|
|
m_Image.Create(16,16,ILC_COLOR16|ILC_MASK,5,5);
|
|
m_Image.Add(AfxGetApp()->LoadIcon(IDI_L_CORP) );
|
|
m_wndList.SubClassWindow2();
|
|
m_wndList.SetHeadings(_T("序号,50; 姓名,80;电话号码,120; 积分,80; 注册时间,120;"));
|
|
m_wndList.SetGridLines(true);
|
|
m_wndList.SetImageList(&m_Image,LVSIL_SMALL);
|
|
if (m_HLHReq.lCount<=0 || !m_pHLHData )
|
|
return true;
|
|
|
|
POSITION pos;
|
|
CString str;
|
|
TCHAR Buf[32];
|
|
for ( int i = 0 ; i< m_HLHReq.lCount ; i++ )
|
|
{
|
|
_stprintf( Buf , _T("%d") , i+1 );
|
|
m_wndList.InsertItem( i , Buf , 0 );
|
|
m_wndList.SetItemData( i , m_pHLHData[i].lHLHID);
|
|
m_wndList.SetItemText( i , 1 , m_pHLHData[i].szName );
|
|
m_wndList.SetItemText( i , 2 , m_pHLHData[i].szPhone);
|
|
str.Format(_T(" %d") , m_pHLHData[i].lVipInt);
|
|
m_wndList.SetItemText( i , 3 , str );
|
|
str.Format(_T("%02d.%02d.%02d") , m_pHLHData[i].tRegTime.wYear,m_pHLHData[i].tRegTime.wMonth,m_pHLHData[i].tRegTime.wDay);
|
|
m_wndList.SetItemText( i , 4 , str );
|
|
}
|
|
|
|
return TRUE; // return TRUE unless you set the focus to a control
|
|
// 异常: OCX 属性页应返回 FALSE
|
|
}
|
|
|
|
void DLG_Corp_HLH::SetParam(ANS_Corp_HLH HLH , ANS_Corp_HLHData *pHLHData)
|
|
{
|
|
m_HLHReq = HLH;
|
|
m_pHLHData = pHLHData;
|
|
} |