新建操作服务插件DataSync,继承AbstractOperationServicePlugIn。
表单列表菜单 --增加【同步】按钮,按钮绑定操作【空操作】,空操作注册上面的服务端插件类DataSync.
希望在EndOperationTransaction执行完之后,给客户端一个提示信息【xxx同步完成】,不知道在什么地方加?
DataSync代码如下:
[code] public class DataSync: AbstractOperationServicePlugIn
{
public override void EndOperationTransaction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.EndOperationTransactionArgs e)
{
base.EndOperationTransaction(e);
string key = base.BusinessInfo.GetDynamicObjectType().PrimaryKey.Name;
DataSynchronizeHelper.DoSynchronize(base.Context, base.BusinessInfo.GetForm().Id, from w in e.DataEntitys select (long)w[key]);
}
public override void AfterExecuteOperationTransaction(Kingdee.BOS.Core.DynamicForm.PlugIn.Args.AfterExecuteOperationTransaction e)
{
base.AfterExecuteOperationTransaction(e);
}
}[/code]
推荐阅读