?? queryparameter.cpp
字號:
// QueryParameter.cpp : implementation file
//
#include "stdafx.h"
#include "dsACD_IVR.h"
#include "QueryParameter.h"
#include "dsACD_IVRDoc.h"
#include "dsACD_IVRView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CQueryParameter dialog
CQueryParameter::CQueryParameter(CWnd* pParent /*=NULL*/)
: CDialog(CQueryParameter::IDD, pParent)
{
//{{AFX_DATA_INIT(CQueryParameter)
m_csComment = _T("");
m_csName = _T("");
m_csParameter = _T("");
m_csValue = _T("");
//}}AFX_DATA_INIT
}
void CQueryParameter::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CQueryParameter)
DDX_Text(pDX, IDC_QP_COMMENT, m_csComment);
DDX_CBString(pDX, IDC_QP_CONN, m_csName);
DDX_CBString(pDX, IDC_QP_PARAMETER, m_csParameter);
DDX_CBString(pDX, IDC_QP_VALUE, m_csValue);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CQueryParameter, CDialog)
//{{AFX_MSG_MAP(CQueryParameter)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CQueryParameter message handlers
BOOL CQueryParameter::OnInitDialog()
{
CDialog::OnInitDialog();
CComboBox *pName=(CComboBox *)GetDlgItem(IDC_QP_CONN);
CComboBox *pParameter=(CComboBox *)GetDlgItem(IDC_QP_PARAMETER);
CComboBox *pValue=(CComboBox *)GetDlgItem(IDC_QP_VALUE);
CString buf1, buf2, csVarName, csDBConnName;
m_pDsACD_IVRView->ReadVariable(buf1);
while (!buf1.IsEmpty())
{
csVarName = buf1.Left(buf1.Find(";" ));
pParameter->AddString(csVarName);
pValue->AddString(csVarName);
buf1.Delete(0, buf1.Find(";" )+1);
}
m_pDsACD_IVRView->ReadDBConn(buf2);
while (!buf2.IsEmpty())
{
csDBConnName = buf2.Left(buf2.Find(";" ));
pName->AddString(csDBConnName);
buf2.Delete(0, buf2.Find(";" )+1);
}
int nIndex;
nIndex = pName->SelectString(-1, m_csName);
pName->SetCurSel(nIndex);
nIndex = pParameter->SelectString(-1, m_csParameter);
pParameter->SetCurSel(nIndex);
nIndex = pValue->SelectString(-1, m_csValue);
pValue->SetCurSel(nIndex);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
void CQueryParameter::DisplayDlg(dsACDObjectBase *pObj)
{
dsQP_INFO * pInfo = (dsQP_INFO*) pObj->Read();
m_csName = pInfo->Name;
m_csParameter = pInfo->Parameter;
m_csValue = pInfo->Value;
m_csComment = pInfo->Comment;
if(DoModal()==IDOK)
{
if (m_csName == "")
m_csName = "無數據庫";
if (m_csParameter == "")
m_csParameter = "空";
if (m_csValue == "")
m_csValue = "空";
pInfo->Name = m_csName;
pInfo->Parameter = m_csParameter;
pInfo->Value = m_csValue;
pInfo->Comment = m_csComment;
}
else
return;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -