Example #1
0
        private void btnSelectTable_Click(object sender, EventArgs e)
        {
            if (txtIndexName.Text == "")
            {
                MessageBox.Show("Enter the index name in order to continue");
                return;
            }

            if (cmbTableName.Items.Count == 0)
            {
                MessageBox.Show("Select a schema with tables");
                return;
            }

            cmbSchemasCreate.Enabled = cmbTableName.Enabled = txtIndexName.Enabled = false;
            checkedListBox1.Enabled  = btnCreateIndex.Enabled = btnCreateUniqueIndex.Enabled = true;

            var tableFields = dbHandler.GetTableFields(cmbTableName.SelectedItem.ToString());

            checkedListBox1.Items.Clear();
            foreach (String str in tableFields)
            {
                checkedListBox1.Items.Add(str);
            }
        }