Esempio n. 1
0
        private void cmsvw_alterview_Click(object sender, EventArgs e)
        {
            //birşey seçilmemişse ve view değilse dön
            if (Tv_DbStructure.SelectedNode == null)
            {
                return;
            }
            if (Tv_DbStructure.SelectedNode.Parent.Name != "vw")
            {
                return;
            }
            //view oluşturma komutunu al
            SQLiteConnection cnn = new SQLiteConnection(Global.SqlStr);

            cnn.Open();
            SQLiteCommand emir          = new SQLiteCommand("select sql from sqlite_master where name='" + Tv_DbStructure.SelectedNode.Name + "'", cnn);
            string        _createscript = "";

            try { _createscript = emir.ExecuteScalar().ToString(); }
            catch { }
            cnn.Close();
            //viewekle iceriği alındı
            QueryScreen frms = new QueryScreen();

            frms.fastColoredTextBox1.Text = "DROP VIEW IF EXISTS " + Tv_DbStructure.SelectedNode.Name + ";" + Environment.NewLine +
                                            _createscript;
            frms.MdiParent = this;
            frms.Show();
        }
Esempio n. 2
0
        private void newQueryWindowToolStripMenuItem_Click(object sender, EventArgs e)
        {
            QueryScreen frms = new QueryScreen();

            frms.MdiParent = this;
            frms.Show();
        }
Esempio n. 3
0
        private void csm_select_Click(object sender, EventArgs e)
        {
            if (Tv_DbStructure.SelectedNode == null)
            {
                return;
            }
            QueryScreen frms = new QueryScreen();

            frms.TableName = Tv_DbStructure.SelectedNode.Name;
            frms.MdiParent = this;
            frms.Show();
        }
Esempio n. 4
0
        private void cmsvw_newview_Click(object sender, EventArgs e)
        {
            //birşey seçilmemişse ve view değilse dön
            if (Tv_DbStructure.SelectedNode == null)
            {
                return;
            }
            if (Tv_DbStructure.SelectedNode.Parent.Name != "vw")
            {
                return;
            }
            QueryScreen frms = new QueryScreen();

            frms.fastColoredTextBox1.Text = "CREATE VIEW myview1 AS " + Environment.NewLine;
            frms.MdiParent = this;
            frms.Show();
        }