Beispiel #1
0
 public SearchRequestsPage(IBusiness business, Frame frame, Host host, ObservableCollection <Unit> ui_units, ObservableCollection <Order> ui_orders) : base(business, frame)
 {
     InitializeComponent();
     DataContext = this;
     Host        = host;
     UiUnits     = ui_units;
     UiOrders    = ui_orders;
     Cities.CheckAll(Business.UnitsOf(Host).Select(unit => unit.City).Distinct());
     UnitTypes.CheckAll(Business.UnitsOf(Host).Select(unit => unit.UnitType).Distinct());
     Amenities.CheckAll(Business.UnitsOf(Host).Aggregate <Unit, IEnumerable <Amenity> >(new HashSet <Amenity>(), (acc, unit) => acc.Union(unit.Amenities)));
 }