【VC开源代码栏目提醒】:网学会员VC开源代码为您提供InCommand.cpp参考,解决您在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;
}
}
上一篇:
IncomingShowDlg.cpp
下一篇:
论我国企业的员工福利