Ejemplo n.º 1
0
        private void ImportOverwrite_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var item = ProjectItems.SelectedItem as TreeViewItem;
                if (null == item)
                {
                    return;
                }

                var merge = item.Tag as MergeDescriptor.Merge;
                if (merge == null)
                {
                    return;
                }

                var dialog =
                    new ImportOverwriteTableDialog(string.Format("{0}.{1}", merge.Table.Name.GetSchema(),
                                                                 merge.Table.Name.GetName()));
                dialog.ShowDialog();
                merge.Data.ExtendedProperties["Changed"] = true;
                merge.Data           = dialog.ImportedData;
                God.CurrentMergeData = merge.Data;
                God.DataTableChanged();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Unable to import/overwrite table: " + ex.Message);
            }
        }
Ejemplo n.º 2
0
        private void ImportOverwrite_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var item = ProjectItems.SelectedItem as TreeViewItem;
                if (null == item)
                    return;

                var merge = item.Tag as MergeDescriptor.Merge;
                if (merge == null)
                    return;

                var dialog =
                    new ImportOverwriteTableDialog(string.Format("{0}.{1}", merge.Table.Name.GetSchema(),
                        merge.Table.Name.GetName()));
                dialog.ShowDialog();
                merge.Data.ExtendedProperties["Changed"] = true;
                merge.Data = dialog.ImportedData;
                God.CurrentMergeData = merge.Data;
                God.DataTableChanged();
            }
            catch (Exception ex)
            {
                MessageBox.Show("Unable to import/overwrite table: " + ex.Message);
            }
        }