Class ValidatorHelper
Forward extra fields to underlying row
Inherited Members
Namespace: SuperOffice.CRM.Entities
Assembly: SoDataBase.dll
Syntax
public class ValidatorHelper
Constructors
ValidatorHelper()
Forward extra fields to underlying row
Declaration
public ValidatorHelper()
Methods
CopyRowValidatorToDict(RowValidator, Dictionary<string, string>)
Forward extra fields to underlying row
Declaration
public static void CopyRowValidatorToDict(RowValidator rowValidator, Dictionary<string, string> result)
Parameters
Type | Name | Description |
---|---|---|
RowValidator | rowValidator | |
Dictionary<string, string> | result |
NormalizeKeys(Dictionary<string, string>)
Converts keys to lowercase, removes db suffixes and tries to make names match the service layer.
Declaration
public static Dictionary<string, string> NormalizeKeys(Dictionary<string, string> validator)
Parameters
Type | Name | Description |
---|---|---|
Dictionary<string, string> | validator | "Field_Name_idx" -> "error message" dictionary |
Returns
Type | Description |
---|---|
Dictionary<string, string> | "fieldname" -> "error message" dictionary |
ValidateRequiredFields(TableRowBase, Dictionary<string, string>, string)
Forward extra fields to underlying row
Declaration
public static void ValidateRequiredFields(TableRowBase main, Dictionary<string, string> res, string prefix)
Parameters
Type | Name | Description |
---|---|---|
TableRowBase | main | |
Dictionary<string, string> | res | |
string | prefix |
ValidateRequiredFields(TableRowsBase, Dictionary<string, string>, string)
Validate all fields on all rows in the collection. If any are found to be NULL/0/"" then a message is noted in the result.
Declaration
public static void ValidateRequiredFields(TableRowsBase mains, Dictionary<string, string> validator, string prefix)
Parameters
Type | Name | Description |
---|---|---|
TableRowsBase | mains | Rows collection |
Dictionary<string, string> | validator | |
string | prefix |