BusinessInfo businessInfo = null; //数据包信息
string[] billIDs=null; 单据内码集合
// 确定需要加载的源单字段(仅加载需要携带的字段)
List
selector.Add(new SelectorItemInfo("FRate")); //汇率
selector.Add(new SelectorItemInfo("FSettleAmount")); //结算明细-结算金额
selector.Add(new SelectorItemInfo("FSettleCurrId")); //结算明细-结算币别
selector.Add(new SelectorItemInfo("FPrice")); //商品明细-原价
selector.Add(new SelectorItemInfo("FRealAmount")); //商品明细-实收金额
selector.Add(new SelectorItemInfo("FRealPrice")); //商品明细-实收单价
selector.Add(new SelectorItemInfo("FAmount")); //商品明细-原价金额
// TODO: 继续添加其他需要携带的字段,示例代码略
// 设置过滤条件
string filter = string.Format(" {0} IN ({1}) ",
businessInfo .GetForm().PkFieldName,
string.Join(",", billIDs));
OQLFilter filterObj = OQLFilter.CreateHeadEntityFilter(filter);
// 读取源单
IViewService viewService = ServiceFactory.GetViewService(this.Context);
var srcBillObjs = viewService.Load(this.Context,businessInfo.GetForm().Id,selector,filterObj); //获取源单数据
推荐阅读