Ejemplo n.º 1
0
 private void Button_Click_DeleteCustomer(object sender, RoutedEventArgs e)
 {
     Resources.Notifications.Confirmations confirmation = new Resources.Notifications.Confirmations();
     confirmation.Output.Text = "Vil du slette denne kunde?";
     confirmation.ShowDialog();
     if (confirmation.confirmed)
     {
         customerFindViewModel.DeleteCustomer();
         ((Window)this.Parent).Close();
     }
 }
Ejemplo n.º 2
0
 public void Button_Click_RemoveContact(object sender, RoutedEventArgs e)
 {
     Resources.Notifications.Confirmations confirmation = new Resources.Notifications.Confirmations();
     confirmation.Output.Text = "Vil du slette denne kontaktperson?";
     confirmation.ShowDialog();
     if (confirmation.confirmed)
     {
         Button contact = ((Button)sender);
         if (contact.DataContext is Contact deleteme)
         {
             customerFindViewModel.RemoveContact(deleteme);
         }
     }
 }
Ejemplo n.º 3
0
 public void Button_Click_RemoveDepartment(object sender, RoutedEventArgs e)
 {
     Resources.Notifications.Confirmations confirmation = new Resources.Notifications.Confirmations();
     confirmation.Output.Text = "Vil du slette denne afdeling?";
     confirmation.ShowDialog();
     if (confirmation.confirmed)
     {
         Button department = ((Button)sender);
         if (department.DataContext is Department deleteme)
         {
             customerFindViewModel.DeleteDepartment(deleteme);
         }
     }
 }