private void AddHostingUnitWindow_Click(object sender, RoutedEventArgs e)
        {
            Window addHostingWindow = new AddHostingUnitWindow(host);

            addHostingWindow.Show();
            Close();
        }
        public void AddNewUnit_Click_1(object sender, RoutedEventArgs e)
        {
            try
            {
                if (hostingUnitList.FirstOrDefault() == null)
                {
                    var result = from item in myBL.GetHosts()
                                 where item.HostKey.CompareTo(number) == 0
                                 select item;
                    AddHostingUnitWindow HostingUnit = new AddHostingUnitWindow(result.FirstOrDefault());
                    HostingUnit.ShowDialog();
                    Close();
                    HostWindow window1 = new HostWindow(host);
                    window1.ShowDialog();
                    return;
                }
                AddHostingUnitWindow newHostingUnit = new AddHostingUnitWindow(hostingUnitList.FirstOrDefault().Owner);
                newHostingUnit.ShowDialog();
                Close();

                HostWindow window = new HostWindow(host);
                window.ShowDialog();
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message, "exception", MessageBoxButton.OK, MessageBoxImage.Error);
            }
            Close();
        }