private void Cbxfilter_SelectionChanged(object sender, SelectionChangedEventArgs e) { string[] myKeys; this.ManagerZone.cbxgroupBy.Visibility = Visibility.Visible; this.ManagerZone.LgroupBy.Visibility = Visibility.Visible; string text = this.ManagerZone.tbxSearch.Text; try { switch (((ComboBoxItem)ManagerZone.cbxfilter.SelectedItem).Content.ToString()) { case "דרישות לקוח": myKeys = new string[] { "אזורי ביקוש", "מספר אנשים" }; this.ManagerZone.cbxgroupBy.ItemsSource = myKeys; MgGuestRequestsList = bL.GetAllGuestRequests(); ManagerFilter(this, new RoutedEventArgs()); break; case "יחידות אירוח": myKeys = new string[] { "אזורי אירוח", "סוגי אירוח" }; this.ManagerZone.cbxgroupBy.ItemsSource = myKeys; MgHostingUnitsList = bL.getAllHostingUnits(); ManagerFilter(this, new RoutedEventArgs()); break; case "הזמנות": myKeys = new string[] { "סטטוס", "תאריך הזמנה" }; this.ManagerZone.cbxgroupBy.ItemsSource = myKeys; MgOrdersList = bL.getAllOrders(); ManagerFilter(this, new RoutedEventArgs()); break; case "בעלי יחידות": MgHostList = new List <Host>(); foreach (var item in bL.GroupHostByNumOfHostingUnit()) { foreach (var host in item) { MgHostList.Add(host); } } ManagerFilter(this, new RoutedEventArgs()); break; default: break; } } catch (Exception) { } }