1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using Comal.Classes;
- using InABox.Core;
- namespace PRSDesktop
- {
- public class LeaveRequests : LeaveRequestGrid, IPanel<LeaveRequest>
- {
- public bool IsReady { get; set; }
- public event DataModelUpdateEvent OnUpdateDataModel;
- public Dictionary<string, object[]> Selected()
- {
- return new Dictionary<string, object[]> { { 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<LeaveRequest>(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<Type, CoreTable> DataEnvironment()
- {
- return new Dictionary<Type, CoreTable>
- {
- { typeof(LeaveRequest), Data }
- };
- }
- }
- }
|