/// <summary> /// 模型绑定到单据体 /// </summary> /// <param name="entity"></param> /// <param name="List"></param> public void SetModelToEntity(IEntityItem entity, IList List) { foreach (var item in List) { var row = entity.Row.NewRow(); SetModelToEntityRow(row, item); } }
public List <T> SetEntityToModel <T>(IEntityItem entity) where T : class { List <T> list = new List <T>(); for (int i = 0; i < entity.Row.Count; i++) { list.Add(SetEntityRowToModel <T>(entity.Row[i])); } return(list); }
public OldBillerRow(IBiller biller, IEntityItem parent) { this.Biller = biller; this.m_BillTransfer = biller.M_BillTransfer as k3BillTransfer.Bill; this.Parent = parent; if (!this.Parent.Column.NameToIndex.ContainsKey("fitemid")) { throw new Exception("本张单据不包含FItemId字段,确保您的单据对像覆盖了EntityColumnKey字段"); } }
/// <summary> /// 老单单据体,下标只能为0 /// </summary> /// <value></value> public IEntityItem this[int entityIndex] { get { if (entityIndex != 0) { throw new IndexOutOfRangeException("无法获取单据体,下标越界"); } if (this._entityInstanceCatch == null) { this._entityInstanceCatch = new OldBillerEntityItem(this.Biller, this, entityIndex); } return(this._entityInstanceCatch); } }
public OldBillerColumn(IBiller biller, IEntityItem parent) { this.Biller = biller; this.m_BillTransfer = biller.M_BillTransfer as k3BillTransfer.Bill; this.Parent = parent; }
public NewBillerColumn(IBiller biller, IEntityItem parent) { this.Biller = biller; this.Parent = parent; this.m_BillTransfer = this.Biller.M_BillTransfer as K3ClassEvents.BillEvent; }