⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 customer.cpp

📁 订单管理系统
💻 CPP
字号:
// customer.cpp : implementation file
//

#include "stdafx.h"
#include "ordermanagement.h"
#include "customer.h"
#include "ADOConn.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// customer dialog


customer::customer(CWnd* pParent /*=NULL*/)
	: CDialog(customer::IDD, pParent)
{
	//{{AFX_DATA_INIT(customer)
	m_str1 = _T("");
	m_str10 = _T("");
	m_str11 = _T("");
	m_str12 = _T("");
	m_str2 = _T("");
	m_str3 = _T("");
	m_str4 = _T("");
	m_str5 = _T("");
	m_str6 = _T("");
	m_str7 = _T("");
	m_str8 = _T("");
	m_str9 = _T("");
	//}}AFX_DATA_INIT
}


void customer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(customer)
	DDX_Text(pDX, IDC_EDIT1, m_str1);
	DDX_Text(pDX, IDC_EDIT10, m_str10);
	DDX_Text(pDX, IDC_EDIT11, m_str11);
	DDX_Text(pDX, IDC_EDIT12, m_str12);
	DDX_Text(pDX, IDC_EDIT2, m_str2);
	DDX_Text(pDX, IDC_EDIT3, m_str3);
	DDX_Text(pDX, IDC_EDIT4, m_str4);
	DDX_Text(pDX, IDC_EDIT5, m_str5);
	DDX_Text(pDX, IDC_EDIT6, m_str6);
	DDX_Text(pDX, IDC_EDIT7, m_str7);
	DDX_Text(pDX, IDC_EDIT8, m_str8);
	DDX_Text(pDX, IDC_EDIT9, m_str9);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(customer, CDialog)
	//{{AFX_MSG_MAP(customer)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// customer message handlers

BOOL customer::OnInitDialog() 
{
		CDialog::OnInitDialog();


	m_str1 = s[0];
	m_str2 = s[1];
	m_str3 = s[2];
	m_str4 = s[3];
	m_str5 = s[4];
	m_str6 = s[5];
	m_str7 = s[6];
	m_str8 = s[7];
	m_str9 = s[8];
	m_str10 =s[9];
	m_str12 =s[10];
	if(s[12]==1) m_str12 ="Y";
		else m_str12 ="N";
	UpdateData(false);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void customer::OnOK() 
{
	UpdateData(true);
	ADOConn mSconn;
	_bstr_t mSQL;

	try{
		//如果Concection对象为空,则重新连接  productNum ='"+m_str7+"',
		if(mSconn.m_pConn == NULL)  
			mSconn.OnInitADOConn();

		if(MessageBox("是否确定更改?","请确认",MB_YESNO) == IDYES)
		{
			
				mSQL ="UPDATE ClientMessage SET shenqing ='"+m_str12+"' WHERE clientID='"+m_str1+"'";

			if(mSconn.ExecuteSQL(mSQL))
			{
				AfxMessageBox("更改成功!");	
				CDialog::OnOK();
			}
//			else

		}
	}
	catch(_com_error e)
	{
		AfxMessageBox(e.ErrorMessage());
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -