addcusdlg.cpp
来自「玩具百货公司销售进货记录系统!界面比较齐全,功能完善」· C++ 代码 · 共 67 行
CPP
67 行
// AddCusDlg.cpp : implementation file
//
#include "stdafx.h"
#include "heavenmis.h"
#include "AddCusDlg.h"
#include "customer.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAddCusDlg dialog
CAddCusDlg::CAddCusDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAddCusDlg::IDD, pParent)
{
//{{AFX_DATA_INIT(CAddCusDlg)
m_strAddress = _T("");
m_strCity = _T("");
m_strContactName = _T("");
m_strName = _T("");
m_strPhone = _T("");
m_strProvince = _T("");
//}}AFX_DATA_INIT
}
void CAddCusDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddCusDlg)
DDX_Text(pDX, IDC_EDIT_ADDRESS, m_strAddress);
DDX_Text(pDX, IDC_EDIT_CITY, m_strCity);
DDX_Text(pDX, IDC_EDIT_CONTACTNAME, m_strContactName);
DDX_Text(pDX, IDC_EDIT_NAME, m_strName);
DDX_Text(pDX, IDC_EDIT_PHONE, m_strPhone);
DDX_Text(pDX, IDC_EDIT_PROVINCE, m_strProvince);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CAddCusDlg, CDialog)
//{{AFX_MSG_MAP(CAddCusDlg)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAddCusDlg message handlers
void CAddCusDlg::OnOK()
{
UpdateData(TRUE);
CCustomer customer;
customer.Setaddress(m_strAddress);
customer.SetCity(m_strCity);
customer.SetContact(m_strContactName);
customer.SetName(m_strName);
customer.SetPhone(m_strPhone);
customer.SetProvince(m_strProvince);
customer.AddRecord();
CDialog::OnOK();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?