Skip to content

Instantly share code, notes, and snippets.

@FNogger
Created January 31, 2018 18:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save FNogger/5110ff42f0fa22824274706de3c5527e to your computer and use it in GitHub Desktop.
Save FNogger/5110ff42f0fa22824274706de3c5527e to your computer and use it in GitHub Desktop.
/// <summary>
/// Finds the specified record in the <c>CarTable</c> table.
/// </summary>
/// <param name="_carId">
/// The CarId of the <c>CarTable</c> record to find.
/// </param>
/// <param name="_brand">
/// The Brand of the <c>CarTable</c> record to find.
/// </param>
/// <param name="_forupdate">
/// A Boolean value that indicates whether to read the record for update; optional.
/// </param>
/// <param name="_concurrencyModel">
/// The table selection ConcurrencyModel; optional.
/// </param>
/// <returns>
/// A record in the <c>CarTable</c> table; otherwise, an empty record.
/// </returns>
// Begin : Axaptahut, DevTools
public static CarTable find_Combination(AccountNum _carId,
EcoResAttributeTypeName _brand, boolean _forupdate = false,
ConcurrencyModel _concurrencyModel = ConcurrencyModel::Auto)
{
CarTable carTable;
carTable.selectForUpdate(_forupdate);
if (_forupdate && _concurrencyModel != ConcurrencyModel::Auto)
{
carTable.concurrencyModel(_concurrencyModel);
}
select firstonly carTable
where carTable.CarId == _carId
&& carTable.Brand == _brand;
return carTable;
}
// End: Axaptahut, DevTools
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment