예제 #1
0
        /// <summary>
        /// 该方法用于编辑数据库
        /// </summary>
        public void EditDatabase(string table0)
        {
            WinFromEditTable myform = new WinFromEditTable(table0);

            if (myform.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string table1 = myform.table1;
                Setting._currentdb = table1;
                string str_sql = $"rename table {table0} TO {table1}";
                _mycon.CreateCommand(str_sql).ExecuteNonQuery();
                System.Windows.Forms.MessageBox.Show($"数据表 {table1} 改名已成功!");
            }
        }
예제 #2
0
        /// <summary>
        /// 该方法用于编辑数据库
        /// </summary>
        public void EditDatabase(string table0)
        {
            WinFromEditTable myform = new WinFromEditTable(table0);

            if (myform.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                string table1 = myform.table1;
                Setting._currentdb = table1;
                string str_sql = $"ALTER TABLE {table0} RENAME TO {table1}";
                mysqliter.ExecuteRow(str_sql, null, null);
                System.Windows.Forms.MessageBox.Show($"数据表 {table1} 改名已成功!");
            }
        }