-
-
Save jvanhoesen/dcf6fe87eb6ae25a214a2657066301a6 to your computer and use it in GitHub Desktop.
Primary Data-Access-Class FieldUpdated
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
/// <summary> | |
/// Sets a document to pending approval when taken off hold, or resets the other status fields when a document is put back on hold | |
/// </summary> | |
protected virtual void _(Events.FieldUpdated<AATimeRequest, AATimeRequest.hold> e) | |
{ | |
if (e.Row is AATimeRequest row) | |
{ | |
if (!row.Hold ?? false) | |
{ | |
row.Status = AATimeRequestStatus.PendingApproval; | |
} | |
else | |
{ | |
row.Status = AATimeRequestStatus.OnHold; | |
row.Rejected = false; | |
row.Approved = false; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment