// ShowCard2Reg.cpp : implementation file // #include "stdafx.h" #include "ylgl.h" #include "ShowCard2Reg.h" #include "InputCard2Dlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // ShowCard2Reg dialog ShowCard2Reg::ShowCard2Reg(CWnd* pParent /*=NULL*/) : CDialog(ShowCard2Reg::IDD, pParent) { //{{AFX_DATA_INIT(ShowCard2Reg) // NOTE: the ClassWizard will add member initialization here m_mode=0; //}}AFX_DATA_INIT } void ShowCard2Reg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(ShowCard2Reg) DDX_Control(pDX, IDC_LIST1, m_List1); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(ShowCard2Reg, CDialog) //{{AFX_MSG_MAP(ShowCard2Reg) ON_BN_CLICKED(IDC_BUTTON1, OnButton1) ON_BN_CLICKED(IDC_BUTTON2, OnButton2) ON_BN_CLICKED(IDC_BUTTON3, OnButton3) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // ShowCard2Reg message handlers BOOL ShowCard2Reg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here m_List1.SetHeadings("主卡号,100;副卡号,100;发放日期,100" ); CenterWindow(); m_List1.DeleteAllItems2 (); int ii=0; m_List1.m_arLabels.SetSize( g_List1array.GetSize (), 1 ); int count=0; for(ii=0; iiProcessChatMessageRequest2(sql);if(g_bSendOK==0)return; m_List1.DeleteItem2(iItem); } void ShowCard2Reg::OnButton3() { // TODO: Add your control notification handler code here InputCard2Dlg dlg; dlg.m_mode=1; dlg.m_bAddOne =1; dlg.m_name =m_name; dlg.m_no =m_memberno; if(dlg.DoModal ()!=IDOK)return; CString filter="[memberno]='"+m_memberno+"'"; g_sendhead.bsql=0; g_sendhead.code[0]=131; g_sendhead.tabcount=1; g_pMainWnd->ProcessChatMessageRequest2(filter); if(g_bSendOK==0) { CDialog::OnCancel (); return; } DataToArray(&g_List1array); m_List1.DeleteAllItems2 (); int ii=0; m_List1.m_arLabels.SetSize( g_List1array.GetSize (), 1 ); int count=0; for(ii=0; ii