Example #1
0
        private void BtnAddPerson_Click(object sender, RoutedEventArgs e)
        {
            AddEditRespPers AddEditRespPers = new AddEditRespPers();

            this.Opacity = 0.3;
            ListViewRespPerson.ItemsSource = context.ViewResponsiblePerson.ToList();
            AddEditRespPers.ShowDialog();
            ListViewRespPerson.ItemsSource = context.ViewResponsiblePerson.ToList();
            this.Opacity = 1;
        }
Example #2
0
 private void BtnEditPerson_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (ListViewRespPerson.SelectedItem is ViewResponsiblePerson person)
         {
             VarIdPlayer = (int)person.IdRespPerson;
             AddEditRespPers addEditRespPers = new AddEditRespPers(ListViewRespPerson.SelectedItem as ViewResponsiblePerson);
             this.Opacity = 0.3;
             //Filter();
             addEditRespPers.ShowDialog();
             //Filter();
             this.Opacity = 1;
         }
         else
         {
             MessageBox.Show("You did not select person", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
         }
     }
     catch
     {
         MessageBox.Show("Error", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
     }
 }