using System; using System.Linq; using Xamarin.Forms; namespace comal.timesheets { public class EmployeeMultiSelectionPage : SelectionPage { public EmployeeMultiSelectionPage(Action action) : base( (string)"SelectEmployee", (SelectionPageMode)SelectionPageMode.MultiSelect, (columns) => { columns .BeginUpdate() .Clear() .Add(new MobileGridTextColumn() { Column = x => x.Code, Width = GridLength.Auto }) .Add(new MobileGridTextColumn() { Column = x => x.Name, Width = GridLength.Star }) .EndUpdate(); }, (refresh) => App.Data.Employees.Refresh(refresh), (items) => action?.Invoke(items.OfType().ToArray()) ) { } } }