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

📄 ordersif_xgdlg.cpp

📁 本程序是居于对话框用access数据库开发的一个简单的销售管理系统
💻 CPP
字号:
// Ordersif_XGDlg.cpp : implementation file
//

#include "stdafx.h"
#include "WinNerComputers.h"
#include "Ordersif_XGDlg.h"
#include "OrdersifSet.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// COrdersif_XGDlg dialog


COrdersif_XGDlg::COrdersif_XGDlg(CWnd* pParent /*=NULL*/)
	: CDialog(COrdersif_XGDlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(COrdersif_XGDlg)
	m_bxqy = 0;
	m_bz = _T("");
	m_time = 0;
	m_gh = _T("");
	m_gm = _T("");
	m_xsh = _T("");
	m_jine = _T("");
	m_pdw = _T("");
	m_pgg = _T("");
	m_ph = _T("");
	m_pm = _T("");
	m_psl = _T("");
	edit = "";
	m_pSet = NULL;
	//}}AFX_DATA_INIT
}


void COrdersif_XGDlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(COrdersif_XGDlg)
	DDX_Text(pDX, IDC_baoxiuq, m_bxqy);
	DDX_Text(pDX, IDC_beizhu, m_bz);
	DDX_DateTimeCtrl(pDX, IDC_DATETIMEPICKER1, m_time);
	DDX_Text(pDX, IDC_gonghao, m_gh);
	DDX_Text(pDX, IDC_gongming, m_gm);
	DDX_Text(pDX, IDC_jinhao, m_xsh);
	DDX_Text(pDX, IDC_pindajia, m_jine);
	DDX_Text(pDX, IDC_pindanwei, m_pdw);
	DDX_Text(pDX, IDC_pinguge, m_pgg);
	DDX_Text(pDX, IDC_pinhao, m_ph);
	DDX_Text(pDX, IDC_pinmch, m_pm);
	DDX_Text(pDX, IDC_pinshl, m_psl);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(COrdersif_XGDlg, CDialog)
	//{{AFX_MSG_MAP(COrdersif_XGDlg)
	ON_BN_CLICKED(IDC_TIANJIA, OnTianjia)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// COrdersif_XGDlg message handlers

void COrdersif_XGDlg::OnTianjia() 
{
	// TODO: Add your control notification handler code here
	UpdateData();
	m_pSet = new COrdersifSet();
	m_pSet->m_strFilter.Format(" OrderId= '%s' ",edit);
	m_pSet->Open();
	m_pSet->Edit();
	m_pSet->m_ProductId =m_ph;
	m_pSet->m_ProductName= m_pm;
	m_pSet->m_ProductShuL = m_psl;
	m_pSet->m_CustomerId = m_gh;
	m_pSet->m_CustomName = m_gm;
	m_pSet->m_Ordermeno = m_bz;
	m_pSet->m_ProductTime = m_time;
	m_pSet->m_ProductSpec = m_pgg;
	m_pSet->m_ProductUnit	 = m_pdw;
	m_pSet->m_ProductPice = m_jine;
	m_pSet->m_OrderId = m_xsh;
	m_pSet->m_BaoxiuYears = m_bxqy;
	m_pSet->Update();
	m_pSet->Requery();
	m_pSet->Close();
	MessageBox("记录修改成功!");
}

BOOL COrdersif_XGDlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	UpdateData();
	m_pSet = new COrdersifSet();
    m_pSet->m_strFilter.Format("OrderId = '%s'",edit);
	m_pSet->Open();
	if (!m_pSet->IsEOF())
	{
		m_ph = m_pSet->m_ProductId;
		m_pm = m_pSet->m_ProductName;
		m_psl = m_pSet->m_ProductShuL;
		m_gh = m_pSet->m_CustomerId;
		m_gm = m_pSet->m_CustomName;
		m_bz = m_pSet->m_Ordermeno;
		m_time = m_pSet->m_ProductTime;
		m_pgg = m_pSet->m_ProductSpec;
		m_jine = m_pSet->m_ProductPice;
		m_pdw = m_pSet->m_ProductUnit;
		m_xsh = m_pSet->m_OrderId;
		m_bxqy = m_pSet->m_BaoxiuYears;
		UpdateData(FALSE);
	}	
	m_pSet->Close();
	// TODO: Add extra initialization here
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

⌨️ 快捷键说明

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