Beispiel #1
0
        private void DeleteSpo_Click(object sender, RoutedEventArgs e)
        {
            Member SelectedMember = ((Member)MemGrid.SelectedItem);

            if (SelectedMember != null)
            {
                Spouse Selected = ((Spouse)_context.spouses.FirstOrDefault(s => s.ParentId == SelectedMember.Id));
                if (Selected != null)
                {
                    DeleteConfirmation deleteConfirmation = new DeleteConfirmation();
                    deleteConfirmation.assigner(Selected);
                    deleteConfirmation.Show();
                    Clear_Spouse();
                    SelectedMember.MariageStatus         = false;
                    _context.Entry(SelectedMember).State = System.Data.Entity.EntityState.Modified;
                    _context.SaveChanges();
                }
                else
                {
                    ErrorMessage er = new ErrorMessage();
                    er.MessageText.Text = "Must Select a Member first";
                    er.Show();
                }
            }
        }
Beispiel #2
0
        private void DeleteBtn_Click(object sender, RoutedEventArgs e)
        {
            Item Selected = ((Item)ItemGrid.SelectedItem);

            if (Selected != null)
            {
                DeleteConfirmation Confirmation = new DeleteConfirmation();
                Confirmation.assigner(Selected);
                Confirmation.Show();
            }
        }
Beispiel #3
0
        private void DeleteBtn_Click(object sender, RoutedEventArgs e)
        {
            Member SelectedMember = ((Member)MemGrid.SelectedItem);

            if (SelectedMember != null)
            {
                DeleteConfirmation deleteConfirmation = new DeleteConfirmation();
                deleteConfirmation.assigner(SelectedMember);
                deleteConfirmation.Show();
                MemGrid.Items.Refresh();
            }
            Clear();
        }
Beispiel #4
0
 private void DeleteBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         Rule Selected = ((Rule)RulesGrid.SelectedItem);
         DeleteConfirmation Confirmation = new DeleteConfirmation();
         Confirmation.assigner(Selected);
         Confirmation.Show();
     }
     catch (Exception)
     {
     }
 }
Beispiel #5
0
 private void DeleteBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         member = ((Member)MemGrid.SelectedItem);
         DeleteConfirmation Confirmation = new DeleteConfirmation();
         Confirmation.assigner(member);
         Confirmation.Show();
     }
     catch (Exception)
     {
     }
 }
Beispiel #6
0
 private void DeleteBtn_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         MahiberEvent       selected     = ((MahiberEvent)EventGrid.SelectedItem);
         DeleteConfirmation Confirmation = new DeleteConfirmation();
         Confirmation.assigner(selected);
         Confirmation.Show();
     }
     catch (Exception)
     {
     }
 }