完成车商代码验证功能.
This commit is contained in:
parent
1e628ccc30
commit
6b8cfe2c98
@ -80,7 +80,7 @@ void initCarDealerMap()
|
|||||||
pResult = OCI_GetResultset( pStatement );
|
pResult = OCI_GetResultset( pStatement );
|
||||||
pCarDealerMap = new unordered_map<wstring, CarDealer>;
|
pCarDealerMap = new unordered_map<wstring, CarDealer>;
|
||||||
|
|
||||||
while ( OCI_FetchNext( pResult ) == true )
|
while ( static_cast<bool>(OCI_FetchNext( pResult )) == true )
|
||||||
{
|
{
|
||||||
wstring carDealerCodeIndex = QString::fromLocal8Bit( OCI_GetString( pResult, 1 ) ).toStdWString();
|
wstring carDealerCodeIndex = QString::fromLocal8Bit( OCI_GetString( pResult, 1 ) ).toStdWString();
|
||||||
QString carDealerCode = QString::fromLocal8Bit( OCI_GetString( pResult, 1 ) );
|
QString carDealerCode = QString::fromLocal8Bit( OCI_GetString( pResult, 1 ) );
|
||||||
@ -166,17 +166,17 @@ void initCarDealerMapCpp()
|
|||||||
|
|
||||||
Resultset result = pStatement->GetResultset();
|
Resultset result = pStatement->GetResultset();
|
||||||
|
|
||||||
pCarDealerMap = new unordered_map<string, CarDealer>;
|
pCarDealerMap = new unordered_map<wstring, CarDealer>;
|
||||||
|
|
||||||
while ( result.Next() )
|
while ( result.Next() )
|
||||||
{
|
{
|
||||||
string carDealerCodeIndex = result.Get<ostring>( "auto_code" ).c_str();
|
|
||||||
QString carDealerCode = QString::fromLocal8Bit( result.Get<ostring>( "auto_code" ).c_str() );
|
QString carDealerCode = QString::fromLocal8Bit( result.Get<ostring>( "auto_code" ).c_str() );
|
||||||
QString carDealerName = QString::fromLocal8Bit( result.Get<ostring>( "auto_name" ).c_str() );
|
QString carDealerName = QString::fromLocal8Bit( result.Get<ostring>( "auto_name" ).c_str() );
|
||||||
|
wstring carDealerCodeIndex = carDealerCode.toStdWString();
|
||||||
|
|
||||||
CarDealer dealer( carDealerCode, carDealerName );
|
CarDealer dealer( carDealerCode, carDealerName );
|
||||||
|
|
||||||
pCarDealerMap->insert( pair<string, CarDealer>( carDealerCodeIndex, dealer ) );
|
pCarDealerMap->insert( pair<wstring, CarDealer>( carDealerCodeIndex, dealer ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( exception & error )
|
catch ( exception & error )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user