📄 incommand.cpp
字号:
// InCommand.cpp: implementation of the CInCommand class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "WhMgr.h"
#include "InCommand.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CInCommand::CInCommand()
{
//初始化
m_MaterialNum = "";
m_Count = "";
m_Price = "";
m_Supplier = "";
m_Buyer = "";
}
CInCommand::~CInCommand()
{
}
BOOL CInCommand::DoIn()
{
//得到当前时间
CString strData;
CTime time = CTime::GetCurrentTime();
strData.Format("%d-%d-%d %d:%d:%d",
time.GetYear(),
time.GetMonth(),
time.GetDay(),
time.GetHour(),
time.GetMinute(),
time.GetSecond());
CString strSQL;
strSQL = "Insert into tblIn([MaterialNum], [Count], [Price], [Supplier], [Data], [Buyer]) Values("
+ m_MaterialNum + ", "
+ m_Count + ", "
+ m_Price + ", \""
+ m_Supplier + "\", #"
+ strData + "#, \""
+ m_Buyer + "\")";
//执行入库
if(!ExecuteSQL(strSQL))
{
return FALSE;
}
else
{
return TRUE;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -