コード例 #1
0
        private void ButtonDelete_Click(object sender, RoutedEventArgs e)
        {
            FormToSpLibrary item = (FormToSpLibrary)lvFormsToSplibraries.SelectedItem;

            if ((FormToSpLibrary)lvFormsToSplibraries.SelectedItem != null && MessageBox.Show("Are you sure ? ", "Question", MessageBoxButton.YesNo, MessageBoxImage.Warning) == MessageBoxResult.Yes)
            {
                ((Config)DataContext).FormsToSpLibraries.Remove(item);
            }
        }
コード例 #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();
     }
 }