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

📄 merchandisesetdialog.h

📁 VC+SQL SERVER 2000环境下开发的商品销售管理系统
💻 H
字号:
#pragma once
#include "afxcmn.h"
#include "afxwin.h"


// CMerchandiseSetDialog 对话框

class CMerchandiseSetDialog : public CDialog
{
	DECLARE_DYNAMIC(CMerchandiseSetDialog)

public:
	CMerchandiseSetDialog(CWnd* pParent = NULL);   // 标准构造函数
	virtual ~CMerchandiseSetDialog();

// 对话框数据
	enum { IDD = IDD_DIALOG_MERCHANDISE };

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV 支持

	DECLARE_MESSAGE_MAP()

public:
	virtual BOOL OnInitDialog();
protected:
	// 商品信息列表
	CListCtrl      m_ListOfMer;
	// 货品信息
	CListCtrl      m_ListOfGoods;
	// 商品组
	CListCtrl      m_ListofGroup;
	// 数据库连接
	_ConnectionPtr m_pConnection;
	bool           m_AddGroupName;
	bool           m_ModifyGroupName;
	int            m_InOfGroupList;
	int            m_InOfMerList;
	int            m_InOfGoodsList;
	static const TCHAR m_szFilters[];
	CString            m_strPathName;

	void     OnConnection();
	void     InitListOfGroup();
	void     InitControl();
    void     GroupAdd();
    void     ModifyGroupName();
	void     AddMer();
	void     ModifyMer();
	void     MerSetGoodModuleSet();
	void     MerSetGoodModuleClear();
	void     InitComboBox();
	void     AddGoodsOfMer(CString MerName);
	void     InitGoodsList(CString MerName, int sel);
	BOOL     SaveFile(LPCTSTR pszFile);

public:
	afx_msg void OnBnClickedButtonMersetexit();
	afx_msg void OnBnClickedButtonGroupAdd();
	afx_msg void OnBnClickedGroupCancel();
protected:
	// 商品组设置
	bool m_GroupCanUse;
	// 组别名称
	CString m_GroupName;
public:
	afx_msg void OnBnClickedGroupOk();
	afx_msg void OnBnClickedRadioGroupCansale();
	afx_msg void OnBnClickedRadioGroupCannotsale();
	afx_msg void OnBnClickedButtonGroupmodify();
	afx_msg void OnBnClickedButtonMeradd();
protected:
	// 所属商品组
	CString m_InWitchGroup;
public:
	afx_msg void OnBnClickedButtonMersetcancel();
protected:
	// 商品名称
	CString m_MerName;
	// 商品单价
	CString m_MerPrice;
	// 商品条形码
	CString m_MerID;
	// 是否需要授权
	int    m_MerPower;
	// 商品是否可售
	int    m_MerCanSale;
	// 商品单位
	CString m_MerUnit;
	// 当前已售
	CString m_MerSaledNum;
	// 限制售量
	CString m_MerLimitNum;
    // 新增商品标志
	bool    m_MerAdd;
	// 商品组号
	int     m_GroupNum;
	// 修改商品标志
	bool    m_MerModify;
	// 标志修改成功
	bool    m_Succeed;
	// 新赠货品标志
	bool    m_AddGoods;
	// 选中商品信息列表的行号
	int     MerSel;
	//商品的价钱,可能与实际商品的价钱不同,这个是预测价钱
	float TotalPrice;       

public:
	afx_msg void OnBnClickedRadioMerpowneed();
	afx_msg void OnBnClickedRadioMerpowdidnotneed();
	afx_msg void OnBnClickedRadioMercansal();
	afx_msg void OnBnClickedRadioMercannotsale();
	afx_msg void OnBnClickedButtonMersetok();
	afx_msg void OnLvnItemActivateListGrouplist(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnBnClickedButtonMerModify();
	afx_msg void OnBnClickedButtonMerDel();
	afx_msg void OnEnChangeEditMerNameofname();
protected:
	// 商品名过滤
	CString m_MerNameofName;
public:
	afx_msg void OnBnClickedButtonAddgoods();
	afx_msg void OnBnClickedButtonMergoodsetcancel();
	// 初始化Combobox
	CComboBox m_ComboGoodName;
	afx_msg void OnLvnItemActivateListMer(NMHDR *pNMHDR, LRESULT *pResult);
	afx_msg void OnBnClickedButtonMergoodsetok();
protected:
	// 进价
	CString m_BuyPrice;
	// 售价
	CString m_SalePrice;
	// 货品单位
	CString m_GoodsUnit;
	// 货品数量
	CString m_MerGoodsNum;
public:
	afx_msg void OnCbnSelchangeComboGoodsname();
	afx_msg void OnBnClickedButtonDelgoods();
	afx_msg void OnEnChangeEditGoodNameofname();
protected:
	// 货品名过滤
	CString m_GoodsNameOfName;
public:
	afx_msg void OnBnClickedButtonMertoexcel();
protected:
	// 货品库存量
	CString m_GoodsReMainNum;
};

⌨️ 快捷键说明

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