public Boolean HasAsset(String type, String number, String uuid)
{
int count = 0;
string sql = builSelectSQLStatement(AssetIdentificationBean._TABLE_NAME,
new[] { "count(*) as _count" },
new[]
{
AssetIdentificationBean._ASSET_NUMBER,
//AssetIdentificationBean._ASSET_TYPE,
AssetIdentificationBean._UUID
});
OleDbParameter[] parameters = { new OleDbParameter(AssetIdentificationBean._ASSET_NUMBER, number),
//new OleDbParameter(AssetIdentificationBean._ASSET_TYPE, type),
new OleDbParameter(AssetIdentificationBean._UUID, Guid.Parse(uuid))
};
OleDbDataReader reader = ExecuteSqlQuery(sql, parameters);
if (reader != null)
{
if (reader.Read())
{
count = (int) reader["_count"];
}
reader.Close();
reader.Dispose();
}
return count > 0;
}