employeeinfodataset.cpp
来自「ERS.mdb应放到C盘的根目录下。将代码拷贝到本地硬盘」· C++ 代码 · 共 90 行
CPP
90 行
// EmployeeInfoDataSet.cpp: implementation of the CEmployeeInfoDataSet class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ERSDemo.h"
#include "EmployeeInfoDataSet.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CEmployeeInfoDataSet::CEmployeeInfoDataSet()
{
}
CEmployeeInfoDataSet::~CEmployeeInfoDataSet()
{
}
BOOL CEmployeeInfoDataSet::LoadData()
{
return Open("Select * From EmployeeInfo");
}
CString CEmployeeInfoDataSet::GetName()
{
return GetAsString("Name");
}
int CEmployeeInfoDataSet::GetGender()
{
return atoi(GetAsString("Gender"));
}
CString CEmployeeInfoDataSet::GetBirthday()
{
return GetAsString("Birthday");
}
CString CEmployeeInfoDataSet::GetWorkTime()
{
return GetAsString("WorkTime");
}
CString CEmployeeInfoDataSet::GetEducation()
{
return GetAsString("Education");
}
BOOL CEmployeeInfoDataSet::GetMarriage()
{
return GetAsString("Marriage") != "0";
}
BOOL CEmployeeInfoDataSet::GetInsurance()
{
return GetAsString("Insurance") != "0";
}
int CEmployeeInfoDataSet::GetID()
{
return atoi(GetAsString("ID"));
}
BOOL CEmployeeInfoDataSet::LoadByEmployeeID(int EmployeeID)
{
CString SQL;
SQL.Format("Select * From EmployeeInfo Where ID = %d", EmployeeID);
return Open(SQL);
}
CString CEmployeeInfoDataSet::GetResume()
{
return GetAsString("Resume");
}
CString CEmployeeInfoDataSet::GetPhotoPath()
{
return GetAsString("PhotoGraph");
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?