📄 plateproductresult.cpp
字号:
#include "StdAfx.h"
#include "PlateProductResult.h"
//#include "PlateProductResult.h"
//Insert data into plate_data table
//return: success: true
// failed: false
//Create: KasenHOo @ Elplan ShangHai 051025
bool FAP::PlateProductResult::blnInstPlateData()
{
String *strSQL;
strSQL = S"insert into plate_data(PRODUCT_CODE,SERIAL_START,SERIAL_END, USE_DIV,FACTORY_CODE,LINE_CODE,LOT,PRO_YMD) values( ";
//strSQL = S"insert into plate_data(PRODUCT_CODE,SERIAL_START,SERIAL_END, USE_DIV,USE_YMD,FACTORY_CODE,LINE_CODE,LOT) values( ";
strSQL = String::Concat(strSQL,S" '", txtProCode->Text, "'," );
strSQL = String::Concat(strSQL, txtNoStart->Text, "," );
strSQL = String::Concat(strSQL, txtNoEnd->Text, "," );
strSQL = String::Concat(strSQL,S" 0," );
//strSQL = String::Concat(strSQL,S" to_date( '", txtDate->Text, "','yyyy-mm-dd hh24-mi-ss')," );
strSQL = String::Concat(strSQL,S" '", infClsPltePrdRst->strFactoryCode, "'," );
strSQL = String::Concat(strSQL,S" '", infClsPltePrdRst->strLine, "'," );
strSQL = String::Concat(strSQL, txtLotNo->Text,S",");
strSQL = String::Concat(strSQL,S" to_date('", txtDate->Text, "','yyyy-MM-dd hh24-mi-ss'))" );
if (!DbPltePrdRst->blnSQL_Execute(strSQL))
{
return false;
}
else
{
return true;
}
}
/********************************************************************
Function Name:
created : 2005/10/26
return : success: true
failed: false
author : KasenHOo @ Eleplan ShangHai 20051026
Update :
purpose : check input data of plate data
*********************************************************************/
bool FAP::PlateProductResult::blnChkInput(String * strProCode, int intStart,int intEnd)
{
String * strSQL;
int intCnt;
strSQL = S"select count(*) from plate_data";
strSQL = String::Concat(strSQL,S" where (serial_start between ");
strSQL = String::Concat(strSQL,intStart.ToString(),S" and " ,intEnd.ToString(),S")");
strSQL = String::Concat(strSQL,S" or (serial_end between ");
strSQL = String::Concat(strSQL,intStart.ToString(),S" and " ,intEnd.ToString(),S")");
DbPltePrdRst->blnCnnOpen();
intCnt = DbPltePrdRst->intSQL_Select(strSQL);
if (intCnt >0){
return false;
}
else{
return true;
}
DbPltePrdRst->blnCnnClose();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -