商店管理系统源代码(三)
[cpp]
#if !defined(AFX_SALESBILL_H__E95A758E_1C5A_442D_91F0_BA25EF86E146__INCLUDED_)
#define AFX_SALESBILL_H__E95A758E_1C5A_442D_91F0_BA25EF86E146__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SalesBill.h : header file
//
/////////////////////////////////////////////////////////////////////////////
// CSalesBill dialog
#include "MyButton.h"
class CSalesBill : public CDialog
{
private:
CBitmapButton bitmapButton;
// Construction
public:
CSalesBill(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CSalesBill)
enum { IDD = IDD_SALESBILLDLG };
CMyButton m_btnCommoditySearch;
CMyButton m_btnCommodityResearch;
CListCtrl m_ctrlListMain;
CString m_strBillDate;
CString m_strBiller;
CString m_strNote;
CString m_strSerchCode;
float m_fltSalePrice;
int m_iNum;
float m_fltAmount;
CString m_strClient;
CString m_strBillCode;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSalesBill)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
// Generated message map functions
//{{AFX_MSG(CSalesBill)
virtual BOOL OnInitDialog();
afx_msg void OnBill();
afx_msg void OnSave();
afx_msg void OnUpdate();
afx_msg void OnDelete();
afx_msg void OnAccount();
afx_msg void OnExit();
afx_msg void OnClientfind();
afx_msg void OnCommodityserch();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SALESBILL_H__E95A758E_1C5A_442D_91F0_BA25EF86E146__INCLUDED_)
// SalesBill.cpp : implementation file
//
#include "stdafx.h"
#include "SalesManagementSystem.h"
#include "SalesManagementSystemDlg.h"
#include "SalesBill.h"
#include "ADOConn.h"
#include "MyTime.h"
#include "DiagLog.h"
#include "DlgAll.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CSalesBill dialog
CSalesBill::CSalesBill(CWnd* pParent /*=NULL*/)
: CDialog(CSalesBill::IDD, pParent)
{
//{{AFX_DATA_INIT(CSalesBill)
m_strBillDate = _T("");
m_strBiller = _T("");
m_strNote = _T("");
m_strSerchCode = _T("");
m_fltSalePrice = 0.0f;
m_iNum = 0;
m_fltAmount = 0.0f;
m_strClient = _T("");
m_strBillCode = _T("");
//}}AFX_DATA_INIT
}
void CSalesBill::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CSalesBill)
DDX_Control(pDX, IDC_COMMODITYSERCH, m_btnCommoditySearch);
DDX_Control(pDX, IDC_LISTCOMMODITY, m_ctrlListMain);
DDX_Text(pDX, IDC_BILLDATE, m_strBillDate);
DDX_Text(pDX, IDC_BILLER, m_strBiller);
DDX_Text(pDX, IDC_NOTE, m_strNote);
DDX_Text(pDX, IDC_SERCHCODE, m_strSerchCode);
DDX_Text(pDX, IDC_SALEPRICE, m_fltSalePrice);
DDX_Text(pDX, IDC_NUM, m_iNum);
DDX_Text(pDX, IDC_AMOUNT, m_fltAmount);
DDX_Text(pDX, IDC_CLIENT, m_strClient);
DDX_Text(pDX, IDC_BILLCODE, m_strBillCode);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CSalesBill, CDialog)
//{{AFX_MSG_MAP(CSalesBill)
ON_BN_CLICKED(IDC_BILL, OnBill)
ON_BN_CLICKED(IDC_SAVE, OnSave)
ON_BN_CLICKED(IDC_UPDATE, OnUpdate)
ON_BN_CLICKED(IDC_DELETE, OnDelete)
ON_BN_CLICKED(IDC_ACCOUNT, OnAccount)
ON_BN_CLICKED(IDC_CLIENTFIND, OnClientfind)
ON_BN_CLICKED(IDC_COMMODITYSERCH, OnCommodityserch)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CSalesBill message handlers
BOOL CSalesBill::OnInitDialog()
{
CDialog::OnInitDialog();
// TODO: Add extra initialization here
m_btnCommoditySearch.SetXIcon(IDI_ICONSERCH);
//CBitmapButton bitmapButton;
//bitmapButton.LoadBitmaps(IDB_BITMAP1, IDB_BITMAP1);
bitmapButton.AutoLoad(IDC_BUTTON2, this);
bitmapButton.LoadBitmaps(IDI_ICONSERCH, IDB_BITMAP3);
//bitmapButton.SubclassDlgItem(IDC_COMMODITYSERCH, this);
bitmapButton.SizeToContent
补充:软件开发 , C++ ,