Ejemplo n.º 1
0
        private void newColumnToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //store scroll value for later
            //scrollValue = panel1.AutoScrollPosition;

            if (DatabaseFunct.selectedTable != "")
            {
                string[] input = Prompt.ShowDialog("Name Column And Select Type", "Create Column", true, true, ColumnTypes.Types.Keys.ToArray <string>());
                if (input[0] == "T")
                {
                    DatabaseFunct.AddColumn(input[1], input[2], false, Program.mainForm.TableMainGridView);
                }
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("no table selected");
            }
        }
Ejemplo n.º 2
0
        public void subTableNewColumnButton_Click(object sender, EventArgs e)
        {
            Button       senderButton = sender as Button;
            DataGridView senderDGV    = senderButton.Parent as DataGridView;



            if (DatabaseFunct.selectedTable != "")
            {
                string[] input = Prompt.ShowDialog("Name Column And Select Type", "Create Column", true, true, ColumnTypes.Types.Keys.ToArray <string>());

                if (input[0] == "T")
                {
                    DatabaseFunct.AddColumn(input[1], input[2], false, senderDGV);
                }
            }
            else
            {
                System.Windows.Forms.MessageBox.Show("no table selected");
            }
        }