Esempio n. 1
0
        //public Array GetArray()
        //{
        //    if (m_fields[m_curField].Changed) return (Array)m_fields[m_curField].Value;
        //    if (m_original != null) return m_original.GetArray();
        //    return null;
        //}

        public object GetValue()
        {
            if (m_fields[m_curField].Changed)
            {
                return(m_fields[m_curField].Value);
            }
            if (m_original != null)
            {
                return(m_original.GetValue());
            }
            return(null);
        }
Esempio n. 2
0
 public static object SafeGetValue(this ICdlRecord record, int ordinal)
 {
     if (ordinal < 0)
     {
         return(null);
     }
     record.ReadValue(ordinal);
     return(record.GetValue());
 }
Esempio n. 3
0
 public static object[] GetValuesByCols(this ICdlRecord record, int[] cols)
 {
     object[] values = new object[cols.Length];
     for (int i = 0; i < cols.Length; i++)
     {
         values[i] = record.GetValue(cols[i]);
     }
     return(values);
 }
Esempio n. 4
0
 private void CreateColumnValues(ICdlRecord record, IShellContext context)
 {
     if (NeedColumnValues)
     {
         context.CreateScope();
         for (int i = 0; i < record.FieldCount; i++)
         {
             context.SetVariable(record.GetName(i), record.GetValue(i));
         }
     }
 }
Esempio n. 5
0
 private void CreateColumnValues(ICdlRecord record, IShellContext context)
 {
     if (NeedColumnValues)
     {
         context.CreateScope();
         for (int i = 0; i < record.FieldCount; i++)
         {
             context.SetVariable(record.GetName(i), record.GetValue(i));
         }
     }
 }
Esempio n. 6
0
 public ArrayDataRecord(ICdlRecord record, int[] colindexes, TableInfo changedStructure)
 {
     if (colindexes.Length != changedStructure.Columns.Count) throw new InternalError("DBSH-00050 ArrayDataRecord(): colnames.count != colindexes.count");
     _values = new object[colindexes.Length];
     for (int i = 0; i < colindexes.Length; i++)
     {
         if (colindexes[i] >= 0)
         {
             _values[i] = record.GetValue(colindexes[i]);
         }
     }
     _structure = changedStructure;
 }
Esempio n. 7
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. 8
0
 public ArrayDataRecord(ICdlRecord record, int[] colindexes, TableInfo changedStructure)
 {
     if (colindexes.Length != changedStructure.Columns.Count)
     {
         throw new InternalError("DBSH-00050 ArrayDataRecord(): colnames.count != colindexes.count");
     }
     _values = new object[colindexes.Length];
     for (int i = 0; i < colindexes.Length; i++)
     {
         if (colindexes[i] >= 0)
         {
             _values[i] = record.GetValue(colindexes[i]);
         }
     }
     _structure = changedStructure;
 }
Esempio n. 9
0
 public object this[int index]
 {
     get { return(_record.GetValue(index)); }
 }
Esempio n. 10
0
 public object GetValue()
 {
     return(RefObject.GetValue());
 }
Esempio n. 11
0
 public static object GetValue(this ICdlRecord record, string colName)
 {
     return(record.GetValue(record.GetOrdinal(colName)));
 }
Esempio n. 12
0
 public static object GetValue(this ICdlRecord record, int ordinal)
 {
     record.ReadValue(ordinal);
     return(record.GetValue());
 }
Esempio n. 13
0
 public object GetValue(int i)
 {
     WantField(i);
     return(m_record.GetValue());
 }