EmployeeShell.cs 800 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using Comal.Classes;
  3. using Xamarin.Forms;
  4. namespace comal.timesheets
  5. {
  6. public class EmployeeShell : Shell<EmployeeModel, Employee>
  7. {
  8. static EmployeeShell()
  9. {
  10. Columns
  11. .Map(nameof(ID), x => x.ID)
  12. .Map(nameof(Code), x => x.Code)
  13. .Map(nameof(Name), x => x.Name)
  14. .Map(nameof(UserID), x => x.UserLink.ID)
  15. .Map(nameof(ThumbnailID), x => x.Thumbnail.ID);
  16. }
  17. public Guid ID => Get<Guid>();
  18. public String Code => Get<String>();
  19. public String Name => Get<String>();
  20. public Guid UserID => Get<Guid>();
  21. public Guid ThumbnailID => Get<Guid>();
  22. public ImageSource Thumbnail => Parent.GetImage(ThumbnailID);
  23. }
  24. }