Skip to content

Instantly share code, notes, and snippets.

@BrianMRO
Last active Sep 30, 2021
Embed
What would you like to do?
Approval Views
#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