private void NewHostinUnit_Click(object sender, RoutedEventArgs e) { try { hostingUnit.Owner = FindHostWindow.host; bl.AddNewHostingUnit(hostingUnit); MessageBox.Show("your Hosting Unit have been added"); this.Close(); Window HostigUnitWin = new HostigUnitWin(); HostigUnitWin.Show(); } catch (Exception exp) { MessageBox.Show(exp.ToString()); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { try { if (MessageBox.Show("are you sure you want to delete this hosting unit?", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.No) { this.Close(); } else { bl.DeleteHostingUnit(this.hostingUnit.HostingUnitKey); this.Close(); Window HostigUnitWin = new HostigUnitWin(); HostigUnitWin.Show(); } } catch (Exception exp) { MessageBox.Show(exp.ToString()); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { Window hostingWin = new HostigUnitWin(); hostingWin.Show(); }