Ejemplo n.º 1
0
 private void ExecuteDeleteNC(object parameter)
 {
     NCI DeleteNCI = (NCI)parameter;
     context.NCIs.Remove(DeleteNCI);
     context.SaveChanges();
     NotifyPropertyChanged("CanRemoveTermineFilter");
     itemCollectionViewSource.Source = context.NCIs.ToList();
 }
Ejemplo n.º 2
0
        private void btnCloturer_Click(object sender, RoutedEventArgs e)
        {
            NCI UpdateNCI = (from n in context.NCIs
                             where n.Id == Id
                             select n).Single();

            UpdateNCI.Zone        = comboboxzone.Text;
            UpdateNCI.TitreNCI    = textblockTitreNCI.Text;
            UpdateNCI.CommentNCI  = textblockCommentNCI.Text;
            UpdateNCI.ActionNCI   = textblockActionNCI.Text;
            UpdateNCI.DateTermine = DateTime.Today;
            UpdateNCI.Termine     = true;

            context.SaveChanges();
            //MainWindow.datagrid.ItemsSource = context.NCIs.ToList();
            this.Hide();
        }