private void sreportToolStripMenuItem_Click(object sender, EventArgs e) { if (m_jobconn == null) { StdDialog.ShowInfo("s_please_save_job_first"); return; } JobReportForm.Run(m_jobconn.FileName, m_cmd); }
private void btmSavePhpTunnel_Click(object sender, EventArgs e) { if (saveFileDialog1.ShowDialogEx() == DialogResult.OK) { SaveConnection(); using (FileStream fw = new FileStream(saveFileDialog1.FileName, FileMode.Create)) { byte[] buffer = Params.GetPhpTunnelFile(); fw.Write(buffer, 0, buffer.Length); StdDialog.ShowInfo("s_ok"); } } }
private void btnAddToFavorites_Click(object sender, EventArgs e) { if (m_jobconn == null) { StdDialog.ShowInfo("s_please_save_job_first"); return; } AddToFavoriteForm.Run( new DataSynFavorite { File = m_jobconn.FileName, Command = m_cmd.GroupId }, Path.GetFileNameWithoutExtension(m_jobconn.FileName) ); }
private void btnSynchronize_Click(object sender, EventArgs e) { if (m_dstDb == null || m_diff == null) { return; } if (objectListTables.CheckedItems.Count == 0) { StdDialog.ShowInfo("s_no_synchronize_action_checked"); return; } try { bool ok = false; if (m_dstDb.DatabaseCaps.ExecuteSql) { // synchronize using SQL dumping ok = RunActionAsSql(m_diff.Actions); } else { // synchronize using data-sources alter/create/drop methods if (MessageBox.Show(Texts.Get("s_really_change_destination_structure"), VersionInfo.ProgramTitle, MessageBoxButtons.YesNo) == DialogResult.Yes) { var plan = m_diff.Actions.GetPlanForThis(m_dstDb, true); var opts = CreateDbDiffOptions(); m_dstDb.AlterDatabase(plan, opts); ok = true; } } if (ok) { RefreshData(false, true); Usage.AddSub("synchronize_ok", m_src.ToString(), m_dst.ToString()); } } catch (Exception err) { Errors.Report(err); } }