DataHelper Class |
Namespace: CMS.Helpers
public class DataHelper : CoreMethods
The DataHelper type exposes the following members.
Name | Description | |
---|---|---|
![]() | DataHelper |
Name | Description | |
---|---|---|
![]() ![]() | FAKE_ID |
Fake ID to use when the ID column requires a value, and needs to be faked
|
Name | Description | |
---|---|---|
![]() ![]() | CompareByteArrays |
Compares two byte arrays.
|
![]() ![]() | ConvertColumnToDateTime | Obsolete.
Converts the specified column to Date time type.
|
![]() ![]() | ConvertToDataTableT |
Method to convert LINQ result to DataTable
|
![]() ![]() | ConvertValue(Object, Type) |
Converts the value to a specific type.
|
![]() ![]() | ConvertValue(Object, Type, Object) |
Converts the value to a specific type. Returns true if conversion was possible, otherwise false.
|
![]() ![]() | ConvertValueToDefaultCulture |
Converts value to its equivalent string representation using default culture format. Can be used to convert Double, Decimal, DateTime or TimeSpan values.
|
![]() ![]() | CopyColumnValues | Obsolete.
Copies column values from source column to target column.
|
![]() ![]() | CreateUniqueTableColumn |
Creates column with unique name int he given table.
|
![]() ![]() | DataSetPivot |
Converts data set to it's pilot.
|
![]() ![]() | DataSourceIsEmpty(DataSet) |
Returns true if the given data source is empty.
|
![]() ![]() | DataSourceIsEmpty(Object) |
Returns true if the given data source is empty.
|
![]() ![]() | DeleteRows(DataSet, String) |
Deletes the table rows matching the given where condition.
|
![]() ![]() | DeleteRows(DataTable, String) |
Deletes the table rows matching the given where condition.
|
![]() ![]() | EnsureCodenames | Obsolete.
Ensures Codename values in specified column.
|
![]() ![]() | EnsureColumn |
Ensures specified column.
|
![]() ![]() | EnsureGUIDs |
Ensures GUID values in specified column.
|
![]() ![]() | EnsureIdentifiers | Obsolete.
Ensures identifier values in specified column.
|
![]() ![]() | EnsureRandomValues | Obsolete.
Ensures random values in specified int column.
|
![]() ![]() | EnsureStringValues | Obsolete.
Ensures Codename values in specified column.
|
![]() ![]() | ExtendParameters |
Extends the parameters array for new items.
|
![]() ![]() | FileSizeFormat | Obsolete.
Formats file size in human readable format.
|
![]() ![]() | ForEachRow(DataSet, ActionDataRow, FuncDataRow, Boolean) |
Executes the given action for each row in the given DataSet
|
![]() ![]() | ForEachRow(DataTable, ActionDataRow, FuncDataRow, Boolean) |
Executes the given action for each row in the given DataSet
|
![]() ![]() | FromBase64String | Obsolete.
Converts the string from Base64 string to the byte array.
|
![]() ![]() | GetBoolValue(ISimpleDataContainer, String) |
Gets the bool variable from given data container.
|
![]() ![]() | GetBoolValue(DataRow, String, Boolean) |
Gets the bool variable from given DataRow.
|
![]() ![]() | GetBoolValue(ISimpleDataContainer, String, Boolean) |
Gets the bool variable from given data container.
|
![]() ![]() | GetColumns | Obsolete.
Gets the columns of the given table as the string array.
|
![]() ![]() | GetDataContainer |
Gets the data container able to read the given data object
|
![]() ![]() | GetDataContainerItem |
Returns data from datarow, datarowview or ISimpleDataContainer objects for specified column.
|
![]() ![]() | GetDataRowValue |
Returns the value from the DataRow field, or DBNull.Value if the field does not exist in the datarow.
|
![]() ![]() | GetDataRowViewValue |
Returns the value from the DataRowView field, or null if the field does not exist in the datarow.
|
![]() ![]() | GetDataSetFromXml |
Gets DataSet from the given XML string.
|
![]() ![]() | GetDataTable |
Returns the DataTable from the given data source.
|
![]() ![]() | GetDataView |
Returns the DataView from the given data source.
|
![]() ![]() | GetDateTimeValue(ISimpleDataContainer, String) |
Gets the DateTime variable from given data container.
|
![]() ![]() | GetDateTimeValue(DataRow, String, DateTime) |
Gets the DateTime variable from given DataRow.
|
![]() ![]() | GetDBNull |
Converts the standard null value to DBNull.value, keeps the object value if not null.
|
![]() ![]() | GetGuidValue(ISimpleDataContainer, String) |
Gets the guid variable from given data container.
|
![]() ![]() | GetGuidValue(DataRow, String, Guid) |
Gets the guid variable from given DataRow.
|
![]() ![]() | GetIntegerValues(DataTable, String) |
Gets the array of integer values from the given data table.
|
![]() ![]() | GetIntegerValues(DataView, String) | Obsolete.
Gets the array of integer values from the given data table.
|
![]() ![]() | GetIntValue(ISimpleDataContainer, String) |
Gets the integer variable from given Data container.
|
![]() ![]() | GetIntValue(DataRow, String, Int32) |
Gets the integer variable from given DataRow.
|
![]() ![]() | GetItemsCount |
Gets the items count in the specified data source.
|
![]() ![]() | GetMaximumValueT(DataTable, String) |
Gets the maximum value from the given column.
|
![]() ![]() | GetMaximumValueT(DataView, String) |
Gets the maximum value from the given column.
|
![]() ![]() | GetMinimumValueT |
Gets the minimum value from the given column.
|
![]() ![]() | GetNewItemsInList(String, String) |
Gets the list of new items in the given list as list separated by semicolon.
|
![]() ![]() | GetNewItemsInList(String, String, Char) |
Gets the list of new items in the given list as list separated by separator.
|
![]() ![]() | GetNotEmpty |
Returns second parameter if the first is null or "".
|
![]() ![]() | GetNotZero(Object, Int32) |
Returns the object converted to integer or default value when the result of conversion equals zero.
|
![]() ![]() | GetNotZero(Object, Object) | Obsolete.
Returns the object converted to integer or default value when the result of conversion equals zero.
|
![]() ![]() | GetNull |
Converts the DBNull.value to standard null, keeps the object value if not null.
|
![]() ![]() | GetObjectSize |
Gets the size of the given object.
|
![]() ![]() | GetObjectString(Object, Int32) |
Gets the object as a string (for structured objects the object type and its size).
|
![]() ![]() | GetObjectString(Object, Int32, Int32) |
Gets the object as a string (for structured objects the object type and its size).
|
![]() ![]() | GetParentPath |
Returns the parent path for the specified path (any kind of path with "/" as a separator)
|
![]() ![]() | GetPartialValue |
Gets value from string that has values separated by separator.
|
![]() ![]() | GetRowSize |
Returns the row data size (size of the contained data).
|
![]() ![]() | GetScalarValue |
Gets the first value from the given DataSet.
|
![]() ![]() | GetSingleColumnDataSet |
Returns a DataSet containing single table with single column.
|
![]() ![]() | GetSizeString |
Returns the string for the specified file size.
|
![]() ![]() | GetStringValue(ISimpleDataContainer, String) |
Gets the string variable from given data container.
|
![]() ![]() | GetStringValue(DataRow, String, String) |
Gets the string variable from given DataRow.
|
![]() ![]() | GetStringValues |
Gets the array of string values from the given data table.
|
![]() ![]() | GetTableSize |
Returns the table data size (size of the contained data).
|
![]() ![]() | GetTopNForPage | Obsolete.
Gets the TOPN value to be able to get the specific page out of the paged results with old paging (through TOPN only).
|
![]() ![]() | GetUniqueRows |
Gets the list of unique rows based on given column value.
|
![]() ![]() | GetUniqueValues |
Gets the list of unique values based on given column value.
|
![]() ![]() | GetValuesT |
Gets the array of the values from the given data table.
|
![]() ![]() | GetValuesFrequency(DataTable, String) |
Gets frequency of values in specified data table's column.
|
![]() ![]() | GetValuesFrequencyTDataContainer(IEnumerableTDataContainer, FuncTDataContainer, Object) |
Gets frequency of values in data collection.
|
![]() ![]() | GetViewSize |
Returns the view data size (size of the contained data).
|
![]() ![]() | ChangeBooleanValues(DataTable, String, Boolean, String) |
Changes the boolean value in the given table.
|
![]() ![]() | ChangeBooleanValues(DataTable, String, Boolean, Boolean, String) |
Changes the boolean value in the given table.
|
![]() ![]() | ChangeStringValues(DataTable, String, String, String) |
Changes the string value in the given table.
|
![]() ![]() | ChangeStringValues(DataTable, String, String, String, String) | Obsolete.
Changes the string value in the given table.
|
![]() ![]() | ChangeValuesToNull |
Changes the value in the given table to NULL.
|
![]() ![]() | IsEmpty |
Returns true, if the given value is empty (null, DBNull, or "").
|
![]() ![]() | IsValid | Obsolete.
Tests if value is valid to given data type
|
![]() ![]() | IsValidID |
Returns true if the given value is a valid ID
|
![]() ![]() | IsZero |
Returns true, if the given value is zero (null, DBNull, or 0).
|
![]() ![]() | KeepOnlyRows |
Keeps only table rows matching the given where condition.
|
![]() ![]() | LockDataSet |
Makes the given DataSet read-only
|
![]() ![]() | LowerCaseTableNames |
Converts the table names of given DataSet to lowercase representation.
|
![]() ![]() | MarkDuplicitRows |
Marks the duplicate rows in the data table.
|
![]() ![]() | MergeT, K, V |
Merges two objects implementing the IDictionary interface of type T with key of type K and value of type V.
|
![]() ![]() | ReadDataSetFromXml(DataSet, XmlReader, DataHelperActionCallback, Object) |
Reads the DataSet from given XML reader (expects "NewDataSet" as a root node).
|
![]() ![]() | ReadDataSetFromXml(DataSet, XmlReader, DataHelperActionCallback, Object, String, ListString, String) |
Reads the DataSet from given XML reader.
|
![]() ![]() | RecomputeChildCount |
Re-computes count of child objects in parentObjects data table's childCountColumn column.
|
![]() ![]() | ReduceDataSetData |
Reduces the data set data.
Works in two modes:
1 - remove records (when calculateAverage is FALSE)
2 - calculate average values for the intervals (when calculateAverage is TRUE)
|
![]() ![]() | RenameTable |
Renames the table in the given DataSet.
|
![]() ![]() | RestrictRows(DataSet, Int32) |
Restricts the number of rows to the top N items.
|
![]() ![]() | RestrictRows(DataSet, Int32, Int32, Int32) |
Restricts the given DataSet to only given rows starting with the offset, and leaving only maximum defined number of rows.
|
![]() ![]() | SetColumnValues |
Sets column values to specified value.
|
![]() ![]() | SetDataRowValue |
Sets value to data row. If value is null, DBNull will be used.
|
![]() ![]() | SetPartialValue |
Sets new value to string that is separates by separator.
|
![]() ![]() | SetTableName |
Sets the table name in the specified DataSet.
|
![]() ![]() | ShiftValuesUp | Obsolete.
Shifts the values in the column of Data table one row up.
|
![]() ![]() | SortDataTable |
Sorts the Data table using given OrderBy expression.
|
![]() ![]() | TransferTable |
Transfers tables from source DataSet to the destination DataSet and sets the source table name to specified value.
|
![]() ![]() | TransferTableRows |
Transfers table rows between two tables.
|
![]() ![]() | TransferTables |
Transfers tables from source DataSet to the destination DataSet.
|
![]() ![]() | TranslateBinaryColumn | Obsolete.
Translates the binary column within data table from its string representation to byte[].
|
![]() ![]() | TrimDataSetPage |
Trims first data table from source to fit into page.
|
![]() ![]() | TrimLastIdFromList(String) | Obsolete.
Trims last ID from ID list (delimited by semicolon). Returns trimmed list
|
![]() ![]() | TrimLastIdFromList(String, Int32) | Obsolete.
Trims last ID from ID list. Returns trimmed list.
|
![]() ![]() | TryGetDataRowValue |
Returns the value from the DataRow field.
|
![]() ![]() | TryGetDataRowViewValue |
Returns the value from the DataRowView field.
|
![]() ![]() | Union |
Creates the union of two Datasets, the values are compared for uniqueness by the given ID column name.
|
![]() ![]() | WriteDataSetToXml |
Writes the DataSet from given XML reader.
|