123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- 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 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 }
- };
- }
- }
- }
|