Example #1
0
 private static object GetValue(ScopedElementCollection additionalElements, TableColumn tableColumn)
 {
     if (tableColumn.DataType == DataType.Boolean)
     {
         return(PollUtils.ToBool(GetDcElementContent(additionalElements, tableColumn.AttributeName), false));
     }
     if (tableColumn.DataType == DataType.DateTime)
     {
         return(PollUtils.ToDateTime(GetDcElementContent(additionalElements, tableColumn.AttributeName)));
     }
     if (tableColumn.DataType == DataType.Decimal)
     {
         return(PollUtils.ToDecimal(GetDcElementContent(additionalElements, tableColumn.AttributeName), 0));
     }
     if (tableColumn.DataType == DataType.Integer)
     {
         return(PollUtils.ToInt(GetDcElementContent(additionalElements, tableColumn.AttributeName), 0));
     }
     if (tableColumn.DataType == DataType.Text)
     {
         return(Decrypt(GetDcElementContent(additionalElements, tableColumn.AttributeName)));
     }
     return(GetDcElementContent(additionalElements, tableColumn.AttributeName));
 }