예제 #1
0
        private void viewScriptToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (this.dgDetail.SelectedCells.Count == 0)
            {
                return;
            }


            SqlSyncBuildData.ScriptRunRow row     = (SqlSyncBuildData.ScriptRunRow)((System.Data.DataRowView) this.dgDetail.SelectedCells[0].OwningRow.DataBoundItem).Row;
            ScriptDisplayForm             frmDisp = new ScriptDisplayForm(row.Results, row.Database, row.FileName);

            frmDisp.ShowDialog();
            frmDisp.Dispose();
        }
        private void viewScriptAsRunOnServerToolStripMenuItem_Click(object sender, EventArgs e)
        {
            List <DataGridViewRow> selectedRows = GetSelectedRows(this.dataGridView1);

            if (selectedRows.Count != 1)
            {
                return;
            }

            SqlSync.SqlBuild.ScriptRunLogRow row = (SqlSync.SqlBuild.ScriptRunLogRow)((DataRowView)selectedRows[0].DataBoundItem).Row;
            ScriptDisplayForm frmDisp            = new ScriptDisplayForm(row.ScriptText, this.connData.SQLServerName, row.ScriptFileName);

            frmDisp.ShowDialog();
            frmDisp.Dispose();
        }