Пример #1
0
        public void HostingUnitFilter(object sender, RoutedEventArgs e)
        {
            string text = this.HostZone.tbxSearch.Text;

            try
            {
                hostingUnitsList = bL.getAllHostingUnits(Item => Item.Host.MailAddress == hostMail &&
                                                         (Item.HostingUnitName.Contains(text) || text == "" || text == "Search"));
                this.HostZone.dataGrid.ItemsSource = hostingUnitsList;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "לא נמצאו הזמנות", MessageBoxButton.OK,
                                MessageBoxImage.Error, MessageBoxResult.Cancel, MessageBoxOptions.RightAlign);
            }
        }
Пример #2
0
 public Email(Order order)
 {
     InitializeComponent();
     bL = MyBL.Instance;
     sendButton.Click += SendButton_Click;
     currentOrder      = order;
     hostingUnit       = bL.getAllHostingUnits(item => item.HostingUnitKey == currentOrder.HostingUnitKey).FirstOrDefault();
     DataContext       = hostingUnit;
 }
Пример #3
0
        public MainWindow()
        {
            InitializeComponent();
            bL = MyBL.Instance;
            string hostingUnitName = "Nave Mahmad";

            bL.addHostingUnit(new HostingUnit(new Host(), hostingUnitName, Enums.HostingUnitType.Zimmer));
            bL.addOrder(new BE.Order(Enums.OrderStatus.Closed, DateTime.Now));

            lb_HostingUnits.DataContext = bL.getAllHostingUnits();
            // lb_HostingUnits.DataContext = bL.getHostingUnits(hostingUnit => hostingUnit.HostingUnitType == Enums.HostingUnitType.Zimmer);
        }
Пример #4
0
 private void Window_GotFocus(object sender, RoutedEventArgs e)
 {
     lb_HostingUnits.DataContext = bL.getAllHostingUnits();
 }