Esempio n. 1
0
 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;
 }
Esempio n. 2
0
 public int GetColumnIndex(DmlfColumnRef col)
 {
     for (int i = 0; i < Count; i++)
     {
         if (this[i].Column == col)
         {
             return(i);
         }
     }
     return(-1);
 }
Esempio n. 3
0
 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));
     }
 }
Esempio n. 4
0
 public override void LoadFromXml(XmlElement xml)
 {
     base.LoadFromXml(xml);
     Column = new DmlfColumnRef();
     Column.LoadProperties(xml);
 }
Esempio n. 5
0
 public object[] GetValuesByCols(DmlfColumnRef[] cols)
 {
     return this.GetValuesByCols(cols, m_table.ResultFields);
 }