按照以下源码,可以实现折旧预测功能
Dictionary<string, object> dct = new Dictionary<string, object>();
dct["FOWNERORGID"] = this.Model.DataObject["OwnerOrgID_Id"];
//传入组织参数
List<Dictionary<string, object>> lst = new List<Dictionary<string, object>>();
lst.Add(dct);
Dictionary<string, object> drParam = new Dictionary<string, object>();
//标记只是预测,不保存折旧信息
drParam["ISSAVE"]= null ;
drParam["ISSALALL"]= null;
//变更前后的id,都传入当前卡片内码
drParam["FOLDALTERID"]= this.Model.DataObject["id"] ;
drParam["FALTERID"]= this.Model.DataObject["id"] ;
//传入卡片创建方式
drParam["SOURCETYPE"] = this.Model.DataObject["Source"];
//进行折旧预测
DynamicObjectCollection deprInfo = AssetDeprServiceHelper.AssetDepr(Context, lst, drParam);
this.View.ShowMessage(Convert.ToString(deprInfo[0]["FDepr"]));
推荐阅读