1234567891011121314151617181920212223242526272829303132333435363738 |
- namespace PRSDesktop
- {
- }
- //class DynamicEmployeeStatusColumn<T> : DynamicActionColumn where T : Entity
- //{
- // private BitmapImage clockedin = PRSDesktop.Resources.tick.AsBitmapImage();
- // private BitmapImage leave = PRSDesktop.Resources.beach.AsBitmapImage();
- // private BitmapImage sick = PRSDesktop.Resources.sick.AsBitmapImage();
- // private BitmapImage header = PRSDesktop.Resources.clock.AsBitmapImage();
- // public Expression<Func<T, Object>> Property { get; private set; }
- // public DynamicEmployeeStatusColumn(Expression<Func<T, Object>> property) : base()
- // {
- // Property = property;
- // Image = StatusImage;
- // Action = null;
- // }
- // private BitmapImage StatusImage(CoreRow row)
- // {
- // if (row == null)
- // return header;
- // EmployeeStatus status = (EmployeeStatus)row.Get<T, Object>(Property);
- // if (status == EmployeeStatus.In)
- // return clockedin;
- // else if (status == EmployeeStatus.Leave)
- // return leave;
- // else if (status == EmployeeStatus.Sick)
- // return sick;
- // return null;
- // }
- //}
|