示例#1
0
 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());
     }
 }
示例#2
0
 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());
     }
 }
示例#3
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            Window hostingWin = new HostigUnitWin();

            hostingWin.Show();
        }