12345678910111213141516171819202122232425262728293031323334 |
- using System;
- using Comal.Classes;
- using Xamarin.Forms;
- namespace comal.timesheets
- {
- public class InOutShell : Shell<InOutModel, Employee>
- {
- static InOutShell()
- {
- Columns
- .Map(nameof(ID), x => x.ID)
- .Map(nameof(Name), x=>x.Name)
- .Map(nameof(Mobile), x => x.Mobile);
- }
- public Guid ID => Get<Guid>();
- public String Name => Get<String>();
- public String Mobile => Get<String>();
-
- public ImageSource Call => String.IsNullOrWhiteSpace(Mobile)
- ? null
- : ImageSource.FromFile("call");
-
- public TimeSpan Start => Parent.StartTime(ID);
- public TimeSpan Finish => Parent.FinishTime(ID);
- //public Bitmap bmp
- public ImageSource In => Parent.IsClockedOn(ID)
- ? ImageSource.FromFile("greendot")
- : ImageSource.FromFile("graydot");
- }
- }
|