} * 添加物品 *
bool SaleManager::addProduct() {
bool flag=false; unsigned char** EPC=0; int* EPCLen=0;
int tagNum=this->getRfieEpc(EPC,EPCLen); _bstr_t sql=\char sqltmp[200]; char name[50]; char buf[20]; float price; char EPCOne[50]; char birthday[50]; for(int i=0;i cout<<\请输入商品名:\cin>>name } return tagNum; printf(\ cout< cout<<\请输入商品价格:\cin>>buf; price=atof(buf); cout<<\生产日期:\cin>>birthday; *time_t now; time(&now); struct tm tmTmp; localtime_s(&tmTmp,&now); sprintf_s(birthday,\,tmTmp.tm_sec); sprintf_s(EPCOne,\ cout< printf(\EPCOne[j]=EPC[i][j]+48; ],EPC[i][3],EPC[i][4],EPC[i][5],EPC[i][6],EPC[i][7],EPC[i][8],EPC[i][9],EPC[i][10],EPC[i][11]) sprintf_s(sqltmp,\ into product(EPC,name,price,pdate,num) values('%s','%s',%f,'%s',1)\ cout< } * 销售物品 * bool SaleManager::saleProduct() { char buf[100]; unsigned char** EPC=NULL; char EPCOne[50]; int* EPCLen=0; char name[30]; cout<<\请输入售货员的姓名:\ } return true; sql=_bstr_t(sqltmp); flag=this->sqlUtil->ExecuteSQL(sql); cout<<\执行结束!!!\if(flag) { cout<<\插入数据成功!!!\ }else { } cout<<\插入数据失败。。。\ sprintf_s(EPCOne,\cin>>name; int tagNum=this->getRfieEpc(EPC,EPCLen); for(int i=0;i ],EPC[i][3],EPC[i][4],EPC[i][5],EPC[i][6],EPC[i][7],EPC[i][8],EPC[i][9],EPC[i][10],EPC[i][11]); } * 获取当前系统时间 * void SaleManager::getCurrentDateTime(char* &dateTimeStr) } cout<<\交易完成!!!\return true; sprintf_s(buf,\_bstr_t sql=_bstr_t(buf); _RecordsetPtr rsp=sqlUtil->GetRecordSet(sql); this->showProductData(rsp); sprintf_s(buf,\this->sqlUtil->ExecuteSQL(buf);