示例#1
0
 private void ExecuteDeleteNC(object parameter)
 {
     NCI DeleteNCI = (NCI)parameter;
     context.NCIs.Remove(DeleteNCI);
     context.SaveChanges();
     NotifyPropertyChanged("CanRemoveTermineFilter");
     itemCollectionViewSource.Source = context.NCIs.ToList();
 }
示例#2
0
 private void ExecuteUpdateNC(object parameter)
 {
     NCI UpdateNCI = (NCI)parameter;
     //int Id = DeleteNCI.Id;
     PageU = new PageModifierMVVM(UpdateNCI);
     //PageU.DataContext = UpdateNCI;
     PageU.DataContext = this;
     //PageU.DataContext = context;
     PageU.ShowDialog();   
 }
示例#3
0
        private void btnModifier_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;

            context.SaveChanges();
            //MainWindow.datagrid.ItemsSource = context.NCIs.ToList();
            this.Hide();
        }
示例#4
0
        public PageModifier(int memberId)
        {
            InitializeComponent();
            Id = memberId;
            NCI UpdateNCI = (from n in context.NCIs
                             where n.Id == Id
                             select n).Single();

            comboboxzone.Text        = UpdateNCI.Zone;
            textblockTitreNCI.Text   = UpdateNCI.TitreNCI;
            textblockCommentNCI.Text = UpdateNCI.CommentNCI;
            textblockActionNCI.Text  = UpdateNCI.ActionNCI;
            textblockCreele.Text     = UpdateNCI.DateCreaNCI.ToString();
            textblockCreepar.Text    = UpdateNCI.CreateurNCI;
        }
示例#5
0
 //int Id;
 //LOG_NCEntities context = new LOG_NCEntities();
 public PageModifierMVVM(NCI UpdateNCI)
 {
     InitializeComponent();
 }