AssignmentJobDataModel.cs 804 B

1234567891011121314151617181920212223
  1. using System;
  2. using System.Drawing;
  3. using Comal.Classes;
  4. using InABox.Core;
  5. namespace comal.timesheets
  6. {
  7. public class AssignmentJobDataModel : AssignmentLookupDataModel<Job, AssignmentJobItem>
  8. {
  9. public override Columns<Job> Columns => new Columns<Job>(x => x.ID)
  10. .Add(x => x.JobNumber)
  11. .Add(x => x.Name)
  12. .Add(x => x.Notes);
  13. }
  14. public class AssignmentJobItem : AssignmentLookupItem
  15. {
  16. public override Guid Id => Row.Get<Job, Guid>(c => c.ID);
  17. public override String Number => Row.Get<Job, String>(c => c.JobNumber);
  18. public override String Name => Row.Get<Job, String>(c => c.Name);
  19. public override String Description => String.Join("\n",Row.Get<Job, String[]>(c => c.Notes));
  20. }
  21. }