Exemple #1
0
        private void btnMakeScript_Click(object sender, EventArgs e)
        {
            OpenQueryParameters pars = new OpenQueryParameters();

            //m_conn.SetOnOpenDatabase(m_db.DatabaseName);
            pars.SqlText = GenerateSql();
            MainWindow.Instance.OpenContent(new QueryFrame(m_conn.Clone(), pars));
        }
Exemple #2
0
        public override void OpenAction()
        {
            if (QueryFrame.FindOpenedFile(m_file.DataDiskPath))
            {
                return;
            }
            OpenQueryParameters pars = new OpenQueryParameters();
            IPhysicalConnection conn = MainWindowExtension.SelectedConnection;

            if (conn != null)
            {
                conn = conn.Clone();
            }
            pars.File = m_file;
            MainWindow.Instance.OpenContent(new QueryFrame(conn, pars));
        }
Exemple #3
0
        public void EditScript()
        {
            if (QueryFrame.FindOpenedFile(m_file.DataDiskPath))
            {
                return;
            }
            IPhysicalConnection conn = MainWindowExtension.SelectedConnection;

            if (conn != null)
            {
                conn = conn.Clone();
            }
            OpenQueryParameters pars = new OpenQueryParameters();
            string dbname            = MainWindowExtension.SelectedDatabaseName;

            pars.File           = m_file;
            pars.DisableContext = m_conn != null;
            if (dbname != null && conn != null)
            {
                conn.AfterOpen += ConnTools.ChangeDatabaseCallback(dbname);
            }
            MainWindow.Instance.OpenContent(new QueryFrame(conn, pars));
        }