日期:2014-05-18  浏览次数:20856 次

关于此更新数据代码的设计
C# code
try
{
    this.Validate();
    this.customersBindingSource.EndEdit();
    this.customersTableAdapter.Update(this.northwindDataSet.Customers);
    MessageBox.Show("Update successful");
}
catch (System.Exception ex)
{
    MessageBox.Show("Update failed");
}

以上代码为使用 TableAdapter 更新数据,我现在想把它做成函数放在WCF服务的中间层里,可供客户端的表示层进行调用,具体该如何写呢?

------解决方案--------------------
可有难度,帮顶一下!
------解决方案--------------------
中间层发不出一个接口来就行了,客户端调用,中间层处理