EmployeePositionLookups.cs 923 B

1234567891011121314151617181920212223242526272829303132
  1. using System.Linq;
  2. using InABox.Core;
  3. namespace Comal.Classes
  4. {
  5. public class EmployeePositionLookups : EntityLookup<EmployeePosition>, ILookupDefinition<EmployeePosition, EmployeePosition>
  6. {
  7. public Filter<EmployeePosition> DefineFilter(EmployeePosition[] items)
  8. {
  9. return new Filter<EmployeePosition>(x => x.ID).NotInList(items.Select(x => x.ID).ToArray());
  10. }
  11. public override Columns<EmployeePosition> DefineColumns()
  12. {
  13. return new Columns<EmployeePosition>(
  14. x => x.ID,
  15. x => x.Code,
  16. x => x.Description
  17. );
  18. }
  19. public override Filter<EmployeePosition> DefineFilter()
  20. {
  21. return null;
  22. }
  23. public override SortOrder<EmployeePosition> DefineSortOrder()
  24. {
  25. return new SortOrder<EmployeePosition>(x => x.Code);
  26. }
  27. }
  28. }