📄 addcusdlg.cpp
字号:
// 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -