private void button5_Click(object sender, EventArgs e) { string abc = this.dataGridView1.CurrentRow.Cells[0].Value.ToString(); int kk = helper.ExcuteSqlreturnInt("update keyprocess set Parth=‘" + textBox1.Text + "’where process='" + abc + "' "); if (kk != 0 && kk != null) { MessageBox.Show("kk"); } }
// 更新路径,保存确认 private void button1_Click(object sender, EventArgs e) { string pathText = textBox1.Text; //if (textBox1.Text.Contains('/')) //textBox2.Text = textBox1.Text; if (MessageBox.Show("是否确定更新为当前路径", "更新确认", MessageBoxButtons.OKCancel) == DialogResult.OK) { int count = helper.ExcuteSqlreturnInt("UPDATE T_OKKEN set path='" + textBox1.Text + "' where Product ='" + comboBox1.Text + "'"); MessageBox.Show(count.ToString()); if (count != 0) { MessageBox.Show("Save成功!"); } else { MessageBox.Show("Save失败!"); } } else { } //okken.dataGridView1.DataSource = helper.SelectMysqlreturnDataset("select Product_Type ,Description from T_OKKEN where Product='" + button1.Text + "'").Tables[0]; }