public showAllUnits() { InitializeComponent(); if (hebEnglish.hebrew) { hebChange(); } scrollview1 = new ScrollViewer(); long notreallykey = 0; try { unitList = bl.GetAllHostingUnits(); foreach (BE.HostingUnit item in unitList) { HUuserCuntrol gruc = new HUuserCuntrol(item, notreallykey); gruc.HUChoose.Visibility = Visibility.Hidden; b.Children.Add(gruc); } scrollview1.Content = b; } catch (Exception) { textBlock.Visibility = Visibility.Visible; } }
private void Button_Click(object sender, RoutedEventArgs e)//pools { scrollview1 = new ScrollViewer(); long notreallykey = 0; try { b.Children.Clear(); unitList = bl.allUnitsWithPools(); foreach (BE.HostingUnit item in unitList) { HUuserCuntrol gruc = new HUuserCuntrol(item, notreallykey); gruc.HUChoose.Visibility = Visibility.Hidden; b.Children.Add(gruc); } scrollview1.Content = b; } catch (Exception) { MessageBox.Show("no hosting units fit critiria"); } }
private void Button_Click_2(object sender, RoutedEventArgs e)//gardens { scrollview1 = new ScrollViewer(); long notreallykey = 0; try { unitList = bl.allUnitsWithGardens(); foreach (BE.HostingUnit item in unitList) { HUuserCuntrol gruc = new HUuserCuntrol(item, notreallykey); b.Children.Add(gruc); } scrollview1.Content = b; } catch (Exception) { MessageBox.Show("no hosting units fit critiria"); } }