JobEmployeeModel.cs 937 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using System.Linq.Expressions;
  3. using Comal.Classes;
  4. using InABox.Core;
  5. using System.Diagnostics.CodeAnalysis;
  6. namespace comal.timesheets
  7. {
  8. public class JobEmployeeModel : ListModel<JobEmployeeModel, JobEmployeeShell, JobEmployee>
  9. {
  10. public JobEmployeeModel(IModelHost host, Func<Filter<JobEmployee>> filter, bool transient = false) : base(host, filter, transient)
  11. {
  12. }
  13. public JobEmployeeModel(IModelHost host, Func<Filter<JobEmployee>> filter, [NotNull] String filename) : base(host, filter, filename)
  14. {
  15. }
  16. public static Filter<JobEmployee> AllJobs() =>
  17. new Filter<JobEmployee>(x => x.EmployeeLink.ID).IsEqualTo(App.Data.Me.ID);
  18. // public override Columns<(.+)> Columns => JobEmployeeShell.Columns.Columns;
  19. protected override Expression<Func<JobEmployee, object>> ImageColumn => x => x.EmployeeLink.Thumbnail.ID;
  20. }
  21. }