代理字段的值怎样获得?
1,065次浏览
编辑于2016年05月05日 14:27:37
为什么我用 this.View.ParentFormView.Model.GetValue("FBomID") 无法获得值,而且也不报错! --FBomID 为某代理字段的key这种方式为什么不行?
而用获得真是字段的值的方法就可以:
int rowIndex = this.View.ParentFormView.Model.GetEntryCurrentRowIndex("FEntity");
DynamicObject bom = this.View.ParentFormView.Model.GetValue("FBomID", rowIndex) as DynamicObject;
if (bom != null)
{
int bomId = Convert.ToInt32(bom["Id"]);
if (string.IsNullOrWhiteSpace(e.FilterString) == false)
{
e.FilterString += " and ";
}
e.FilterString += " F_xxq_bom = " + bomId;
}