C# Class Rolcore.Data.DataTableExtensions

Extension methods for DataTable.
显示文件 Open project: Rollins/Rolcore

Public Methods

Method Description
GetColumnMapOrDefault ( this source, NameValueCollection columnMap = null ) : NameValueCollection

Generates a column map for the specified source DataTable, adding only unmapped columns.

GetColumnNames ( this table ) : string[]

Gets the column names of the table.

ToHtmlTable ( this table ) : string

Converts the given DataTable into the equivelant HTML table.

Private Methods

Method Description
FillFromCsvFile ( this table, string folderPath, string fileName ) : void

Method Details

GetColumnMapOrDefault() public static method

Generates a column map for the specified source DataTable, adding only unmapped columns.
public static GetColumnMapOrDefault ( this source, NameValueCollection columnMap = null ) : NameValueCollection
source this Specifies the source containing the /// columns to be mapped.
columnMap System.Collections.Specialized.NameValueCollection Specifies any existing mappings.
return System.Collections.Specialized.NameValueCollection

GetColumnNames() public static method

Gets the column names of the table.
public static GetColumnNames ( this table ) : string[]
table this Specifies the table to retrieve the column names from.
return string[]

ToHtmlTable() public static method

Converts the given DataTable into the equivelant HTML table.
public static ToHtmlTable ( this table ) : string
table this Specifies the to convert to HTML.
return string