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