示例#1
0
 private void button4_Click(object sender, EventArgs e)
 {
     // получение списка мостов
     //List<BridgeData> list = new BridgesReader(true).Load();
     // старт экспорта
     Coordinator coordinator = new Coordinator();
     // setup actions
     coordinator.AddAction(new ActionDeploy(true));
     coordinator.AddAction(new ActionViewLog(new dlgLog()));
     coordinator.AddAction(new ActionViewSessions(new dlgSessions()));
     coordinator.AddAction(new ActionToggleUsersOff());
     coordinator.AddAction(new ActionSwitchTriggers(false, "Выключение триггеров"));
     coordinator.AddAction(new ActionClearOracleBr());
     coordinator.AddAction(new ActionPDAToOracleTransfer());
     coordinator.AddAction(new ActionSwitchTriggers(true, "Включение триггеров"));
     coordinator.AddAction(new ActionFinishImportScripts());
     coordinator.AddAction(new ActionSetBrReadOnly(null, false));
     coordinator.AddAction(new ActionDoFinally());
     // make dialog
     dlgRunning dlg = new dlgRunning();
     dlg.Text = "Импорт";
     dlg.coordinator = coordinator;
     dlg.ShowDialog();
     FinallyStack.Run(); // завершающие скрипты должны выполниться все равно
 }
示例#2
0
文件: Form1.cs 项目: radtek/pdaexport
 private void создатьСкриптНаБазуToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // make script
     if (dlg_SaveScript.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         StreamWriter writer = new StreamWriter(dlg_SaveScript.FileName);
         Coordinator coordinator = new Coordinator();
         // add actions
         coordinator.AddAction(new ActionWriteDropScript(writer, PDATable.tables));
         coordinator.AddAction(new ActionWriteCreateTableScript(writer, PDATable.tables));
         coordinator.AddAction(new ActionWriteInsertScript(writer, PDATable.tables));
         //
         // example:coordinator.AddAction(new ActionPrepExportScripts());
         // make dialog
         dlgRunning dlg = new dlgRunning();
         dlg.Text = "Экспорт структуры";
         dlg.coordinator = coordinator;
         dlg.ShowDialog();
         writer.Close();
     }
 }
示例#3
0
文件: Form1.cs 项目: radtek/pdaexport
 private void выполнитьСкриптToolStripMenuItem_Click(object sender, EventArgs e)
 {
     // run script
     if (dlg_OpenScript.ShowDialog() == System.Windows.Forms.DialogResult.OK)
     {
         Coordinator coordinator = new Coordinator();
         // add actions
         coordinator.AddAction(new ActionRunScriptFromStream(dlg_OpenScript.FileName));
         //
         // example:coordinator.AddAction(new ActionPrepExportScripts());
         // make dialog
         dlgRunning dlg = new dlgRunning();
         dlg.Text = "Выполние";
         dlg.coordinator = coordinator;
         dlg.ShowDialog();
     }
 }
示例#4
0
 private void button4_Click(object sender, EventArgs e)
 {
     // старт экспорта
     Coordinator coordinator = new Coordinator();
     // setup actions
     coordinator.AddAction(new ActionDeploy(true));
     coordinator.AddAction(new ActionPrepExportScripts());
     coordinator.AddAction(new ActionClearLog());
     coordinator.AddAction(new ActionToTempTransferScripts(SelectedID));
     coordinator.AddAction(new ActionOracleToPDATransfer());
     coordinator.AddAction(new ActionFinishExportScripts());
     coordinator.AddAction(new ActionDeploy(false));
     coordinator.AddAction(new ActionSetBrReadOnly(SelectedID));
     // make dialog
     dlgRunning dlg = new dlgRunning();
     dlg.Text = "Экспорт";
     dlg.coordinator = coordinator;
     dlg.ShowDialog();
 }