using System; using System.Collections.Generic; using System.Linq; using Comal.Classes; using InABox.Core; namespace PRSDesktop { public class LeaveRequests : LeaveRequestGrid, IPanel { public bool IsReady { get; set; } public event DataModelUpdateEvent OnUpdateDataModel; public Dictionary Selected() { return new Dictionary { { typeof(LeaveRequest).EntityName(), SelectedRows } }; } public void CreateToolbarButtons(IPanelHost host) { // } public string SectionName => "Leave Requests Grid"; public DataModel DataModel(Selection selection) { var ids = ExtractValues(x => x.ID, selection).ToArray(); return new LeaveRequestDataModel(new Filter(x => x.ID).InList(ids)); } public bool Focus() { return true; } public void Refresh() { Refresh(false, true); } public void Setup() { Refresh(true, false); } public void Shutdown() { } public void Heartbeat(TimeSpan time) { } public Dictionary DataEnvironment() { return new Dictionary { { typeof(LeaveRequest), Data } }; } } }