Exemplo n.º 1
0
        /// <summary>
        /// Filter Table Name
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtFilterTable_KeyUp(object sender, KeyEventArgs e)
        {
            XmlControl.CreateCorrespondingXmlWhenNotExist();
            Dictionary <string, string> dic = XmlControl.ReadXml();

            dgvDataTables.DataSource          = TableControl.GetTables(dic, txtFilterTable.Text.Trim().ToLower(), dbType);
            dgvDataTables.AutoGenerateColumns = false;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Change DataBase Type
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void rbOracle_CheckedChanged(object sender, EventArgs e)
        {
            dbType = rbOracle.Checked ? EnumDbType.Oracle : EnumDbType.SqlServer;
            if (rbOracle.Checked)
            {
                this.rbPascal.Checked = true;
                this.rbOri.Checked    = false;
            }
            else
            {
                this.rbOri.Checked    = true;
                this.rbPascal.Checked = false;
            }
            ConfigUtil.SwithDb(dbType);
            XmlControl.CreateCorrespondingXmlWhenNotExist();
            Dictionary <string, string> dic = XmlControl.ReadXml();

            dgvDataTables.DataSource          = TableControl.GetTables(dic, string.Empty, dbType);
            dgvDataTables.AutoGenerateColumns = false;
        }