Example #1
0
        void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (comboBox1.SelectedItem == null)
            {
                return;
            }

            string val = comboBox1.SelectedItem.ToString().ToLower();

            if (val == "oledb")
            {
                button1.Visible = true;
                button3.Visible = false;
            }
            else if (val == "mysql")
            {
                button3.Visible     = true;
                button1.Visible     = false;
                core                = new MySqlModeCreate(textBox1DbPath.Text);
                textBox1DbPath.Text = "Server=localhost;Uid=root;Pwd=niejunhua;";
            }
            else if (val == "sqlserver")
            {
                button1.Visible     = false;
                textBox1DbPath.Text = "server=192.168.104.117;uid=wftsa;password=jd7nTF#wM;database=K2Sln";
                button3.Visible     = true;
                core = new SqlServerModeCreate(textBox1DbPath.Text);
            }
        }
Example #2
0
        private BaseModeCreate GetCreator()
        {
            BaseModeCreate creator = null;
            string         v       = comboBox1.SelectedValue.ToString();

            if (v == "Oledb")
            {
                creator = new AccessModeCreate(textBox1.Text);
            }
            else if (v == "MsSql")
            {
                creator = new SqlServerModeCreate(textBox1.Text);
            }
            else if (v == "MySql")
            {
                creator = new MySqlModeCreate(textBox1.Text);
            }
            return(creator);
        }
Example #3
0
        public void TestMethod1()
        {
            MySqlModeCreate create = new MySqlModeCreate("server=localhost;User Id=root;password=niejunhua;Database=nq_article;charset=utf8 ");

            create.CreateAll("CommonClass", "nq_article", "", "");
        }