-
-
Save noakesey/f337faade21f97cfe6215c4c2c61a060 to your computer and use it in GitHub Desktop.
Handling table events
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DataEventHandler(tableStr(FMVehicle), DataEventType::ValidatedWrite)] | |
public static void FMVehicle_onValidatedWrite(Common sender, DataEventArgs e) | |
{ | |
ValidatedEventArgs validateArgs = e as ValidatedEventArgs; | |
FMVehicle vehicle = sender as FMVehicle; | |
boolean result = validateArgs.parmValidateResult(); | |
if (vehicle.NumberOfCylinders == 0) | |
{ | |
result = checkFailed('Invalid number of cylinders.'); | |
validateArgs.parmValidateResult(result); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment