-1
我必须面对C#做这个语句首先然后
{
double a = Convert.ToDouble(textBox1.Text);
double b = Convert.ToDouble(textBox8.Text);
textBox8.Text = (a + b).ToString();
textBox1.Text = "";
double c = Convert.ToDouble(textBox2.Text);
double d = Convert.ToDouble(textBox9.Text);
textBox9.Text = (c + d).ToString();
textBox2.Text = "";
}
//cmd = new OleDbCommand("update Table1 set balance='" + textBox8 + "','" + textBox9.Text + "','" + textBox10.Text + "','" + textBox11.Text + "','" + textBox12.Text + "','" + textBox13.Text + "','" + textBox14.Text + "', where ID=" + textBox15.Text, con);
cmd = new OleDbCommand("UPDATE Table1 SET OUT = ? " + " WHERE ID = ?", con);
cmd.Parameters.AddWithValue("OUT", textBox8.Text);
cmd.Parameters.AddWithValue("OUT", textBox9.Text);
cmd.Parameters.AddWithValue("ID", textBox15.Text);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
loaddata();
}
的问题,我有2 textbox
,一个是平衡,一个是
的平衡是从我的数据库loaddata中,IN是允许用户键入一个值,所以
IN + Balance = Balance
,并且这将更新到数据库。
更新功能是工作负责人。但我怎么可以先添加值,然后运行更新?建议。
究竟你想做 ? – XTGX 2013-03-26 07:48:11