using System; using System.Linq; namespace comal.timesheets { public class TaskSelectionPage : SelectionPage { public TaskSelectionPage(Action action) : base( (string)"Select Task", (SelectionPageMode)SelectionPageMode.Immediate, (columns) => { columns .BeginUpdate() .Add(new MobileGridIntegerColumn() { Column = x=>x.Number }) .Add(new MobileGridTextColumn() { Column = x=>x.Title }) .Add(new MobileGridTextColumn() { Column = x=>x.Type }) .Add(new MobileGridDateColumn() { Column = x=>x.DueDate, Format = "dd MMM yy"}) .Clear() .EndUpdate(); }, (force) => App.Data.KanbanLookups.Refresh(force), (items) => action?.Invoke(items.FirstOrDefault() as KanbanShell) ) { } } }