| 123456789101112131415161718192021222324252627282930 |
- 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<ActivityModel, EmployeeActivity>
- {
- protected override void ConfigureColumns(ShellColumns<ActivityModel, EmployeeActivity> 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<String>();
- public String Description => Get<String>();
- public bool IsLeave => Get<bool>();
- public IEnumerable<ActivityFormShell> Forms
- => Parent.Forms.Where(x => x.ActivityID == ID);
- }
- }
|