ConsignmentDock.xaml.cs 873 B

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Windows.Controls;
  3. using Comal.Classes;
  4. using InABox.Clients;
  5. using InABox.Core;
  6. namespace PRSDesktop
  7. {
  8. /// <summary>
  9. /// Interaction logic for ConsignmentDock.xaml
  10. /// </summary>
  11. public partial class ConsignmentDock : UserControl, IDockPanel
  12. {
  13. public ConsignmentDock()
  14. {
  15. InitializeComponent();
  16. }
  17. public void Setup()
  18. {
  19. }
  20. public void Refresh()
  21. {
  22. Consignments.ItemsSource = null;
  23. new Client<Consignment>().Load(
  24. new Filter<Consignment>(x => x.Closed).IsEqualTo(DateTime.MinValue),
  25. new SortOrder<Consignment>(x => x.EstimatedWarehouseArrival),
  26. (c, e) => { Dispatcher.Invoke(() => { Consignments.ItemsSource = c; }); }
  27. );
  28. }
  29. }
  30. }