private void CreateHostingUnitButton_click(object sender, RoutedEventArgs e) { HostingUnit hostingUnit = getHostingUnit(); // bl.addHostingUnit(hostingUnit); // hostingUnits.Add(hostingUnit); HostingUnitWindow hst = new HostingUnitWindow(hostingUnit); hst.HostingUnitGrid.IsEnabled = true; hst.DeleteHostingUnit.IsEnabled = false; hst.upDateHostingUnit.Content = "שלח"; hst.orderTabItem.IsEnabled = false; hst.guestTabItem.IsEnabled = false; this.Close(); hst.ShowDialog(); }
private void HostingUnitsButton_click(object sender, RoutedEventArgs e) { int index = hostingUnitCB.SelectedIndex; if (index < 0) { MessageBox.Show("לא נבחרה יחידת אירוח"); } else { HostingUnitWindow hostingUnitWindow = new HostingUnitWindow(hostingUnits[hostingUnitCB.SelectedIndex]); //hostingUnitWindow.hostingUnit = hostingUnits[hostingUnitCB.SelectedIndex]; this.Close(); hostingUnitWindow.ShowDialog(); } }