📄 operationdeploy.h
字号:
// The following ifdef block is the standard way of creating macros which make exporting
// from a DLL simpler. All files within this DLL are compiled with the OPERATIONDEPLOY_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// OPERATIONDEPLOY_API functions as being imported from a DLL, wheras this DLL sees symbols
// defined with this macro as being exported.
// This class is exported from the OperationDeploy.dll
//数据库管理类
__declspec(dllimport) extern "C" class CDataManage
{
private:
_ConnectionPtr m_pConnect;
_RecordsetPtr m_pRecordset;
_CommandPtr m_pCommand;
public:
virtual BOOL __stdcall ExecOpt(LPCTSTR optSQL);
virtual void __stdcall ExecSelect(LPCTSTR selSQL, _RecordsetPtr* pRecord );
virtual BOOL __stdcall InitDatabase(LPCTSTR strConnect);
public:
CDataManage();
virtual ~CDataManage();
};
//员工信息抽象类
__declspec(dllimport) extern "C" class CComStuff
{
public:
virtual int __stdcall GetID() = 0;
virtual char* __stdcall GetName() =0;
virtual char* __stdcall GetSex() =0;
virtual char* __stdcall GetKnowledge() =0;
virtual float __stdcall GetWage() =0;
virtual void __stdcall SetID(int uID) =0;
virtual void __stdcall SetName(char* strName) =0;
virtual void __stdcall SetSex(char* strSex) =0;
virtual void __stdcall SetKnowledge(char* strKnowledge) =0;
virtual void __stdcall SetWage(float fWage) =0;
virtual void __stdcall FreeSelf() = 0;
};
//员工信息实体
__declspec(dllimport) extern "C" class CStuff : public CComStuff
{
private:
int ID; //工号
char* Name; //名称
char* Sex; //性别
char* Knowledge; //学历
float Wage; //工资
public:
int __stdcall GetID()
{
return ID;
}
virtual char* __stdcall GetName()
{
return Name;
}
virtual char* __stdcall GetSex()
{
return Sex;
}
virtual char* __stdcall GetKnowledge()
{
return Knowledge;
}
virtual float __stdcall GetWage()
{
return Wage;
}
virtual void __stdcall SetName(char* strName)
{
Name = strName;
}
virtual void __stdcall SetSex(char* strSex)
{
Sex = strSex;
}
virtual void __stdcall SetKnowledge(char* strKnowledge)
{
Knowledge = strKnowledge;
}
virtual void __stdcall SetWage(float fWage)
{
Wage = fWage;
}
virtual void __stdcall FreeSelf()
{
delete this;
}
void __stdcall SetID(int uID)
{
ID = uID;
}
public:
CStuff()
{
ID = 0;
Name = new char[MAX_PATH];
Sex = new char[MAX_PATH];
Wage = 0.0;
Knowledge = new char[MAX_PATH];
}
virtual ~CStuff()
{
delete [] Name;
delete [] Sex;
delete [] Knowledge;
}
};
//员工信息管理类
__declspec(dllimport) extern "C" class CStuffManage
{
public:
virtual void __stdcall SelectStuff(_RecordsetPtr** pRecord);
virtual BOOL __stdcall DeleteStuff(CStuff** stuff);
virtual BOOL __stdcall UpdateStuff(CStuff** stuff,CStuff **oldstuff);
virtual void __stdcall IniStuff(CStuff** stuff);
virtual BOOL __stdcall AddStuff(CStuff** stuff);
virtual BOOL __stdcall ValidCheck(CStuff** stuff);
virtual void __stdcall FreeSelf();
CStuffManage();
virtual ~CStuffManage();
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -