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

📄 employee.cpp

📁 这是一折员工管理系统
💻 CPP
字号:
// Employ1.cpp: implementation of the CEmploy class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "Employ.h"
#include "Employee.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
IMPLEMENT_SERIAL(CEmploy,CObject,1)
CEmploy::CEmploy()
{
	m_iSex		=0;
	m_lNum		=0;
	m_sAddress	=_T("");
	m_sDuty		=_T("");
	m_sEducate	=_T("");
	m_sMemo		=_T("");
	m_sName		=_T("");
	m_sPhone	=_T("");
	m_tBirth	=0;
	m_tWork		=0;
}

CEmploy::~CEmploy()
{

}

void CEmploy::Serialize( CArchive& archive )
{
    // call base class function first
    // base class is CObject in this case
    CObject::Serialize( archive );
	// now do the stuff for our specific class
    if( archive.IsStoring() )
	{
		archive	<<	m_iSex	<<	m_sAddress
				<<	m_sDuty	<<	m_sEducate
				<<	m_sMemo	<<	m_sName
				<<	m_lNum	<<	m_tBirth
				<<	m_tWork	<<	m_sPhone;
	}
    else
	{
		archive >>	m_iSex	>>	m_sAddress
				>>	m_sDuty	>>	m_sEducate
				>>	m_sMemo	>>	m_sName
				>>	m_lNum	>>	m_tBirth
				>>	m_tWork	>>	m_sPhone;
	}
}



CEmploy::CEmploy(const CEmploy &m)
{
	m_iSex=m.m_iSex;
	m_lNum=m.m_lNum;
	m_sAddress=m.m_sAddress;
	m_sDuty=m.m_sDuty;
	m_sEducate=m.m_sEducate;
	m_sMemo=m.m_sMemo;
	m_sName=m.m_sName;
	m_sPhone=m.m_sPhone;
	m_tBirth=m.m_tBirth;
	m_tWork=m.m_tWork;
}

BOOL CEmploy::operator ==(const CEmploy &m)
{
	if(	m_iSex==m.m_iSex&&
		m_sAddress==m.m_sAddress&&
		m_sDuty==m.m_sDuty&&
		m_sEducate==m.m_sEducate&&
		m_sMemo==m.m_sMemo&&
		m_sName==m.m_sName&&
		m_sPhone==m.m_sPhone)
	{
		if(	m_tBirth.GetYear()==m.m_tBirth.GetYear()&&
			m_tBirth.GetMonth()==m.m_tBirth.GetMonth()&&
			m_tBirth.GetDay()==m.m_tBirth.GetDay())
		{
			if(	m_tWork.GetYear()==m.m_tWork.GetYear()&&
				m_tWork.GetMonth()==m.m_tWork.GetMonth()&&
				m_tWork.GetDay()==m.m_tWork.GetDay())
			return TRUE;
		}
	}
	return FALSE;
}

CEmploy & CEmploy::operator =(const CEmploy &m)
{
	m_iSex=m.m_iSex;
	m_lNum=m.m_lNum;
	m_sAddress=m.m_sAddress;
	m_sDuty=m.m_sDuty;
	m_sEducate=m.m_sEducate;
	m_sMemo=m.m_sMemo;
	m_sName=m.m_sName;
	m_sPhone=m.m_sPhone;
	m_tBirth=m.m_tBirth;
	m_tWork=m.m_tWork;	
	return *this;
}

⌨️ 快捷键说明

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