C# Class projectBM.DataHelper

Mostrar archivo Open project: zettasolutions/projectBM

Public Methods

Method Description
DataHelper ( ) : System
DataTableToJSON ( DataTable table ) : string
GetJSONData ( System.Web.HttpRequestBase request ) : string
dataTableUpdate ( string procedureName, DataTable dt ) : Message
execute ( string sql, bool isProcedure ) : void
getDbValue ( string sql ) : string
getGetRecordsByDataTable ( string procedureName, DataTable dt ) : string
logError ( int errNumber, string procedure, string errMessage, string type ) : void
processPostData ( System.Web.HttpRequestBase request ) : Message
toJSON ( SqlCommand cmd ) : string
toJSON ( string sql, bool isProcedure ) : string

Private Methods

Method Description
createMessageJSONStr ( Message message ) : string
serializeURLParameters ( SqlCommand command, string sqlQuery ) : void
toJSON ( System.Data.SqlClient.SqlDataReader rdr ) : string

Method Details

DataHelper() public method

public DataHelper ( ) : System
return System

DataTableToJSON() public static method

public static DataTableToJSON ( DataTable table ) : string
table System.Data.DataTable
return string

GetJSONData() public static method

public static GetJSONData ( System.Web.HttpRequestBase request ) : string
request System.Web.HttpRequestBase
return string

dataTableUpdate() public static method

public static dataTableUpdate ( string procedureName, DataTable dt ) : Message
procedureName string
dt System.Data.DataTable
return projectBM.Models.Message

execute() public static method

public static execute ( string sql, bool isProcedure ) : void
sql string
isProcedure bool
return void

getDbValue() public static method

public static getDbValue ( string sql ) : string
sql string
return string

getGetRecordsByDataTable() public static method

public static getGetRecordsByDataTable ( string procedureName, DataTable dt ) : string
procedureName string
dt System.Data.DataTable
return string

logError() public static method

public static logError ( int errNumber, string procedure, string errMessage, string type ) : void
errNumber int
procedure string
errMessage string
type string
return void

processPostData() public static method

public static processPostData ( System.Web.HttpRequestBase request ) : Message
request System.Web.HttpRequestBase
return projectBM.Models.Message

toJSON() public static method

public static toJSON ( SqlCommand cmd ) : string
cmd System.Data.SqlClient.SqlCommand
return string

toJSON() public static method

public static toJSON ( string sql, bool isProcedure ) : string
sql string
isProcedure bool
return string