using System; using System.Collections.Generic; using System.Linq; using System.Linq.Expressions; using Comal.Classes; using InABox.Mobile; namespace PRS.Mobile { public class ActivityShell : Shell { protected override void ConfigureColumns(ShellColumns columns) { // We Specifically want to remap the ID field here, // because we want to access the Activity ID, not the record ID columns .Map(nameof(ID), x => x.Activity.ID) .Map(nameof(Code), x => x.Activity.Code) .Map(nameof(Description), x => x.Activity.Description) .Map(nameof(IsLeave), x => x.Activity.IsLeave); } public String Code => Get(); public String Description => Get(); public bool IsLeave => Get(); public IEnumerable Forms => Parent.Forms.Where(x => x.ActivityID == ID); } }