AssignmentLookups.cs 841 B

1234567891011121314151617181920212223242526272829303132
  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 Columns.None<Assignment>().Add(
  11. x => x.ID,
  12. x => x.Number,
  13. x => x.Date,
  14. x => x.EmployeeLink.Name,
  15. x => x.Booked.Start,
  16. x => x.Booked.Duration
  17. );
  18. }
  19. public override Filter<Assignment> DefineFilter()
  20. {
  21. return null;
  22. }
  23. public override SortOrder<Assignment> DefineSortOrder()
  24. {
  25. return new SortOrder<Assignment>(x => x.Date).ThenBy(x => x.EmployeeLink.Name).ThenBy(x => x.Booked.Start);
  26. }
  27. }
  28. }