Table of Contents

Class DataHelper

Namespace
JJMasterData.Core.DataManager
Assembly
JJMasterData.Core.dll
public static class DataHelper
Inheritance
DataHelper
Inherited Members

Methods

ContainsPkValues(Element, Dictionary<string, object?>)

public static bool ContainsPkValues(Element element, Dictionary<string, object?> values)

Parameters

element Element
values Dictionary<string, object>

Returns

bool

CopyIntoDictionary(Dictionary<string, object?>, Dictionary<string, object?>?, bool)

public static void CopyIntoDictionary(Dictionary<string, object?> valuesToBeReceived, Dictionary<string, object?>? valuesToBeCopied, bool replaceIfKeyExists = false)

Parameters

valuesToBeReceived Dictionary<string, object>
valuesToBeCopied Dictionary<string, object>
replaceIfKeyExists bool

GetCurrentUserId(IHttpContext, Dictionary<string, object?>?)

public static string? GetCurrentUserId(IHttpContext context, Dictionary<string, object?>? userValues)

Parameters

context IHttpContext
userValues Dictionary<string, object>

Returns

string

GetElementValues(Element, Dictionary<string, object?>)

public static Dictionary<string, object?> GetElementValues(Element element, Dictionary<string, object?> values)

Parameters

element Element
values Dictionary<string, object>

Returns

Dictionary<string, object>

GetPkValues(Element, Dictionary<string, object?>)

public static Dictionary<string, object> GetPkValues(Element element, Dictionary<string, object?> values)

Parameters

element Element
values Dictionary<string, object>

Returns

Dictionary<string, object>

GetPkValues(Element, string, char)

public static Dictionary<string, object> GetPkValues(Element element, string parsedValues, char separator)

Parameters

element Element
parsedValues string
separator char

Returns

Dictionary<string, object>

GetRelationValues(Element, Dictionary<string, object?>, bool)

public static Dictionary<string, object> GetRelationValues(Element element, Dictionary<string, object?> values, bool usePkColumnName = false)

Parameters

element Element
values Dictionary<string, object>
usePkColumnName bool

Returns

Dictionary<string, object>

ParseOriginalName(FormElement, Dictionary<string, object?>?)

Preserves the original name of the field as registered in the dictionary and validates if the field exists

public static Dictionary<string, object?>? ParseOriginalName(FormElement formElement, Dictionary<string, object?>? paramValues)

Parameters

formElement FormElement
paramValues Dictionary<string, object>

Returns

Dictionary<string, object>

ParsePkValues(FormElement, Dictionary<string, object?>, char)

Concat primary keys with separator characters

public static string ParsePkValues(FormElement formElement, Dictionary<string, object?> formValues, char separator)

Parameters

formElement FormElement
formValues Dictionary<string, object>
separator char

Returns

string

RemoveNullValues(Dictionary<string, object?>?)

public static void RemoveNullValues(Dictionary<string, object?>? values)

Parameters

values Dictionary<string, object>