日期:2014-05-18 浏览次数:21212 次
private SqlDataAdapter dataAdapter; private DataSet ds = new DataSet(); private void btSaveUpdate_Click(object sender, EventArgs e) { DialogResult result = MessageBox.Show("确定保存修改吗?","提示",MessageBoxButtons.OKCancel,MessageBoxIcon.Question); if (result == DialogResult.OK) { SqlCommandBuilder builder=new SqlCommandBuilder(dataAdapter); dataAdapter.Update(ds, "Teacher"); } }