新增子单据行要用 CreateNewEntryRow(DynamicObject parentRow, SubEntryEntity entity, int row) 这个重载方法,例如
- //获取单据体元数据
- EntryEntity entry = this.View.BillBusinessInfo.GetEntryEntity("FEntry");
- //获取指定一行的单据体数据
- DynamicObject entity_obj = this.Model.GetEntityDataObject(entry,0);
- //获取子单据体元数据
- SubEntryEntity sub_entry = this.View.BillBusinessInfo.GetEntryEntity("FSubEntry") as SubEntryEntity;
- //创建新的子单据体分录行
- this.Model.CreateNewEntryRow(entity_obj, sub_entry, 0);
复制代码
子单据体行赋值用this.View.Model.SetValue(field,value, rowNo),给当前单据体行对应的子单据体赋值 |