EmployeeDetailShell.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. using System;
  2. using Comal.Classes;
  3. using Xamarin.Forms;
  4. using Xamarin.Forms.Xaml;
  5. namespace comal.timesheets
  6. {
  7. public class EmployeeDetailShell : DetailShell<EmployeeDetailModel,Employee>
  8. {
  9. static EmployeeDetailShell()
  10. {
  11. Columns
  12. .Map(nameof(ID), x => x.ID)
  13. .Map(nameof(Code), x => x.Code)
  14. .Map(nameof(Name), x => x.Name)
  15. .Map(nameof(UserID), x => x.UserLink.ID)
  16. .Map(nameof(ThumbnailID), x => x.Thumbnail.ID)
  17. .Map(nameof(Mobile), x => x.Mobile)
  18. .Map(nameof(Email), x => x.Email)
  19. .Map(nameof(Signature), x => x.Signature);
  20. }
  21. public Guid ID => Get<Guid>();
  22. public String Code => Get<String>();
  23. public String Name => Get<String>();
  24. public Guid UserID => Get<Guid>();
  25. public Guid ThumbnailID => Get<Guid>();
  26. public String Mobile
  27. {
  28. get => Get<String>();
  29. set => Set(value);
  30. }
  31. public String Email
  32. {
  33. get => Get<String>();
  34. set => Set(value);
  35. }
  36. public byte[] Signature
  37. {
  38. get => Get<byte[]>();
  39. set => Set(value);
  40. }
  41. public ImageSource Thumbnail => Parent.GetImage(ThumbnailID);
  42. }
  43. }