首页 > 其他 > 详细

如何获取当前行集合

时间:2018-08-31 16:49:13      阅读:181      评论:0      收藏:0      [点我收藏+]
如想获取单据体当前行字段值,可以参看下面代码
//获取单据体或者子单据体字段值 需要先查找到相应单据体
string entityKey = "需要查找的单据体Key";
//获取单据体
var entity = this.View.BusinessInfo.GetEntryEntity(entityKey);

        //获取数据集合
        var objs = this.Model.GetEntityDataObject(entity);
        //获取单据体的当前行索引
        int entityRowIndex = this.Model.GetEntryCurrentRowIndex(entityKey);
        //方法1:GetValue根据获得的行索引取值
        this.View.Model.GetValue("单据体字段Key", entityRowIndex);
        //方法2:
        //取得单据体当前行
        DynamicObject row = objs[entityRowIndex];
        //取得当前行字段值
        var entityFieldValue = row["单据体字段Key"];

如何获取当前行集合

原文:http://blog.51cto.com/yataigp/2167628

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!