Пример #1
0
        private void ButtonEditQuery_Click(object sender, EventArgs e)
        {
            var queryDesigner = new QueryDesignerForm();

            if (queryDesigner.ShowDialog() == DialogResult.OK)
            {
                BodyEdit.Text = queryDesigner.Query;
                DataSchemaEdit.DataSourceSchema = BuildDataSchema(queryDesigner.SelectObjects);
            }
        }
Пример #2
0
        private void buttonAdd_Click(object sender, System.EventArgs e)
        {
            Cursor cursor = Cursor.Current;               // save cursor, probably Arrow

            Cursor.Current = Cursors.WaitCursor;          // hourglass cursor

            try
            {
                if (this.SelectedItem != null)
                {
                    QueryDesignerForm.AddTableToQueryText(this.SelectedItem);
                }
            }
            finally
            {
            }
        }
Пример #3
0
        // Query Builder Button clicked.
        private void btnQueryBuilder_Click(object sender, System.EventArgs e)
        {
            Cursor cursor = Cursor.Current;               // save cursor, probably Arrow

            Cursor.Current = Cursors.WaitCursor;          // hourglass cursor
            QueryDesignerForm form =
                new QueryDesignerForm(Command.Connection, this.CommandText);

            Cursor.Current = cursor;              // resored Arrow cursor

            DialogResult rc = form.ShowDialog();

            if (rc != DialogResult.OK)
            {
                return;
            }

            txtbox.Text      = form.CommandText; // return the CommandText
            this.CommandText = form.CommandText;
        }                                        // btnQueryBuilder_Click