📄 tuihuomingxi.cpp
字号:
// Tuihuomingxi.cpp : implementation file
//
#include "stdafx.h"
#include "falcon_jxc.h"
#include "Tuihuomingxi.h"
#include "mainfrm.h"
#include "FALCON_JXCView.h"
#include "message.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CTuihuomingxi dialog
CTuihuomingxi::CTuihuomingxi(CWnd* pParent /*=NULL*/)
: CDialog(CTuihuomingxi::IDD, pParent)
{
//{{AFX_DATA_INIT(CTuihuomingxi)
m_strDanwei = _T("");
m_strGuige = _T("");
m_strMingcheng = _T("");
m_strBianma = _T("");
m_iShuliang = 0;
//}}AFX_DATA_INIT
}
void CTuihuomingxi::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CTuihuomingxi)
DDX_Text(pDX, IDC_DANWEI, m_strDanwei);
DDX_Text(pDX, IDC_GUIGE, m_strGuige);
DDX_Text(pDX, IDC_MINGCHENG, m_strMingcheng);
DDX_Text(pDX, IDC_SPBM, m_strBianma);
DDX_Text(pDX, IDC_SHULIANG, m_iShuliang);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CTuihuomingxi, CDialog)
//{{AFX_MSG_MAP(CTuihuomingxi)
ON_BN_CLICKED(ID_TUICHU, OnTuichu)
ON_EN_KILLFOCUS(IDC_SPBM, OnKillfocusSpbm)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CTuihuomingxi message handlers
void CTuihuomingxi::OnOK()
{
// TODO: Add extra validation here
CDialog::OnOK();
}
void CTuihuomingxi::OnCancel()
{
//Dummy OnCancel function!
}
void CTuihuomingxi::OnTuichu()
{
// TODO: Add your control notification handler code here
CDialog::OnCancel();
}
void CTuihuomingxi::OnKillfocusSpbm()
{
// TODO: Add your control notification handler code here
UpdateData();
CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
CFALCON_JXCDoc* pDoc = pView->GetDocument();
CString strRequest;
if(m_strBianma == "")
{
AfxMessageBox("请输入商品编码!");
return;
}
else
strRequest = m_strBianma;
if(pDoc->ConnectToServer())
{
pDoc->SendMsg(strRequest,1212);//发送根据关键字查询商品资料的请求
}
else
return;
a:
if(pDoc->m_b2212)
{
if(pDoc->m_pMsg->ShortMessage != "")
{
m_strMingcheng = pDoc->m_StrArray.GetAt(1);
m_strGuige = pDoc->m_StrArray.GetAt(2);
m_strDanwei = pDoc->m_StrArray.GetAt(2);
m_iShuliang = 1;
UpdateData(FALSE);
}
else
{
AfxMessageBox("没有该编码的商品!");
m_strMingcheng = "";
m_strMingcheng = "";
m_strMingcheng = "";
m_iShuliang = 0;
UpdateData(FALSE);
}
pDoc->m_b2212=false;
}
else
{
pDoc->ProcessReadMessage();
goto a;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -