private void OnCancelAutomaticGridDataDialog(object sender, System.Windows.RoutedEventArgs e)
 {
     dialog.cancelButton.Click -= OnCancelAutomaticGridDataDialog;
     dialog.runButton.Click    -= OnRunAutomaticDataDialog;
     dialog.Close();
     dialog = null;
 }
 protected override void performRun(AutomaticSourcingEditorItem page)
 {
     if (validateColumns(page))
     {
         dialog = new AutomaticEnrichmentTableDataDialog();
         dialog.EnrichmentTableService = ApplicationManager.ControllerFactory.ServiceFactory.GetEnrichmentTableService();
         dialog.loadTables(page.getAutomaticSourcingForm().SpreadSheet.DocumentName);
         //dialog.NewTableNameTextBox.Text = page.getAutomaticSourcingForm().SpreadSheet.DocumentName;
         dialog.cancelButton.Click += OnCancelAutomaticGridDataDialog;
         dialog.runButton.Click    += OnRunAutomaticDataDialog;
         dialog.ShowDialog();
     }
 }