Example #1
0
        private void Button_Ajouter_Click(object sender, RoutedEventArgs e)
        {
            var step5AddOrUpdate = new Step5AddorUpdate();

            step5AddOrUpdate.PeriodicExports = ((Config)DataContext).PeriodicExports;
            step5AddOrUpdate.Context         = ((Config)DataContext).SharepointConfig.Context;
            step5AddOrUpdate.OpnedForNewItem = true;
            var item = new PeriodicExport();

            item.PeriodicChoices         = PeriodicChoices;
            step5AddOrUpdate.DataContext = item;
            step5AddOrUpdate.Show();
        }
Example #2
0
 private void ButtonUpdate_Click(object sender, RoutedEventArgs e)
 {
     if (lvPeriodicExports.SelectedItem != null)
     {
         var step5AddOrUpdate = new Step5AddorUpdate();
         var item             = (PeriodicExport)lvPeriodicExports.SelectedItem;
         item.PeriodicChoices             = PeriodicChoices;
         step5AddOrUpdate.PeriodicExports = ((Config)DataContext).PeriodicExports;
         step5AddOrUpdate.Context         = ((Config)DataContext).SharepointConfig.Context;
         step5AddOrUpdate.DataContext     = item;
         step5AddOrUpdate.OpnedForNewItem = false;
         step5AddOrUpdate.InitComboboxes();
         step5AddOrUpdate.Show();
     }
 }