コード例 #1
0
        private void Button_Ajouter_Click(object sender, RoutedEventArgs e)
        {
            var step3AddOrUpdate = new Step3AddOrUpdate();

            step3AddOrUpdate.DataContext = new FormToSpLibrary {
                Exports = new ObservableCollection <Export>(), MetaData = new ObservableCollection <DataMapping>()
            };
            step3AddOrUpdate.OpnedForNewItem   = true;
            step3AddOrUpdate.FormToSpLibraries = ((Config)DataContext).FormsToSpLibraries;
            step3AddOrUpdate.Context           = ((Config)DataContext).SharepointConfig.Context;
            step3AddOrUpdate.Show();
        }
コード例 #2
0
 private void ButtonUpdate_Click(object sender, RoutedEventArgs e)
 {
     if ((FormToSpLibrary)lvFormsToSplibraries.SelectedItem != null)
     {
         FormToSpLibrary item = (FormToSpLibrary)lvFormsToSplibraries.SelectedItem;
         item.Exports  = item.Exports ?? new ObservableCollection <Export>();
         item.MetaData = item.MetaData ?? new ObservableCollection <DataMapping>();
         var step3AddOrUpdate = new Step3AddOrUpdate();
         step3AddOrUpdate.DataContext     = item;
         step3AddOrUpdate.OpnedForNewItem = false;
         step3AddOrUpdate.Context         = ((Config)DataContext).SharepointConfig.Context;
         step3AddOrUpdate.Show();
     }
 }