예제 #1
0
        private void btnDeleteIndex_Click(object sender, EventArgs e)
        {
            if (cmbSchemasDelete.SelectedItem.ToString() == "")
            {
                MessageBox.Show("Select a schema to delete the index");
                return;
            }

            if (cmbDeleteIndexName.Items.Count == 0)
            {
                return;
            }

            string status = dbHandler.DeleteIndex("\"" + cmbDeleteIndexName.SelectedItem.ToString() + "\"", cmbSchemasDelete.SelectedItem.ToString());

            if (status == "Success")
            {
                MessageBox.Show("Index Deleted Correctly");
                LoadTablesToCombobox();
                cmbDeleteIndexName.Items.Clear();
            }
            else
            {
                MessageBox.Show("Something went wrong while deleting index\nError message: " + status);
            }
        }