?? materialinfocommand.cpp
字號:
// MaterialInfoCommand.cpp: implementation of the CMaterialInfoCommand class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "WhMgr.h"
#include "MaterialInfoCommand.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CMaterialInfoCommand::CMaterialInfoCommand()
{
}
CMaterialInfoCommand::~CMaterialInfoCommand()
{
}
void CMaterialInfoCommand::DoNew()
{
CString strSQL;
strSQL = "Insert into tblMaterialInfo([MaterialNum], [Count], [MaxCount], [MaterialName], [Unit]) Values("
+ m_strMaterialNum + ", 0, "
+ m_strMaxCount + ", \""
+ m_strMaterialName + "\", \""
+ m_strUnit + "\")";
if(!ExecuteSQL(strSQL))
{
::AfxMessageBox("新建物資失敗!");
}
}
void CMaterialInfoCommand::DeleteMaterial(CString Num)
{
CString strSQL;
strSQL = "Delete From tblMaterialInfo Where MaterialNum = " + Num;
if(!ExecuteSQL(strSQL))
{
::AfxMessageBox("刪除物資失敗!");
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -