Пример #1
0
 private IEnumerable <Field> GetDirectFieldValues(IEnumerable <ColumnDefinition> directFields)
 {
     foreach (var cd in directFields)
     {
         Field retval = null;
         try
         {
             retval = new Field()
             {
                 Name  = cd.FieldName,
                 Label = cd.ColumnLabel,
                 // If the Category and Item parameters are both blank,
                 // then Commence uses the item from the most recent AddItem/AddSharedItem command,
                 // MarkActiveItem or ViewMarkItem REQUEST.
                 // In this case, it is MarkActiveItem, which is what we want
                 Value = _db.GetField(string.Empty, string.Empty, cd.FieldName)
             };
         }
         catch { } // ignore all errors
         yield return(retval);
     }
 }