private void btnGetAllRightChanges_Click(object sender, EventArgs e) { string sqlSrc; string sqlDst; cmp.GetScript(result, false, out sqlSrc, out sqlDst); MySqlScriptDialog dlg = new MySqlScriptDialog(); dlg.TextScript = sqlSrc; dlg.Title = "Scripts to apply in Left Database"; dlg.ShowDialog(); //dlg.Text = sqlDst; //dlg.Title = "Scripts to apply in Right Database"; //dlg.ShowDialog(); }
private void btnGetRightChange_Click(object sender, EventArgs e) { DataGridViewRow row = dgDiffSummary.SelectedRows[0]; if (row == null) { return; } string sql = (string)row.Cells[0].Value; if (string.IsNullOrEmpty(sql)) { return; } MySqlScriptDialog dlg = new MySqlScriptDialog(); dlg.TextScript = sql; dlg.ShowDialog(); }
public override void GenerateTableScript() { // Popup Window if table script. MySqlScriptDialog dlg = new MySqlScriptDialog(); DbConnection conn = (DbConnection)HierarchyAccessor.Connection.GetLockedProviderObject(); try { DbCommand cmd = conn.CreateCommand(); cmd.CommandText = string.Format("show create table `{0}`", Name); using (DbDataReader r = cmd.ExecuteReader()) { r.Read(); dlg.TextScript = r.GetString(1); } dlg.ShowDialog(); } finally { HierarchyAccessor.Connection.UnlockProviderObject(); } }