Example #1
0
 private void button2_Click(object sender, EventArgs e)
 {
     // if (ab==1)
     // {
     //     //KeyProcess keyprocess = new KeyProcess();
     //     //keyprocess.ShowDialog();
     //     this.Width = 800;
     //     wmp.Visible = true;
     //     wmp.Left = dataGridView1.Right;
     //     wmp.Size = new Size(400, 360);
     //     wmp.Location = new Point(1, 5);
     //     panel1.Controls.Add(wmp);
     //     ab = 2;
     // }
     //else if (ab == 2)
     // {
     //     //KeyProcess keyprocess = new KeyProcess();
     //     //keyprocess.ShowDialog();
     //     this.Width = 400;
     //     wmp.Dispose();
     //     ab = 1;
     // }
     // tiaozheng();
     dataGridView1.DataSource = helper.SelectMysqlreturnDataset("SELECT Process,Product,Type FROM keyprocess").Tables[0];
 }
Example #2
0
 private void Routing_Load(object sender, EventArgs e)
 {
     //string abctxt = "OK" + label1.Text + "";
     //MessageBox.Show(abctxt);
     //dataGridView1.DataSource = helper.SelectMysqlreturnDataset("SELECT * FROM routing where cubicle="+abctxt+"").Tables[0];
     dataGridView1.DataSource = helper.SelectMysqlreturnDataset("SELECT * FROM routing where cubicle='OK" + label1.Text + "'").Tables[0];
 }
Example #3
0
        //private void button1_Click(object sender, EventArgs e)
        //{
        //    CublicType okken = new CublicType();
        //    okken.label1.Text = button1.Text + " Cubicle";
        //    okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button1.Text + "'").Tables[0];
        //    okken.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
        //    //okken.dataGridView1.Font = new Font("微软雅黑", 9);
        //    okken.ShowDialog();

        //}

        //private void button2_Click(object sender, EventArgs e)
        //{
        //    //CublicType okken = new CublicType();
        //    ////okken.ShowDialog();
        //    ////MessageBox.Show (this.button1.Text);
        //    //okken.label1.Text = button2.Text + " Cubicle";
        //    //okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type,Description from T_OKKEN where Product='" + button2.Text + "'").Tables[0];
        //    //okken.ShowDialog();

        //    CublicType okken = new CublicType();
        //    okken.label1.Text = button2.Text + " Cubicle";
        //    okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button2.Text + "'").Tables[0];
        //    okken.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
        //    okken.ShowDialog();
        //}

        //private void button3_Click(object sender, EventArgs e)
        //{
        //    CublicType okken = new CublicType();
        //    okken.label1.Text = button3.Text + " Cubicle";
        //    okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button3.Text + "'").Tables[0];
        //    okken.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
        //    okken.ShowDialog();
        //}

        //private void button4_Click(object sender, EventArgs e)
        //{
        //    CublicType okken = new CublicType();
        //    okken.label1.Text = button4.Text + " Cubicle";
        //    okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button4.Text + "'").Tables[0];
        //    okken.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
        //    okken.ShowDialog();
        //}

        //private void button5_Click(object sender, EventArgs e)
        //{
        //    CublicType okken = new CublicType();
        //    okken.label1.Text = button5.Text + " Cubicle";
        //    okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button5.Text + "'").Tables[0];
        //    okken.dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
        //    okken.ShowDialog();
        //}

        //private void OKKEN_Click(object sender, EventArgs e)
        //{
        //    label1.Text = tabPage1.Text + " Cubicle";
        //    dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button1.Text + "'").Tables[0];
        //    dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;

        //}

        //private void button6_Click(object sender, EventArgs e)
        //{
        //    designfiles desg = new designfiles();
        //    string abc = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
        //    desg.label1.Text = abc +" " +button6.Text + " Files";
        //    desg.ShowDialog();
        //}

        private void PlantCatalogue_Load(object sender, EventArgs e)
        {
            comboBox1.DataSource                         = helper.SelectMysqlreturnDataset("select name from product ").Tables[0];
            comboBox1.ValueMember                        = "name";
            dataGridView1.DataSource                     = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + comboBox1.Text + "'").Tables[0];
            dataGridView1.AutoSizeColumnsMode            = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
            dataGridView1.RowsDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;
            //foreach (DataRow row in dt.Rows)
            {
                SqlDataAdapter adp = new SqlDataAdapter("select name from product", helper.Sqlconnstring);

                //comboBox1.DataSource = helper.SelectMysqlreturnDataset("select name from product ").Tables[0];
                //dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select name from product ").Tables[0];
                //dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
                //dataGridView1.RowsDefaultCellStyle.Alignment = DataGridViewContentAlignment.MiddleCenter;

                //listBox2.Items.Add(row[0].ToString());
            }
            //label1.Text = tabPage1.Text + " Cubicle";
        }
Example #4
0
 private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
 {
     dataGridView1.DataSource          = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + comboBox1.Text + "'").Tables[0];
     dataGridView1.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill;
 }
Example #5
0
 private void setPath_Load(object sender, EventArgs e)
 {
     ClassLibrary3.sqlhelper helper = new ClassLibrary3.sqlhelper();
     comboBox1.DataSource  = helper.SelectMysqlreturnDataset("select DISTINCT Product from T_OKKEN").Tables[0];
     comboBox1.ValueMember = "product";
 }