departmentcommand.cpp
来自「ERS.mdb应放到C盘的根目录下。将代码拷贝到本地硬盘」· C++ 代码 · 共 42 行
CPP
42 行
// DepartmentCommand.cpp: implementation of the CDepartmentCommand class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "ERSDemo.h"
#include "DepartmentCommand.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CDepartmentCommand::CDepartmentCommand()
{
}
CDepartmentCommand::~CDepartmentCommand()
{
}
void CDepartmentCommand::InsertDepartment(CString DepartmentName)
{
CString SQL;
SQL = "Insert Into Department(Name) Values(\"" + DepartmentName + "\")";
ExecuteSQL(SQL);
}
void CDepartmentCommand::RenameDepartment(CString NewName, int ID)
{
CString SQL;
SQL.Format("Update Department Set Name = \"" + NewName + "\" Where ID = %d", ID);
ExecuteSQL(SQL);
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?