November Happy Hour will be moved to Thursday December 5th.

Class DataHelper

Implements helper methods for the storage data.

Inheritance
System.Object
DataHelper
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Mediachase.Commerce.Storage
Assembly: Mediachase.Commerce.dll
Version: 12.17.2
Syntax
public static class DataHelper

Methods

CreateDataReader(DataTable, String)

Creates the data reader.

Declaration
public static IDataReader CreateDataReader(DataTable sourceTable, string filter)
Parameters
Type Name Description
System.Data.DataTable sourceTable

The source table.

System.String filter

The filter.

Returns
Type Description
System.Data.IDataReader

CreateDataView(DataTable, String)

Creates the data view.

Declaration
public static DataView CreateDataView(DataTable sourceTable, string filter)
Parameters
Type Name Description
System.Data.DataTable sourceTable

The source table.

System.String filter

The filter.

Returns
Type Description
System.Data.DataView

GetDataRows(DataTable, String)

Gets the data rows based on filter.

Declaration
public static DataRow[] GetDataRows(DataTable sourceTable, string filter)
Parameters
Type Name Description
System.Data.DataTable sourceTable

The source table.

System.String filter

The filter.

Returns
Type Description
System.Data.DataRow[]

MapTables(String[])

Maps the tables.

Declaration
public static DataTableMapping[] MapTables(params string[] names)
Parameters
Type Name Description
System.String[] names

The names.

Returns
Type Description
System.Data.Common.DataTableMapping[]

MapTables2(String[], String[])

Maps the tables.

Declaration
public static DataTableMapping[] MapTables2(string[] dbNames, string[] dataSetNames)
Parameters
Type Name Description
System.String[] dbNames

The names.

System.String[] dataSetNames

The data set names.

Returns
Type Description
System.Data.Common.DataTableMapping[]

PopulateParamsFromColumns(ref DataCommand, DataColumnCollection)

Populates the params from columns.

Declaration
public static void PopulateParamsFromColumns(ref DataCommand command, DataColumnCollection columns)
Parameters
Type Name Description
DataCommand command

The command.

System.Data.DataColumnCollection columns

The columns.

SaveDataSetSimple(DataCommand, DataSet, String[])

Saves the data set simple.

Declaration
public static void SaveDataSetSimple(DataCommand cmd, DataSet set, params string[] tables)
Parameters
Type Name Description
DataCommand cmd

The CMD.

System.Data.DataSet set

The set.

System.String[] tables

The tables.

SaveTableSimple(DataCommand, DataTable)

Saves the table simple.

Declaration
public static DataResult SaveTableSimple(DataCommand cmd, DataTable table)
Parameters
Type Name Description
DataCommand cmd

The CMD.

System.Data.DataTable table

The table.

Returns
Type Description
DataResult

SaveTableSimple(DataCommand, DataTable, DataRow[])

Saves the table simple.

Declaration
public static DataResult SaveTableSimple(DataCommand cmd, DataTable table, DataRow[] rows)
Parameters
Type Name Description
DataCommand cmd

The CMD.

System.Data.DataTable table

The table.

System.Data.DataRow[] rows

The rows.

Returns
Type Description
DataResult