数据更新问题,我在前台更新了数据,但在后台没有更改。。。!!!!!!!!

Caolh Caolh 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
数据更新问题,我在前台更新了数据,但在后台没有更改。。。!!!!!!!!
private void btnSave_Click(object sender, System.EventArgs e)
{

try
{

// End the Current edit. if you do not do this, when the user makes a
// change and then clicks the Save button prior to stepping to another
// records, the changes will not be propagated.

this.BindingContext[dtEmployeeInfo].EndCurrentEdit();

// Update the database with the changes made to the local resident DataSet.

da.Update(this.dtEmployeeInfo);



MessageBox.Show("Database successfully updated.",
"Custom Formatting Handler Demo", MessageBoxButtons.OK,
MessageBoxIcon.Information);

}
catch(Exception exp)
{

MessageBox.Show("There was an error when attempting to update " +
"the database: " + exp.Message,
this.Text, MessageBoxButtons.OK,
MessageBoxIcon.Error);
}

}
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
Caolh
C# 111,129 成员 642,538 内容