protype.h

来自「本网站是一个库存管理系统」· C头文件 代码 · 共 39 行

H
39
字号
// ProType.h: interface for the CProType class.

#ifndef CLASS_PROTYPE
#define CLASS_PROTYPE

#ifdef CLASS_PROTYPE
class __declspec(dllexport) CProType
#else
class __declspec(dllimport) CProType
#endif
{
private:
	int TypeId; // 产品类别编号
	CString TypeName; // 产品类别名称
	int UpperId; // 上级产品类别 (如果说 UpperId = 0, 则表示此产品类别为一级类别)
public:
	CProType();
	virtual ~CProType();

	// 成员变量操作
	int GetTypeId(); // 返回产品类别编号
	void SetTypeId(int iTypeId); // 设置产品类别编号
	CString GetTypeName(); //  返回产品类别名称
	void SetTypeName(CString cTypeName); // 设置产品类别名称
	int GetUpperId(); // 返回上级产品类别 (如果说 UpperId = 0, 则表示此产品类别为一级类别)
	void SetUpperId(int iUpperId); // 设置上级产品类别 (如果说 UpperId = 0, 则表示此产品类别为一级类别)

	// 数据库操作
	int HaveName(CString cTypeName); // 判断指定的产品类别名称是否在数据库中
	int HaveSon(CString cTypeId); // 判断指定的产品类别是否包含子类
	void sql_insert(); // 插入新的产品类别记录
	void sql_update(CString cTypeId); //  修改指定的产品类别记录
	void sql_delete(CString cTypeId); // 删除指定的产品类别记录

	void GetData(CString cTypeId);	// 读取所有字段值 
};

#endif 

⌨️ 快捷键说明

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