Last active
September 30, 2021 03:52
-
-
Save BrianMRO/d1cc58b6deff39ff48d4c08b8f645b90 to your computer and use it in GitHub Desktop.
Approval Views
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
#region Views | |
public SelectFrom<MyDAC>.View Document; | |
public SelectFrom<MySetupApproval>.View SetupApproval; | |
#endregion | |
#region SetupApproval View Delegate | |
// only return approval maps for the | |
// approval engine when RequestApproval is true | |
public IEnumerable setupApproval() | |
{ | |
MyDAC myRecord = Document.Current; | |
if ((myRecord?.RequestApproval ?? false) != true) | |
{ | |
yield return null; | |
} | |
else | |
{ | |
foreach(MySetupApproval approval in | |
SelectFrom<MySetupApproval>.View.Select(this)) | |
{ | |
yield return approval; | |
} | |
} | |
} | |
#endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment