public static object[] GetValuesByCols(this ICdlRecord record, DmlfColumnRef[] cols, DmlfResultFieldCollection result) { if (result == null) return record.GetValuesByCols(cols.GetNames()); object[] values = new object[cols.Length]; for (int i = 0; i < cols.Length; i++) { int index = result.GetColumnIndex(cols[i]); values[i] = record.GetValue(index); } return values; }
public int GetColumnIndex(DmlfColumnRef col) { for (int i = 0; i < Count; i++) { if (this[i].Column == col) { return(i); } } return(-1); }
private DmlfColumnRef[] GetBaseWhereCols() { if (ResultFields != null) { return(ResultFields.GetPrimaryKey(DmlfSource.BaseTable).ToArray()); } else { var pk = Structure.PrimaryKey; return(DmlfColumnRef.BuildFromArray(pk != null ? pk.Columns.GetNames() : Structure.Columns.GetNames(), null)); } }
public override void LoadFromXml(XmlElement xml) { base.LoadFromXml(xml); Column = new DmlfColumnRef(); Column.LoadProperties(xml); }
public object[] GetValuesByCols(DmlfColumnRef[] cols) { return this.GetValuesByCols(cols, m_table.ResultFields); }