using System.Linq; using Comal.Classes; using InABox.Core; namespace PRSDesktop { public class JobSpreadsheetGrid : SpreadsheetGrid, IJobControl, IDataModelSource { public string SectionName => "Job Spreadsheets"; public DataModel DataModel(Selection selection) { var ids = ExtractValues(x => x.ID, selection).ToArray(); return new AutoDataModel(new Filter(x => x.ID).InList(ids)); } public event DataModelUpdateEvent? OnUpdateDataModel; public Job Job { get => Entity; set => Entity = value; } public JobPanelSettings Settings { get; set; } } }