1234567891011121314151617181920212223242526 |
- using System;
- using Comal.Classes;
- using InABox.Core;
- using InABox.DynamicGrid;
- namespace PRSDesktop;
- public class JobScopeKanbanGrid : DynamicDataGrid<Kanban>, IJobScopeGrid
- {
- public JobScope? Scope { get; set; }
- protected override void DoReconfigure(FluentList<DynamicGridOption> options)
- {
- base.DoReconfigure(options);
- options.Remove(DynamicGridOption.AddRows);
- }
- protected override void Reload(Filters<Kanban> criteria, Columns<Kanban> columns, ref SortOrder<Kanban>? sort, Action<CoreTable?, Exception?> action)
- {
- if ((Scope == null) || (Scope.ID == Guid.Empty))
- criteria.Add(new Filter<Kanban>(x => x.ID).None());
- else
- criteria.Add(new Filter<Kanban>(x => x.JobScope.ID).IsEqualTo(Scope.ID));
- base.Reload(criteria, columns, ref sort, action);
- }
- }
|