Exemple #1
0
        private async void button3_Click(object sender, EventArgs e)
        {
            //add
            TextBoxDialog tbd = new TextBoxDialog("Enter New Table Name");

            if (tbd.ShowDialog(this) == DialogResult.OK)
            {
                if (tbd.TextResult.Length > 0)
                {
                    string textresult = tbd.TextResult;

                    await DatabaseManager.CreateTable(dbconnprop, textresult);
                    await RefreshTableNames();
                }
            }

            tbd.Dispose();
        }
Exemple #2
0
        private async void button1_Click(object sender, EventArgs e)
        {
            //add entry to table
            if (comboBox1.SelectedIndex > -1)
            {
                TextBoxDialog tbd = new TextBoxDialog("Enter UID of New Entry");
                tbd.ShowDialog();
                if (tbd.DialogResult == DialogResult.OK && tbd.TextResult.Length > 0)
                {
                    await DatabaseManager.AddRow(dbconnprop, (string)comboBox1.SelectedItem, Convert.ToUInt64(tbd.TextResult));

                    AccessPropertiesEditor ented = new AccessPropertiesEditor(dbconnprop, (string)comboBox1.SelectedItem, Convert.ToUInt64(tbd.TextResult));
                    ented.ShowDialog(this);
                    ented.Dispose();

                    await RefreshEntryNames();
                }

                tbd.Dispose();
            }
        }
Exemple #3
0
        private async void button4_Click(object sender, EventArgs e)
        {
            //edit table name
            if (comboBox1.SelectedIndex > -1)
            {
                string original_table_name = (string)comboBox1.SelectedItem;

                TextBoxDialog tbd = new TextBoxDialog("Enter New Table Name");
                if (tbd.ShowDialog(this) == DialogResult.OK)
                {
                    if (tbd.TextResult.Length > 0)
                    {
                        string new_table_name = tbd.TextResult;

                        await DatabaseManager.RenameTable(dbconnprop, original_table_name, new_table_name);

                        await RefreshTableNames();
                    }
                }

                tbd.Dispose();
            }
        }