DynamicEmployeeStatusColumn.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. namespace PRSDesktop
  2. {
  3. }
  4. //class DynamicEmployeeStatusColumn<T> : DynamicActionColumn where T : Entity
  5. //{
  6. // private BitmapImage clockedin = PRSDesktop.Resources.tick.AsBitmapImage();
  7. // private BitmapImage leave = PRSDesktop.Resources.beach.AsBitmapImage();
  8. // private BitmapImage sick = PRSDesktop.Resources.sick.AsBitmapImage();
  9. // private BitmapImage header = PRSDesktop.Resources.clock.AsBitmapImage();
  10. // public Expression<Func<T, Object>> Property { get; private set; }
  11. // public DynamicEmployeeStatusColumn(Expression<Func<T, Object>> property) : base()
  12. // {
  13. // Property = property;
  14. // Image = StatusImage;
  15. // Action = null;
  16. // }
  17. // private BitmapImage StatusImage(CoreRow row)
  18. // {
  19. // if (row == null)
  20. // return header;
  21. // EmployeeStatus status = (EmployeeStatus)row.Get<T, Object>(Property);
  22. // if (status == EmployeeStatus.In)
  23. // return clockedin;
  24. // else if (status == EmployeeStatus.Leave)
  25. // return leave;
  26. // else if (status == EmployeeStatus.Sick)
  27. // return sick;
  28. // return null;
  29. // }
  30. //}