AssignmentLookups.cs 803 B

12345678910111213141516171819202122232425262728293031
  1. using System;
  2. using System.Collections.Generic;
  3. using InABox.Core;
  4. namespace Comal.Classes
  5. {
  6. public class AssignmentLookups : EntityLookup<Assignment>
  7. {
  8. public override Columns<Assignment> DefineColumns()
  9. {
  10. return new Columns<Assignment>(
  11. x => x.ID,
  12. x => x.Date,
  13. x => x.EmployeeLink.Name,
  14. x => x.Booked.Start,
  15. x => x.Booked.Duration
  16. );
  17. }
  18. public override Filter<Assignment> DefineFilter()
  19. {
  20. return null;
  21. }
  22. public override SortOrder<Assignment> DefineSortOrder()
  23. {
  24. return new SortOrder<Assignment>(x => x.Date).ThenBy(x => x.EmployeeLink.Name).ThenBy(x => x.Booked.Start);
  25. }
  26. }
  27. }