EmployeeShell.cs 850 B

123456789101112131415161718192021222324252627
  1. using System;
  2. using Comal.Classes;
  3. using Xamarin.Forms;
  4. namespace PRS.Mobile
  5. {
  6. public class EmployeeShell : Shell<EmployeeModel, Employee>
  7. {
  8. protected override void ConfigureColumns(ShellColumns<EmployeeModel, Employee> columns)
  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. }