Example #1
0
 // Edit Menu
 private void mnuEditAddcol_Click(object sender, EventArgs e)
 {
     try
     {
         InputForm inputfrm = new InputForm("Column Name");
         if (inputfrm.ShowDialog() != DialogResult.OK)
         {
             return;
         }
         dataGrid.Columns.Add(inputfrm.input, inputfrm.input);
     }
     catch (Exception e1)
     {
         MessageBox.Show(e1.Message);
     }
 }
Example #2
0
        private void mnuFileCtable_Click(object sender, EventArgs e)
        {
            try
            {
                InputForm inputfrm = new InputForm("Table Name");
                if (inputfrm.ShowDialog() != DialogResult.OK)
                {
                    return;
                }

                Run($"create table {inputfrm.input} (id varchar(20))");
                Run($"select * from {inputfrm.input}");
            }
            catch (Exception e1)
            {
                MessageBox.Show(e1.Message);
            }
        }