// DLG_Corp_User_Query.cpp : implementation file // #include "stdafx.h" #include "smsmanager.h" #include "DLG_Corp_User_Query.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif ///////////////////////////////////////////////////////////////////////////// // DLG_Corp_User_Query dialog DLG_Corp_User_Query::DLG_Corp_User_Query(CWnd* pParent /*=NULL*/) : CDialog(DLG_Corp_User_Query::IDD, pParent) { //{{AFX_DATA_INIT(DLG_Corp_User_Query) m_strCorpID = _T(""); m_strCorpName = _T(""); m_strLoginName = _T(""); //}}AFX_DATA_INIT memset(&m_Data,0,sizeof(m_Data)); } void DLG_Corp_User_Query::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(DLG_Corp_User_Query) DDX_Text(pDX, IDC_CORP_USERQUERY_CORPID, m_strCorpID); DDX_Text(pDX, IDC_CORP_USERQUERY_CORPNAME, m_strCorpName); DDX_Text(pDX, IDC_CORP_USERQUERY_LOGINNAME, m_strLoginName); DDV_MaxChars(pDX, m_strLoginName, 15); //}}AFX_DATA_MAP } BEGIN_MESSAGE_MAP(DLG_Corp_User_Query, CDialog) //{{AFX_MSG_MAP(DLG_Corp_User_Query) //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // DLG_Corp_User_Query message handlers void DLG_Corp_User_Query::OnOK() { if ( !UpdateData(true) ) return ; if ( m_strLoginName.GetLength()<=0 ) { MessageBox( _T("ÇëÊäÈëµÇ¼Ãû£¡") , _T("´íÎó") , MB_ICONWARNING ); GetDlgItem(IDC_CORP_USERQUERY_LOGINNAME)->SetFocus(); return ; } CDialog::OnOK(); } void DLG_Corp_User_Query::SetParam(ANS_Corp_SeeData User) { m_Data = User; } BOOL DLG_Corp_User_Query::OnInitDialog() { CDialog::OnInitDialog(); m_strCorpID.Format( _T("%d") , m_Data.lCorpID ); m_strCorpName.Format( _T("%s") , m_Data.szCorpName ); UpdateData(false); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }