Ejemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     dbo1 = new DBOperate("Mysql", strUrl1, "TRACKING_TEST");
     dbo2 = new DBOperate("Mysql", strUrl2, "TRACKING");
     iID=int.Parse(tbBeginID.Text.Trim());
     iCount = int.Parse(tbCount.Text.Trim());
     isOperate = true;
     button1.Enabled = false;
     CallBackDelegate cbd = new CallBackDelegate(this.CallBack);
     new Thread(new ParameterizedThreadStart(this.ThreadFun)).Start(cbd);
 }
Ejemplo n.º 2
0
        private void cbDBName_SelectedValueChanged(object sender, EventArgs e)
        {
            var item = dbList.Where(r => r.DBShowName == cbDBName.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);

            cbDBTable.Items.Clear();

            cbDBTable.Items.Add("自定义SQL");

            foreach (var itemName in dbo.getTableName())
            {
                cbDBTable.Items.Add(itemName.ToString());
            }
        }
Ejemplo n.º 3
0
        private void cbDBTable_SelectedValueChanged(object sender, EventArgs e)
        {
            var item = dbList.Where(r => r.DBShowName == cbDBName.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);

            DataTable dt = dbo.getTableColumnName(cbDBTable.SelectedItem.ToString()).Tables["dbTable"];


            listColumnName.Clear();

            foreach (DataRow dr in dt.Rows)
            {
                listColumnName.Add(dr[0].ToString());
            }
        }
Ejemplo n.º 4
0
        private void cbDBTableG_SelectedValueChanged(object sender, EventArgs e)
        {
            gvMacth.AutoGenerateColumns = false;
            gvMacth.Rows.Clear();
            var item = dbList.Where(r => r.DBShowName == cbDBNameG.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);
            DataTable dt = dbo.getTableColumnName(cbDBTableG.SelectedItem.ToString()).Tables["dbTable"];

            this.gvMacth.DataSource = dt;

            listColumnGName.Clear();
            foreach (DataRow dr in dt.Rows)
            {
                listColumnGName.Add(dr[0].ToString());
            }
        }
Ejemplo n.º 5
0
        private void cbDBTable_SelectedValueChanged(object sender, EventArgs e)
        {
            if (gvMacth.Rows.Count <= 0)
            {
                return;
            }

            var item = dbList.Where(r => r.DBShowName == cbDBName.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);

            DataTable dt = dbo.getTableColumnName(cbDBTable.SelectedItem.ToString()).Tables["dbTable"];

            MacthName.Items.Add("自增长");
            MacthName.Items.Add("自定义");
            MacthName.Items.Add("Null");

            listColumnName.Clear();

            foreach (DataRow dr in dt.Rows)
            {
                cbBasis.Items.Add(dr[0].ToString());
                MacthName.Items.Add(dr[0].ToString());
                listColumnName.Add(dr[0].ToString());
            }
        }
Ejemplo n.º 6
0
        private void cbDBTableG_SelectedValueChanged(object sender, EventArgs e)
        {
            gvMacth.AutoGenerateColumns = false;
            gvMacth.Rows.Clear();
            var item = dbList.Where(r => r.DBShowName == cbDBNameG.SelectedItem.ToString()).FirstOrDefault();
            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);
            DataTable dt = dbo.getTableColumnName(cbDBTableG.SelectedItem.ToString()).Tables["dbTable"];
            this.gvMacth.DataSource = dt;

            listColumnGName.Clear();
            foreach (DataRow dr in dt.Rows)
            {
                listColumnGName.Add(dr[0].ToString());
            }
        }
Ejemplo n.º 7
0
        private void cbDBName_SelectedValueChanged(object sender, EventArgs e)
        {
            var item = dbList.Where(r => r.DBShowName == cbDBName.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);

            cbDBTable.Items.Clear();

            cbDBTable.Items.Add("自定义SQL");

            foreach (var itemName in dbo.getTableName())
            {
                cbDBTable.Items.Add(itemName.ToString());
            }
        }
Ejemplo n.º 8
0
        private void cbDBTable_SelectedValueChanged(object sender, EventArgs e)
        {
            var item = dbList.Where(r => r.DBShowName == cbDBName.SelectedItem.ToString()).FirstOrDefault();

            dbo = new DBOperate(item.DBType, item.DBUrl, item.DBName);

            DataTable dt = dbo.getTableColumnName(cbDBTable.SelectedItem.ToString()).Tables["dbTable"];

            listColumnName.Clear();

            foreach (DataRow dr in dt.Rows)
            {

                listColumnName.Add(dr[0].ToString());
            }
        }